bayer.h

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, unsigned char *yuv,
00044                                                  unsigned int width, unsigned int height);
00045 
00046 void bayerGBRG_to_yuv422planar_bilinear(const unsigned char *bayer, unsigned char *yuv,
00047                                         unsigned int width, unsigned int height);
00048 void bayerGBRG_to_yuv422planar_bilinear2(const unsigned char *bayer, unsigned char *yuv,
00049                                          unsigned int width, unsigned int height);
00050 
00051 } // end namespace firevision
00052 
00053 #endif