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__ */
gp_bayer_decode
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.
Definition: bayer.c:367
BAYER_TILE_RGGB
raster is RG,GN
Definition: bayer.h:33
BAYER_TILE_BGGR_INTERLACED
scanline order: B1,G1,R2,G2,...,G1,R1,G2,R2,...
Definition: bayer.h:39
BAYER_TILE_GRBG
raster is GR,BG
Definition: bayer.h:34
BayerTile
BayerTile
how the bayer CCD array is layed out
Definition: bayer.h:32
gp_bayer_expand
int gp_bayer_expand(unsigned char *input, int w, int h, unsigned char *output, BayerTile tile)
Expand a bayer raster style image to a RGB raster.
Definition: bayer.c:74
BAYER_TILE_GRBG_INTERLACED
scanline order: G1,R1,R2,G2,...,B1,G1,B2,G2,...
Definition: bayer.h:38
BAYER_TILE_GBRG_INTERLACED
scanline order: G1,B1,G2,B2,...,R1,G1,R2,G2,...
Definition: bayer.h:40
gp_bayer_interpolate
int gp_bayer_interpolate(unsigned char *image, int w, int h, BayerTile tile)
Interpolate a expanded bayer array into an RGB image.
Definition: bayer.c:145
BAYER_TILE_RGGB_INTERLACED
scanline order: R1,G1,R2,G2,...,G1,B1,G2,B2,...
Definition: bayer.h:37
gp_ahd_decode
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.
Definition: ahd_bayer.c:659
gp_ahd_interpolate
int gp_ahd_interpolate(unsigned char *image, int w, int h, BayerTile tile)
Interpolate a expanded bayer array into an RGB image.
Definition: ahd_bayer.c:419
BAYER_TILE_GBRG
raster is RG,GB
Definition: bayer.h:36
BAYER_TILE_BGGR
raster is BG,GR
Definition: bayer.h:35