LTI-Lib latest version v1.9 - last update 10 Apr 2010

ltiMergeHSIToImage.h

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 .......: ltiMergeHSIToImage.h
00027  * authors ....: Pablo Alvarado, Stefan Syberichs, Thomas Rusert
00028  * organization: LTI, RWTH Aachen
00029  * creation ...: 19.04.99
00030  * revisions ..: $Id: ltiMergeHSIToImage.h,v 1.3 2006/02/08 11:28:53 ltilib Exp $
00031  */
00032 
00033 #ifndef _LTI_MERGE_HSI_TO_IMAGE_H_
00034 #define _LTI_MERGE_HSI_TO_IMAGE_H_
00035 
00036 #include "ltiMergeImage.h"
00037 
00038 namespace lti {
00039 
00040   /**
00041    * Merge HSI (Hue Saturation Intensity) channels
00042    *
00043    * @ingroup gColor
00044    */
00045   class mergeHSIToImage : public mergeImage {
00046   public:
00047 
00048     /**
00049      * Constructor
00050      */
00051     mergeHSIToImage(void);
00052 
00053     /**
00054      * return the name of this type
00055      */
00056     virtual const char* getTypeName() const;
00057 
00058     /**
00059      * returns a pointer to a clone of the functor.
00060      */
00061     virtual functor* clone() const;
00062 
00063     /**
00064      * merge hue channel H, saturation S and intensity
00065      * channel I to an image
00066      * @param H the hue channel
00067      * @param S the saturation channel
00068      * @param I the intensity channel
00069      * @param img the image to be splitted
00070      */
00071     virtual bool apply(const matrix<float>& H,
00072                        const matrix<float>& S,
00073                        const matrix<float>& I,
00074                        image& img) const;
00075 
00076 
00077     /**
00078      * merge hue channel H, saturation S and intensity
00079      * channel I to an image
00080      * @param H the hue channel
00081      * @param S the saturation channel
00082      * @param I the intensity channel
00083      * @param img the image to be splitted
00084      */
00085     virtual bool apply(const channel8& H,
00086                        const channel8& S,
00087                        const channel8& I,
00088                        image& img) const;
00089 
00090     /**
00091      * merge the hue value H, saturation S and intensity value I
00092      * to a pixel
00093      * @param H the hue value
00094      * @param S the saturation value
00095      * @param I the intensity value
00096      * @param pixel the merged pixel
00097      */
00098     virtual bool apply(const float& H,
00099            const float& S,
00100            const float& I,
00101            rgbPixel& pixel) const;
00102 
00103     /**
00104      * merge the hue value H, saturation S and intensity value I
00105      * to a pixel
00106      * @param H the hue value
00107      * @param S the saturation value
00108      * @param I the intensity value
00109      * @param pixel the merged pixel
00110      */
00111     virtual bool apply(const ubyte& H,
00112            const ubyte& S,
00113            const ubyte& I,
00114            rgbPixel& pixel) const;
00115 
00116   private:
00117     /**
00118      * marix for HSI->RGB-conversion
00119      */
00120     static ubyte DeHSI[120][256];
00121   };
00122 
00123 }
00124 
00125 #endif

Generated on Sat Apr 10 15:25:51 2010 for LTI-Lib by Doxygen 1.6.1