bayer
|
|
|
Input
|
|
An integer between 0 and 116 specifying the input image frame number. A value of 0 represents the DMA memory buffer of the video device. Values in the range of 100-116 correspond to hidden frames.
|
|
Output
|
|
An integer between 1 and 116 specifying the output image frame number. Values in the range of 100-116 correspond to hidden frames.
|
|
Layout
|
|
An enumerated integer that defines the layout of the CFA matrix. Must be one of the following values:
|
|
CAF_GB=0 top left corner of the input image starts with a green pixel followed by a blue one.
|
CAF_GR=1 top left corner of the input image starts with a green pixel followed by a red one.
|
CAF_BG=2 top left corner of the input image starts with a blue pixel followed by a green one.
|
CAF_RG=3 top left corner of the input image starts with a red pixel followed by a green one.
|
|
Mode
|
|
An optional enumerated integer that describes the interpolation mode to use. Must be one of the following values:
|
|
M_NONE=0 no interpolation is performed. Missing pixels are substituted with the adjacent pixels of the same color.
|
M_BILINEAR=1 calculate the values of missing pixels by performing bilinear interpolation of the adjacent pixels.
|
M_HUE=2 calculate the values of missing pixels by performing the interpolation based on the smoothing of the hue of the adjacent pixels.
|
|
Default value: CAF_NONE
|
|
Rmin, Rmax, Gmin, Gmax, Bmin, Bmax
|
|
Integers between 0 and 255 specifying the minimum and maximum gain level for each color component. The specified dynamic range of each component will be mapped to the full dynamic range of an RGB image. That allows for compensation of uneven sensitivity of the red, green and blue pixels in the CFA matrix. If these parameters are omitted, no scaling will be performed. If only three parameters are submitted, they will be treated as maximum levels of the Red, Green and Blue components respectively with corresponding minimum values set to zero.
|
|
ERR_OK
|
|
The flag set if successful.
|
|
ERR_FAILED
|
|
The flag set if failed.
|
|
This script continuously grabs a CFA image from a Bayer camera, converts it into the RGB format and displays the resulting color image in a frame #1.
|
do
|
grabIm (100)
|
bayer (100, 1 ,CFA_GR, M_BILINEAR, 0, 123, 0, 202, 0, 205, 0)
|
loop
|
|