IC Imaging Control C++

Binning and ROI

Binning and ROI

This chapter shows you how to handle video capture device, that support 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 following sample code shows, how to enumerate the video format descriptions and create the their video formats with maximum resolution:

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 following result (this 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]

The first chars describe the video format, e.g. RBG32. Then the supported minimum resolution, e.g. 96x96 and the supported maximum resolution e.g. 2592x1944 follow. The range between minimum and maximum resolution means, that it is possible to set nearly any size between them to use a custom video format.

If binning is supported in the current video format description, then the text [Binning 2x] or [Binning 4x] follows.

<< 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