V4L2 controls vs. GeniCam features
60
Alvium CSI-2 Cameras User Guide V1.1.0
Region of interest / Cropping
For Region of interest (SFNC) or Cropping (V4L2), a set of features or controls is
used. When width and height are set with Allied Vision cameras, the image is not
scaled. Instead, a section or ROI of the image is acquired.
Description
V4L2 controls (= Control IDs)
SFNC features,
non-SFNC
Feature |
Data type: (Options)
Enable cropping
VIDIOC_CROPCAP |
I/O control
n.a.
Reading available width
For first series cameras, width cannot be
reduced.
VIDIO_G_FMT
struct v4l2_format
.v4l2_pix_format.width |
Integer | [Pixel] |
I/O control
WidthMax |
Integer | [Pixel]
Reading available height
VIDIO_G_FMT
struct v4l2_format
.v4l2_pix_format.height |
Integer | [Pixel] |
I/O control
HeightMax |
Integer | [Pixel]
Setting height
Setting values requires the VIDIOC_S_CROP
I/O control.
VIDIOC_S_CROP
struct v4l2_crop
.v4l2_rect.height |
Integer | [Pixel] |
I/O control
Height |
Integer | [Pixel]
Setting the vertical offset
Setting values requires the VIDIOC_S_CROP
I/O control.
VIDIOC_S_CROP
struct v4l2_crop
.v4l2_rect.top |
Integer | [Pixel] |
I/O control
OffsetY |
Integer | [Pixel]
Table 31: Using Region of interest and Cropping