Logo Search packages:      
Sourcecode: libgphoto2 version File versions  Download package

int gp_bayer_decode ( unsigned char *  input,
int  w,
int  h,
unsigned char *  output,
BayerTile  tile 
)

Convert a bayer raster style image to a RGB raster.

Parameters:
input the bayer CCD array as linear input
w width of the above array
h height of the above array
output RGB output array (linear, 3 bytes of R,G,B for every pixel)
tile how the 2x2 bayer array is layed out
A regular CCD uses a raster of 2 green, 1 blue and 1 red components to cover a 2x2 pixel area. The camera or the driver then interpolates a 2x2 RGB pixel set out of this data.

This function expands and interpolates the bayer array to 3 times larger bitmap with RGB values interpolated.

Returns:
a gphoto error code

Definition at line 367 of file bayer.c.

References GP_OK.

{
      gp_bayer_expand (input, w, h, output, tile);
      gp_bayer_interpolate (output, w, h, tile);

      return (GP_OK);
}


Generated by  Doxygen 1.6.0   Back to index