latest version v1.9 - last update 10 Apr 2010 |
00001 /* 00002 * Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 00003 * Lehrstuhl fuer Technische Informatik, RWTH-Aachen, Germany 00004 * 00005 * This file is part of the LTI-Computer Vision Library (LTI-Lib) 00006 * 00007 * The LTI-Lib is free software; you can redistribute it and/or 00008 * modify it under the terms of the GNU Lesser General Public License (LGPL) 00009 * as published by the Free Software Foundation; either version 2.1 of 00010 * the License, or (at your option) any later version. 00011 * 00012 * The LTI-Lib is distributed in the hope that it will be 00013 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty 00014 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU Lesser General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU Lesser General Public 00018 * License along with the LTI-Lib; see the file LICENSE. If 00019 * not, write to the Free Software Foundation, Inc., 59 Temple Place - 00020 * Suite 330, Boston, MA 02111-1307, USA. 00021 */ 00022 00023 00024 /*---------------------------------------------------------------- 00025 * project ....: LTI Digital Image/Signal Processing Library 00026 * file .......: ltiMergeRGBToImage.h 00027 * authors ....: Pablo Alvarado, Stefan Syberichs, Thomas Rusert 00028 * organization: LTI, RWTH Aachen 00029 * creation ...: 19.04.99 00030 * revisions ..: $Id: ltiMergeRGBToImage.h,v 1.4 2006/02/08 11:29:43 ltilib Exp $ 00031 */ 00032 00033 #ifndef _LTI_MERGE_RGB_TO_IMAGE_H_ 00034 #define _LTI_MERGE_RGB_TO_IMAGE_H_ 00035 00036 #include "ltiMergeImage.h" 00037 00038 namespace lti { 00039 00040 /** 00041 * Merge RGB channels 00042 * 00043 * Merge the three given channels in a color image. 00044 * @see splitImageToRGB 00045 * @ingroup gColor 00046 */ 00047 class mergeRGBToImage : public mergeImage { 00048 public: 00049 /** 00050 * returns the name of this type 00051 */ 00052 virtual const char* getTypeName() const; 00053 00054 /** 00055 * returns a pointer to a clone of the functor. 00056 */ 00057 virtual functor* clone() const; 00058 00059 /** 00060 * merge the channels red, green and blue to an image 00061 * @param red the red channel 00062 * @param green the green channel 00063 * @param blue the blue channel 00064 * @param img the merged image 00065 */ 00066 virtual bool apply(const matrix<float>& red, 00067 const matrix<float>& green, 00068 const matrix<float>& blue, 00069 image& img) const; 00070 00071 /** 00072 * merge the channels red, green and blue to an image 00073 * @param red the red channel 00074 * @param green the green channel 00075 * @param blue the blue channel 00076 * @param img the merged image 00077 */ 00078 virtual bool apply(const channel8& red, 00079 const channel8& green, 00080 const channel8& blue, 00081 image& img) const; 00082 00083 /** 00084 * Merge the channels red, green, blue and the dummy (or alpha) to an image 00085 * @param red the red channel 00086 * @param green the green channel 00087 * @param blue the blue channel 00088 * @param alpha the alpha or dummy channel 00089 * @param img the merged image 00090 */ 00091 bool apply(const matrix<float>& red, 00092 const matrix<float>& green, 00093 const matrix<float>& blue, 00094 const matrix<float>& alpha, 00095 image& img) const; 00096 00097 /** 00098 * Merge the channels red, green, blue and the dummy (or alpha) to an image 00099 * @param red the red channel 00100 * @param green the green channel 00101 * @param blue the blue channel 00102 * @param alpha the alpha or dummy channel 00103 * @param img the merged image 00104 */ 00105 bool apply(const channel8& red, 00106 const channel8& green, 00107 const channel8& blue, 00108 const channel8& alpha, 00109 image& img) const; 00110 00111 /** 00112 * merge the values red, green and blue to a pixel. 00113 * @param red the red value 00114 * @param green the green value 00115 * @param blue the blue value 00116 * @param pixel the pixel to be splitted 00117 */ 00118 virtual bool apply(const float& red, 00119 const float& green, 00120 const float& blue, 00121 rgbPixel& pixel) const; 00122 00123 /** 00124 * merge the values red, green and blue to a pixel 00125 * @param red the red value 00126 * @param green the green value 00127 * @param blue the blue value 00128 * @param pixel the merged pixel 00129 */ 00130 virtual bool apply(const ubyte& red, 00131 const ubyte& green, 00132 const ubyte& blue, 00133 rgbPixel& pixel) const; 00134 }; 00135 } 00136 00137 #endif