/******************************************************************** ** Image Component Library (ICL) ** ** ** ** Copyright (C) 2006-2013 CITEC, University of Bielefeld ** ** Neuroinformatics Group ** ** Website: www.iclcv.org and ** ** http://opensource.cit-ec.de/projects/icl ** ** ** ** File : ICLCore/src/ICLCore/CCLUT.h ** ** Module : ICLCore ** ** Authors: Christof Elbrechter ** ** ** ** ** ** GNU LESSER GENERAL PUBLIC LICENSE ** ** This file may be used under the terms of the GNU Lesser General ** ** Public License version 3.0 as published by the ** ** ** ** Free Software Foundation and appearing in the file LICENSE.LGPL ** ** included in the packaging of this file. Please review the ** ** following information to ensure the license requirements will ** ** be met: http://www.gnu.org/licenses/lgpl-3.0.txt ** ** ** ** The development of this software was supported by the ** ** Excellence Cluster EXC 277 Cognitive Interaction Technology. ** ** The Excellence Cluster EXC 277 is a grant of the Deutsche ** ** Forschungsgemeinschaft (DFG) in the context of the German ** ** Excellence Initiative. ** ** ** ********************************************************************/ #pragma once #include #include #include #include #include namespace icl{ namespace core{ class ICLCore_API CCLUT{ public: CCLUT(format srcFmt, format dstFmt); void cc(const ImgBase *src, ImgBase *dst, bool roiOnly=false); private: Img8u m_oLUT; // format m_eSrcFmt; // format m_eDstFmt; }; /// TODO basisclass CCLUT /// unterklassen CCLUT3x3 usw /** evtl: kleinere luts durch internes runtersamplen der farbinfos z.B. factor 2 oder 4 2: 3*2 statt 3*16mb zusätzliche beschleunigung: statt yuvToRGB vielleicht ippiYUVToHLS direkt im grabber! **/ /****************** class CCLUT{ static const int OFS1 = 256; static const int OFS2 = 65536; public: CCLUT(format srcFmt, format dstFmt){ m_iSrcChan = getChannelsOfFormat(srcFmt); m_iDstChan = getChannelsOfFormat(dstFmt); int DIM = (int)pow(256,m_iSrcChan); // alloc lut memset(m_apucLUT,0,3*sizeof(icl8u*)); for(int i=0;i