On Mon, 2003-07-07 at 12:16, Tom Booster wrote:
> I'm a comp. sci. undergrad attempting to write some software
> for digital cameras in C using the dc1394 library.I would
> appreciate it if you could offer any assistance on how I
> turn off the auto white balance feature using dc1394
Use dc1394_auto_on_off(handle, node, FEATURE_WHITE_BALANCE, 0)
> I am aware of the features structure for the
> library but am not sure of the functions used to toggle
> features off or on.
Look thru all the functions in dc1394_control.h. There is also
> Any help would be greatly appreciated. I
> would also like to know if there are smaller MONO format
> sizes for images than MODE_320x240_MONO.
Actually, 640x480 is the smallest MONO mode. However, it is very easy to
derive a mono image from a YUV 4:2:2 image simply by copying only every
other byte to a new buffer.
Also, cropping from the center is very easy to do:
void crop(unsigned char *src, unsigned char *dest, int width, int
height, double bpp)
register int i;
register int stride = width*bpp;
register unsigned char char *s = src, *d = dest;
s += ((480 - height)/2 * 640 * bpp) + ((640 - width)/2 * bpp);
for (i = 0; i < height; i++, d += stride, s += stride + (640 -
memcpy( d, s, stride);
bpp is the number of bytes per pixel of the source image format. For
RGB, bpp is 3, MONO is 1, and YUV 4:2:2 is 2.