libgphoto2 photo camera library (libgphoto2) API  2.5.28
bayer.h
Go to the documentation of this file.
1 
24 #ifndef LIBGPHOTO2_BAYER_H
25 #define LIBGPHOTO2_BAYER_H
26 
27 
28 #include "libgphoto2/bayer-types.h"
29 
30 
31 int gp_bayer_expand (unsigned char *input, int w, int h, unsigned char *output,
32  BayerTile tile);
33 int gp_bayer_decode (unsigned char *input, int w, int h, unsigned char *output,
34  BayerTile tile);
35 int gp_bayer_interpolate (unsigned char *image, int w, int h, BayerTile tile);
36 /*
37  * The following two functions use an alternative procedure called Adaptive
38  * Homogeneity-directed demosaicing instead of the standard bilinear
39  * interpolation with basic edge-detection method used in the previous two
40  * functions. To use or test this method of Bayer interpolation, just use
41  * gp_ahd_decode() in the same way and in the same place as gp_bayer_decode()
42  * is used.
43  */
44 
45 int gp_ahd_decode (unsigned char *input, int w, int h, unsigned char *output,
46  BayerTile tile);
47 int gp_ahd_interpolate (unsigned char *image, int w, int h, BayerTile tile);
48 
49 #endif /* !defined(LIBGPHOTO2_BAYER_H) */
BAYER_TILE_GRBG_INTERLACED
@ BAYER_TILE_GRBG_INTERLACED
scanline order: G1,R1,R2,G2,...,B1,G1,B2,G2,...
Definition: bayer-types.h:39
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:371
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:371
bayer-types.h
bayer type definitions common to camlibs and libgphoto2
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:75
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:147
BAYER_TILE_RGGB
@ BAYER_TILE_RGGB
raster is RG,GN
Definition: bayer-types.h:34
BayerTile
BayerTile
how the bayer CCD array is laid out
Definition: bayer-types.h:33
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:640
BAYER_TILE_RGGB_INTERLACED
@ BAYER_TILE_RGGB_INTERLACED
scanline order: R1,G1,R2,G2,...,G1,B1,G2,B2,...
Definition: bayer-types.h:38
BAYER_TILE_BGGR
@ BAYER_TILE_BGGR
raster is BG,GR
Definition: bayer-types.h:36
BAYER_TILE_GBRG_INTERLACED
@ BAYER_TILE_GBRG_INTERLACED
scanline order: G1,B1,G2,B2,...,R1,G1,R2,G2,...
Definition: bayer-types.h:41
BAYER_TILE_GRBG
@ BAYER_TILE_GRBG
raster is GR,BG
Definition: bayer-types.h:35
gphoto2-result.h
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:147
GP_OK
#define GP_OK
Everything is OK.
Definition: gphoto2-port-result.h:30
GP_LOG_DEBUG
@ GP_LOG_DEBUG
Log message is an debug information.
Definition: gphoto2-port-log.h:37
GP_ERROR
#define GP_ERROR
Generic Error.
Definition: gphoto2-port-result.h:34
BAYER_TILE_GBRG
@ BAYER_TILE_GBRG
raster is RG,GB
Definition: bayer-types.h:37
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:75
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:418
gphoto2-port-log.h
BAYER_TILE_BGGR_INTERLACED
@ BAYER_TILE_BGGR_INTERLACED
scanline order: B1,G1,R2,G2,...,G1,R1,G2,R2,...
Definition: bayer-types.h:40
gp_log
void gp_log(GPLogLevel level, const char *domain, const char *format,...)
Log a debug or error message.
Definition: gphoto2-port-log.c:319
bayer.h