V4LInput

Input object reading images from a V4L-capable device.

Inherits

See also

Summary
V4LInputInput object reading images from a V4L-capable device.
Constants
Video modes
Properties
widthGet width of images.
heightGet height of images.
Functions
V4LInput.newConstructor.
inspectReturn string with information about this object.
closeClose the device.
readRead an image.
status?Indicates whether the device is still open.
set_sensivityChange camera settings.

Constants

Video modes

PALPAL mode
NTSCNTSC mode
SECAMSECAM mode
AUTOautomatic mode selection

Properties

width

Get width of images.

height

Get height of images.

Functions

V4LInput.new

def V4LInput.new(device =  "/dev/video0",
channel =  0,
channel_norm =  PAL,
width =  -1,
height =  -1,
preferredColourSpace =  '')

Constructor.

Parameters

deviceFilename of input device.
channelChannel number.
channel_normVideo mode: PAL, NTSC, SECAM, or AUTO.
widthPreferred width (-1 for maximum width).
heightPreffered height (-1 for maximum height).
preferredColourSpacePreferred colourspace.  Colourspaces supported by HornetsEye are UBYTERGB, UYVY, YUY2, I420, and UBYTE.  Specify ‘’ for automatic selection.

inspect

def inspect

Return string with information about this object.

Returns

Something like this: “V4LInput( \”/dev/video0\” )”

close

def close

Close the device.

read

def read

Read an image.

Returns

An object of type Frame_ or Sequence_

status?

def status?

Indicates whether the device is still open.

set_sensivity

def set_sensivity(brightness,
hue,
colour,
contrast)

Change camera settings.  Note that some devices will not support all settings.

Parameters

brightnessBrightness value between 0 and 65535
hueHue value between 0 and 65535
colourColour strength between 0 and 65535
contrastContrast between 0 and 65535
def V4LInput.new(device =  "/dev/video0",
channel =  0,
channel_norm =  PAL,
width =  -1,
height =  -1,
preferredColourSpace =  '')
Constructor.
def inspect
Return string with information about this object.
def close
Close the device.
def read
Read an image.
def status?
Indicates whether the device is still open.
def set_sensivity(brightness,
hue,
colour,
contrast)
Change camera settings.
Base class for different types of input sources for images.
HornetsEye allows you to capture images using a V4L-capable (video for linux) device (for example a USB webcam).
24-bit unsigned RGB-triplet
UYVY data
YUY2 data
I420 data
8-bit signed integer
This class provides fast (multi-dimensional) Ruby arrays where all elements are of the same type.
Close