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
27namespace firevision {
28
29/** Bayer pattern enumeration.
30 * This enumeration lists the differen possible bayer patterns.
31 */
32typedef enum {
33 BAYER_PATTERN_YYYY = 0x59595959, /**< YYYY pattern (no bayer) */
34 BAYER_PATTERN_RGGB = 0x52474742, /**< RGGB */
35 BAYER_PATTERN_GBRG = 0x47425247, /**< GBRG */
36 BAYER_PATTERN_GRBG = 0x47524247, /**< GRBG */
37 BAYER_PATTERN_BGGR = 0x42474752 /**< BGGR */
38} bayer_pattern_t;
39
40void bayerGBRG_to_yuv422planar_nearest_neighbour(const unsigned char *bayer,
41 unsigned char * yuv,
42 unsigned int width,
43 unsigned int height);
44
45void bayerGRBG_to_yuv422planar_nearest_neighbour(const unsigned char *bayer,
46 unsigned char * yuv,
47 unsigned int width,
48 unsigned int height);
49void bayerRGGB_to_yuv422planar_nearest_neighbour(const unsigned char *bayer,
50 unsigned char * yuv,
51 unsigned int width,
52 unsigned int height);
53
54void bayerGBRG_to_yuv422planar_bilinear(const unsigned char *bayer,
55 unsigned char * yuv,
56 unsigned int width,
57 unsigned int height);
58void bayerGBRG_to_yuv422planar_bilinear2(const unsigned char *bayer,
59 unsigned char * yuv,
60 unsigned int width,
61 unsigned int height);
62
63void bayerGRBG_to_yuv422planar_bilinear(const unsigned char *bayer,
64 unsigned char * yuv,
65 unsigned int width,
66 unsigned int height);
67
68void bayerGRBG_to_rgb_nearest_neighbour(const unsigned char *bayer,
69 unsigned char * rgb,
70 unsigned int width,
71 unsigned int height);
72
73void bayerGRBG_to_rgb_bilinear(const unsigned char *bayer,
74 unsigned char * rgb,
75 unsigned int width,
76 unsigned int height);
77
78} // end namespace firevision
79
80#endif