beautypg.com

Sensoray 2255 User Manual

Page 21

background image

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. Minimum is 0x00, maximum is 0xff, which corresponds to a
gain of approximately 4.

saturation

Saturation. Default is 0x80. 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. Leave as default

Capture buffers

The Linux driver allocates the 2255 capture buffers in kernel space using virtual memory. The user can
access these buffers using MMAP or by copying from the buffers (inefficient). The driver currently has
16 SYS_FRAMES(s2255.h). When a start acquire is done, it starts a USB read pipe to continuously read
into the buffers starting at frame index 0. It operates as a ring buffer. After frame index SYS_FRAMES-
1, the driver will read into frame index 0 again. If frame index 0 hasn’t been dequeued by the time the
driver gets there again, frame index 0 will be skipped or the frame is dropped. The driver continuously
reads the USB pipe to prevent any hardware/bus failures. It is up to the user application to dequeue the
frames in a timely manner. If not, then frames are simply discarded.

Demo Application

Capture to 2 channels simultaneously:

1) start 1

2) start 2

Capture to 4 simultaneous channels with full color(1/2 frame rate):

1) fdec 1 2 (channel 1 frame rate ½)

21