Fawkes API
Fawkes Development Version
|
00001 00002 /*************************************************************************** 00003 * bayer.h - Conversion methods for bayer mosaic images 00004 * 00005 * Generated: Fri Aug 11 00:07:41 2006 00006 * Copyright 2005-2006 Tim Niemueller [www.niemueller.de] 00007 * 00008 ****************************************************************************/ 00009 00010 /* This program is free software; you can redistribute it and/or modify 00011 * it under the terms of the GNU General Public License as published by 00012 * the Free Software Foundation; either version 2 of the License, or 00013 * (at your option) any later version. A runtime exception applies to 00014 * this software (see LICENSE.GPL_WRE file mentioned below for details). 00015 * 00016 * This program is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 * GNU Library General Public License for more details. 00020 * 00021 * Read the full text in the LICENSE.GPL_WRE file in the doc directory. 00022 */ 00023 00024 #ifndef __FIREVISION_UTILS_BAYER_H_ 00025 #define __FIREVISION_UTILS_BAYER_H_ 00026 00027 namespace firevision { 00028 #if 0 /* just to make Emacs auto-indent happy */ 00029 } 00030 #endif 00031 00032 /** Bayer pattern enumeration. 00033 * This enumeration lists the differen possible bayer patterns. 00034 */ 00035 typedef enum { 00036 BAYER_PATTERN_YYYY = 0x59595959, /**< YYYY pattern (no bayer) */ 00037 BAYER_PATTERN_RGGB = 0x52474742, /**< RGGB */ 00038 BAYER_PATTERN_GBRG = 0x47425247, /**< GBRG */ 00039 BAYER_PATTERN_GRBG = 0x47524247, /**< GRBG */ 00040 BAYER_PATTERN_BGGR = 0x42474752 /**< BGGR */ 00041 } bayer_pattern_t; 00042 00043 void bayerGBRG_to_yuv422planar_nearest_neighbour(const unsigned char *bayer, 00044 unsigned char *yuv, 00045 unsigned int width, 00046 unsigned int height); 00047 00048 void bayerGRBG_to_yuv422planar_nearest_neighbour(const unsigned char *bayer, 00049 unsigned char *yuv, 00050 unsigned int width, 00051 unsigned int height); 00052 void bayerRGGB_to_yuv422planar_nearest_neighbour(const unsigned char *bayer, 00053 unsigned char *yuv, 00054 unsigned int width, 00055 unsigned int height); 00056 00057 void bayerGBRG_to_yuv422planar_bilinear(const unsigned char *bayer, unsigned char *yuv, 00058 unsigned int width, unsigned int height); 00059 void bayerGBRG_to_yuv422planar_bilinear2(const unsigned char *bayer, unsigned char *yuv, 00060 unsigned int width, unsigned int height); 00061 00062 void bayerGRBG_to_yuv422planar_bilinear(const unsigned char *bayer, 00063 unsigned char *yuv, 00064 unsigned int width, unsigned int height); 00065 00066 void bayerGRBG_to_rgb_nearest_neighbour(const unsigned char *bayer, unsigned char *rgb, 00067 unsigned int width, unsigned int height); 00068 00069 void bayerGRBG_to_rgb_bilinear(const unsigned char *bayer, unsigned char *rgb, 00070 unsigned int width, unsigned int height); 00071 00072 } // end namespace firevision 00073 00074 #endif