IC Imaging Control C++

Grabber::setDeviceFrameFilters Method

Grabber::setDeviceFrameFilters Method

Inserts a list of frame filters in the device path of the image stream. If an overlay is present in the device path, the filter list is inserted in front it. This means that the filter list is located between the device and the overlay.
bool setDeviceFrameFilters( IFrameFilter* pFilter );
bool setDeviceFrameFilters( const tFrameFilterList& filterList );

Parameter Description

Pointer to an IFrameFilter object. If this parameter is used, a filter list is generated and the IFrameFilter object is inserted.


A tFrameFilterList containing pointers to IFrameFilter objects.

Return value:

true, if the operation was successful. If an error occurred, call getLastError to obtain extended error information.


The life time of filter instances has to be checked by the caller of this method. Therefore, the caller remains responsible for the filter objects that are referenced by the plain pointers in the filter list. If you want to use filters here that have been loaded from a module, you have to call the get method of the smart_com pointer that holds the filter instance in order to obtain a plain pointer. Filters that have been inserted in the device path must not be destroyed unless they have been removed by calling setDeviceFrameFilters using a Null pointer as a parameter.


Introduced in version 3.0


The following code fragment shows how to create two frame filter instances and set them as a filter chain.

m_pROIFilter = FilterLoader::createFilter( "ROI" );
m_pRotFlipFilter = FilterLoader::createFilter( "Rotate Flip" );
// Set filter parameters.
tFrameFilterList filterList;
// Use .get to extract a plain pointer from the smart pointer.
filterList.push_back( m_pROIFilter.get() );
filterList.push_back( m_pRotFlipFilter.get() );
m_Grabber.setDeviceFrameFilters( filterList );

Please note the use of smart_com.get() to extract a plain pointer out of the smart pointers.

See also: Grabber, IFrameFilter, Grabber::getDeviceFrameFilters, Grabber::setDisplayFrameFilters

<< Grabber

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