IC Imaging Control C++

Binning and ROI

Binning and ROI

This chapter shows how to handle a video capture device that supports binning and ROI on the sensor.

Setting a Video Format with Binning and ROI

In case your video capture device supports binning and ROI, then the most simple way to set a binning and ROI using video format is:

cGrabber.setVideoFormat("RGB32 (640x188) [Binning 4x]");

Enumerate Video Format Descriptions

The available binning mode and corresponding ROI ranges are described by the device's collection of VideoFormatDescs. The following sample code shows how to enumerate the video format descriptions:

Grabber::tVidFmtDescListPtr DecriptionList;
DecriptionList = cGrabber.getAvailableVideoFormatDescs();
for( Grabber::tVidFmtDescList::iterator pDescription = DecriptionList->begin(); pDescription != DecriptionList->end(); pDescription++ )
{
    printf("%s\n", (*pDescription)->toString().c_str());
}

The loop will give a result like this (the exact output depends on the video capture device):

RGB32 (96x96-2592x1944)
RGB32 (96x96-1296x972) [Binning 2x]
RGB32 (96x96-648x484) [Binning 4x]
Y800 (96x96-2592x1944)
Y800 (96x96-1296x972) [Binning 2x]
Y800 (96x96-648x484) [Binning 4x]
BY8 (96x96-2592x1944)
BY8 (96x96-1296x972) [Binning 2x]
BY8 (96x96-648x484) [Binning 4x]
RGB24 (96x96-2592x1944)
RGB24 (96x96-1296x972) [Binning 2x]
RGB24 (96x96-648x484) [Binning 4x]

In this example, the text RGB32 (96x96-1296x972) [Binning 2x] means that when using the pixel format RGB32 and binning 2x, the device supports a resolution from 96x96 up to 1296x972.

<< Programmer's Guide

Get in touch with us


About The Imaging Source

Established in 1990, The Imaging Source is one of the leading manufacturers of industrial cameras, frame grabbers and video converters for production automation, quality assurance, logistics, medicine, science and security.

Our comprehensive range of cameras with USB 3.1, USB 3.0, USB 2.0, GigE interfaces and other innovative machine vision products are renowned for their high quality and ability to meet the performance requirements of demanding applications.

Automated Imaging Association ISO 9001:2015 certified

Contact us