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 .......: ltiMergeYIQToImage.h 00027 * authors ....: Pablo Alvarado, Stefan Syberichs, Thomas Rusert 00028 * organization: LTI, RWTH Aachen 00029 * creation ...: 19.04.99 00030 * revisions ..: $Id: ltiMergeYIQToImage.h,v 1.5 2007/01/05 22:53:33 alvarado Exp $ 00031 */ 00032 00033 #ifndef _LTI_MERGE_YIQ_TO_IMAGE_H_ 00034 #define _LTI_MERGE_YIQ_TO_IMAGE_H_ 00035 00036 #include "ltiMergeImage.h" 00037 00038 namespace lti { 00039 00040 /** 00041 * Merge YIQ channels (Luminance, Inphase, Quadrature) 00042 * 00043 * This is an almost forgotten color space, as the standards use now 00044 * the YCbCr, YPbPr or YUV spaces. 00045 * 00046 * @see lti::mergeYUVToImage, lti::mergeYCbCrToImage, lti::mergeYPbPrToImage 00047 * @see lti::splitImageToYIQ 00048 * 00049 * @ingroup gColor 00050 */ 00051 class mergeYIQToImage : public mergeImage { 00052 public: 00053 00054 /** 00055 * returns the name of this type 00056 */ 00057 virtual const char* getTypeName() const; 00058 00059 /** 00060 * returns a poinbter to a clone of the functor 00061 */ 00062 virtual functor* clone() const; 00063 00064 /** 00065 * merge the Y,I,Q channel to an image 00066 * YIQ merging requires unnormalized channels ! 00067 * @param Y the perceived luminance 00068 * @param I color information and some luminance 00069 * @param Q color information and some luminance 00070 * @param img the merged image 00071 */ 00072 virtual bool apply(const matrix<float>& Y, 00073 const matrix<float>& I, 00074 const matrix<float>& Q, 00075 image& img) const; 00076 00077 /** 00078 * merge the Y,I,Q channel to an image 00079 * YIQ merging requires unnormalized channels ! 00080 * @param Y the perceived luminance 00081 * @param I color information and some luminance 00082 * @param Q color information and some luminance 00083 * @param img the merged image 00084 */ 00085 virtual bool apply(const channel8& Y, 00086 const channel8& I, 00087 const channel8& Q, 00088 image& img) const; 00089 00090 /** 00091 * merge the Y,I,Q values to a pixel 00092 * YIQ merging requires unnormalized values ! 00093 * @param Y the perceived luminance 00094 * @param I color information and some luminance 00095 * @param Q color information and some luminance 00096 * @param pixel the merged pixel 00097 */ 00098 virtual bool apply(const float& Y, 00099 const float& I, 00100 const float& Q, 00101 rgbPixel& pixel) const; 00102 00103 /** 00104 * merge the Y,I,Q values to a pixel 00105 * YIQ merging requires unnormalized values ! 00106 * @param Y the perceived luminance 00107 * @param I color information and some luminance 00108 * @param Q color information and some luminance 00109 * @param pixel the merged pixel 00110 */ 00111 virtual bool apply(const ubyte& Y, 00112 const ubyte& I, 00113 const ubyte& Q, 00114 rgbPixel& pixel) const; 00115 }; 00116 } 00117 00118 #endif