Fawkes API  Fawkes Development Version
bayer.h
1 
2 /***************************************************************************
3  * bayer.h - Conversion methods for bayer mosaic images
4  *
5  * Generated: Fri Aug 11 00:07:41 2006
6  * Copyright 2005-2006 Tim Niemueller [www.niemueller.de]
7  *
8  ****************************************************************************/
9 
10 /* This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version. A runtime exception applies to
14  * this software (see LICENSE.GPL_WRE file mentioned below for details).
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU Library General Public License for more details.
20  *
21  * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22  */
23 
24 #ifndef __FIREVISION_UTILS_BAYER_H_
25 #define __FIREVISION_UTILS_BAYER_H_
26 
27 namespace firevision {
28 #if 0 /* just to make Emacs auto-indent happy */
29 }
30 #endif
31 
32 /** Bayer pattern enumeration.
33  * This enumeration lists the differen possible bayer patterns.
34  */
35 typedef enum {
36  BAYER_PATTERN_YYYY = 0x59595959, /**< YYYY pattern (no bayer) */
37  BAYER_PATTERN_RGGB = 0x52474742, /**< RGGB */
38  BAYER_PATTERN_GBRG = 0x47425247, /**< GBRG */
39  BAYER_PATTERN_GRBG = 0x47524247, /**< GRBG */
40  BAYER_PATTERN_BGGR = 0x42474752 /**< BGGR */
41 } bayer_pattern_t;
42 
43 void bayerGBRG_to_yuv422planar_nearest_neighbour(const unsigned char *bayer,
44  unsigned char *yuv,
45  unsigned int width,
46  unsigned int height);
47 
48 void bayerGRBG_to_yuv422planar_nearest_neighbour(const unsigned char *bayer,
49  unsigned char *yuv,
50  unsigned int width,
51  unsigned int height);
52 void bayerRGGB_to_yuv422planar_nearest_neighbour(const unsigned char *bayer,
53  unsigned char *yuv,
54  unsigned int width,
55  unsigned int height);
56 
57 void bayerGBRG_to_yuv422planar_bilinear(const unsigned char *bayer, unsigned char *yuv,
58  unsigned int width, unsigned int height);
59 void bayerGBRG_to_yuv422planar_bilinear2(const unsigned char *bayer, unsigned char *yuv,
60  unsigned int width, unsigned int height);
61 
62 void bayerGRBG_to_yuv422planar_bilinear(const unsigned char *bayer,
63  unsigned char *yuv,
64  unsigned int width, unsigned int height);
65 
66 void bayerGRBG_to_rgb_nearest_neighbour(const unsigned char *bayer, unsigned char *rgb,
67  unsigned int width, unsigned int height);
68 
69 void bayerGRBG_to_rgb_bilinear(const unsigned char *bayer, unsigned char *rgb,
70  unsigned int width, unsigned int height);
71 
72 } // end namespace firevision
73 
74 #endif