Sensoray 2255 User Manual
Page 10

COLOR_JPG – color JPEG-compressed image. Compression quality (1..100, 100 being
highest quality, largest file size) is passed in bits 8..15 of the
color
member. For all other
color format settings contents of bits 8 through 15 is irrelevant.
fdec
Frame decimation setting. Must be one of the following: FDEC_1 – capture every frame,
FDEC_2 – capture every second frame, FDEC_3 – capture every 3
rd
frame, FDEC_5 –
capture every 5
th
frame. Other decimation values could be achieved by dropping frames in
the application.
bright
Brightness level. Default is 0. Positive (in 2’s complement form) values increase, and
negative decrease brightness.
contrast
Contrast level. Default is 0x5c (unsigned). Minimum is 0x00, maximum is 0xff, which
corresponds to a gain of approximately 4.
saturation
Saturation. Default is 0x80 (unsigned). Smaller values decrease, and larger values increase
saturation.
hue
Hue (tint). Only works for NTSC. Default is 0, positive values give greenish tone, and
negative values give purplish tone.
single
Unused.
Capture buffers
The 2255 capture buffers are allocated by the application. This approach simplifies interfacing the 2255
to image processing software that uses its own buffers. The buffer’s size (defined by
BUFFER.lpbmi[].biSizeImage)
has to be larger or equal to the size of the captured image. The
SDK function S2255_get_image_size simplifies calculations of the necessary buffer size based on
S2255MODE structure settings. For JPEG capture the buffer size has to be greater or equal than 81920
bytes (80 KB). Once allocated, the buffers must be registered with the driver with S2255_RegBuffer
function before capture is started.
The buffers are allocated using a
BUFFER
type:
typedef struct { //image buffer structure;
ULONG dwFrames; //number of frames in buffer;
FRAME frame[SYS_FRAMES]; //array of FRAME structures;
LPBITMAPINFO lpbmi[SYS_FRAMES]; //pointers to BITMAPINFO structure;
} BUFFER;
where FRAME type is defined as
typedef struct { //frame structure;
void *pdata; //pointer to image data;
10