bayer.h
Go to the documentation of this file.
#ifndef __BAYER_H__
#define __BAYER_H__
typedef enum {
BAYER_TILE_RGGB = 0,
BAYER_TILE_GRBG = 1,
BAYER_TILE_BGGR = 2,
BAYER_TILE_GBRG = 3,
BAYER_TILE_RGGB_INTERLACED = 4,
BAYER_TILE_GRBG_INTERLACED = 5,
BAYER_TILE_BGGR_INTERLACED = 6,
BAYER_TILE_GBRG_INTERLACED = 7,
} BayerTile;
int gp_bayer_expand (unsigned char *input, int w, int h, unsigned char *output,
BayerTile tile);
int gp_bayer_decode (unsigned char *input, int w, int h, unsigned char *output,
BayerTile tile);
int gp_bayer_interpolate (unsigned char *image, int w, int h, BayerTile tile);
/*
* The following two functions use an alternative procedure called Adaptive
* Homogeneity-directed demosaicing instead of the standard bilinear
* interpolation with basic edge-detection method used in the previous two
* functions. To use or test this method of Bayer interpolation, just use
* gp_ahd_decode() in the same way and in the same place as gp_bayer_decode()
* is used.
*/
int gp_ahd_decode (unsigned char *input, int w, int h, unsigned char *output,
BayerTile tile);
int gp_ahd_interpolate (unsigned char *image, int w, int h, BayerTile tile);
#endif /* __BAYER_H__ */