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

ltiSplitImageToHLS.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 .......: ltiSplitImageToHLS.h
00027  * authors ....: Pablo Alvarado, Stefan Syberichs, Thomas Rusert
00028  * organization: LTI, RWTH Aachen
00029  * creation ...: 19.04.99
00030  * revisions ..: $Id: ltiSplitImageToHLS.h,v 1.4 2006/02/08 11:53:07 ltilib Exp $
00031  */
00032 
00033 #ifndef _LTI_SPLIT_IMAGE_TO_HLS_H_
00034 #define _LTI_SPLIT_IMAGE_TO_HLS_H_
00035 
00036 #include "ltiSplitImage.h"
00037 
00038 namespace lti {
00039 
00040   /**
00041    * Split image in its Hue - Luminance - Saturation channels
00042    *
00043    * @ingroup gColor
00044    */
00045   class splitImageToHLS : public splitImage {
00046   public:
00047     /**
00048      * returns the name of this type
00049      */
00050     virtual const char* getTypename() const;
00051 
00052     /**
00053      * returns a pointer to a clone of the functor
00054      */
00055     virtual functor* clone() const;
00056 
00057     /**
00058      * split the image in hue channel H, luminance L and saturation
00059      * channel S.
00060      * The values of each image will be between 0.0f and 1.0f
00061      * @param img the image to be splitted
00062      * @param H the hue channel
00063      * @param L the luminance channel
00064      * @param S the saturation channel
00065      */
00066     virtual bool apply(const image& img,
00067                        channel& H,
00068                        channel& L,
00069                        channel& S) const;
00070 
00071     /**
00072      * split the image in hue channel H, luminance L and saturation
00073      * channel S.
00074      * The values of each image will be between 0 and 255
00075      * @param img the image to be splitted
00076      * @param H the hue channel
00077      * @param L the luminance channel
00078      * @param S the saturation channel
00079      */
00080     virtual bool apply(const image& img,
00081                        channel8& H,
00082                        channel8& L,
00083                        channel8& S) const;
00084 
00085     /**
00086      * split the pixel in hue value H, luminance L and saturation S.
00087      * The values of each pixel will be between 0.0f and 1.0f
00088      * @param pixel the pixel to be splitted
00089      * @param H the hue value
00090      * @param L the luminance value
00091      * @param S the saturation value
00092      */
00093     virtual bool apply(const rgbPixel& pixel,
00094                        float& H,
00095                        float& L,
00096                        float& S) const;
00097 
00098     /**
00099      * split the pixel in hue value H, luminance L and saturation S.
00100      * The values of each pixel will be between 0 and 255
00101      * @param pixel the pixel to be splitted
00102      * @param H the hue value
00103      * @param L the luminance value
00104      * @param S the saturation value
00105      */
00106     virtual bool apply(const rgbPixel& pixel,
00107                        ubyte& H,
00108                        ubyte& L,
00109                        ubyte& S) const;
00110 
00111   };
00112 
00113 
00114 } // namespace lti
00115 #endif

Generated on Sat Apr 10 15:26:14 2010 for LTI-Lib by Doxygen 1.6.1