The DeBayer filter is used to convert raw image data into an RGB image. In a raw color image, every pixel represents a value for one basic color, instead of three as is the case for an RGB image. In order to get a real color image, the two missing colors have to be interpolated. This is exactly what this filter does.
The DeBayer filter is loaded by an application using the following code:
FrameFilter DeBayerFilter; DeBayerFilter = ICImagingControl1.FrameFilterCreate("DeBayer", ""); if( DeBayerFilter == null ) MessageBox.Show("Failed to create DeBayerFilter"); else ICImagingControl1.DeviceFrameFilters.Add(DeBayerFilter);
There are two parameters that control the de-bayering process:
If the algorithm should be set programmatically, then following code can be used:
// Retrieve the current mode. int mode = DeBayerFilter.GetIntParameter("Mode"); // Set a new Mode. mode = 1; DeBayerFilter.SetIntParameter("Mode", mode);
All parameters can be accessed using the built-in property dialog. The property dialog of the DeBayer filter is as follows:
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.