Processed Raw Enable#
Using the Feature#
Enabling Processed Raw Enable#
You should only enable the Processed Raw Enable feature if both of the following conditions are met:
- You have configured a Bayer pixel format.
- You want to use the Color Transformation feature, the Color Adjustment feature, or both.
In all other cases, do not enable this feature. Otherwise, image quality may be reduced.
To enable the Processed Raw Enable feature:
- Set the pixel format to a Bayer pixel format, e.g., Bayer 12.
- Set the
ProcessedRawEnable
parameter totrue
.
How It Works#
The Color Transformation and Color Adjustment features require image data stored in RGB triplets in order to work. When a "raw" Bayer pixel format is used, normally, RGB triplets are not provided. Instead, each pixel provides only either red, green, or blue data. To calculate the RGB triplets, a demosaicing algorithm must be performed on the raw image data. This means that the raw image data must be processed.
When Processed Raw Enable is enabled, the raw Bayer pixel data is demosaiced and converted to RGB data, allowing the Color Transformation and Color Adjustment features to work. After that, the modified pixel data is reconverted to Bayer pixel data. The final Bayer data output is no longer "raw" output, but rather "processed raw" output.
When Processed Raw Enable is disabled and a Bayer pixel format is used, the Color Transformation and the Color Adjustment features are available but have no effect.
Sample Code#
/* Macro to check for errors */
#define CHECK(errc) if (GENAPI_E_OK != errc) printErrorAndExit(errc)
GENAPIC_RESULT errRes = GENAPI_E_OK; /* Return value of pylon methods */
/* Set the pixel format to Bayer BG8 */
errRes = PylonDeviceFeatureFromString(hdev, "PixelFormat", "BayerBG8");
CHECK(errRes);
/* Enable Processed Raw Enable */
errRes = PylonDeviceSetBooleanFeature(hdev, "ProcessedRawEnable", 1);
CHECK(errRes);
You can also use the pylon Viewer to easily set the parameters.