Logo Search packages:      
Sourcecode: libgphoto2 version File versions

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

Convert a bayer raster style image to a RGB raster.

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. It does the same job as gp_bayer_decode() but it calls gp_ahd_interpolate() instead of calling gp_bayer_interpolate(). Use this instead of gp_bayer_decode() if you want to use or to test AHD interpolation in a camera library.

a gphoto error code

Definition at line 659 of file ahd_bayer.c.

References gp_ahd_interpolate(), and GP_OK.

      gp_bayer_expand (input, w, h, output, tile);
      gp_ahd_interpolate (output, w, h, tile);
      return GP_OK;

Generated by  Doxygen 1.6.0   Back to index