IC Imaging Control C++

Grabber::setDisplayFrameFilters Method

Grabber::setDisplayFrameFilters Method

Inserts a list of frame filters in the display path of the image stream. If an overlay is present in the display path, the filter list is inserted in front of it. This means that the overlay is located between the filter list and the display. If there is no overlay in the display path, the filter list is inserted in front of the the display.
bool setDisplayFrameFilters( IFrameFilter* pFilter );
bool setDisplayFrameFilters( 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 display path must not be destroyed unless they have been removed by calling setDisplayFrameFilters 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.setDisplayFrameFilters( filterList );

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

See also: Grabber, IFrameFilter, Grabber::getDisplayFrameFilters, Grabber::setDeviceFrameFilters

<< 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, video converters and embedded vision components for factory automation, quality assurance, medicine, science, security and a variety of other markets.

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

ISO 9001:2015 certified MVTEC | Edge AI + Vision Alliance | EMVA

Contact us