Image Component Library (ICL)
|
00001 /******************************************************************** 00002 ** Image Component Library (ICL) ** 00003 ** ** 00004 ** Copyright (C) 2006-2013 CITEC, University of Bielefeld ** 00005 ** Neuroinformatics Group ** 00006 ** Website: www.iclcv.org and ** 00007 ** http://opensource.cit-ec.de/projects/icl ** 00008 ** ** 00009 ** File : ICLCore/src/ICLCore/CCFunctions.h ** 00010 ** Module : ICLCore ** 00011 ** Authors: Christof Elbrechter, Andre Justus ** 00012 ** ** 00013 ** ** 00014 ** GNU LESSER GENERAL PUBLIC LICENSE ** 00015 ** This file may be used under the terms of the GNU Lesser General ** 00016 ** Public License version 3.0 as published by the ** 00017 ** ** 00018 ** Free Software Foundation and appearing in the file LICENSE.GPL ** 00019 ** included in the packaging of this file. Please review the ** 00020 ** following information to ensure the license requirements will ** 00021 ** be met: http://www.gnu.org/licenses/lgpl-3.0.txt ** 00022 ** ** 00023 ** The development of this software was supported by the ** 00024 ** Excellence Cluster EXC 277 Cognitive Interaction Technology. ** 00025 ** The Excellence Cluster EXC 277 is a grant of the Deutsche ** 00026 ** Forschungsgemeinschaft (DFG) in the context of the German ** 00027 ** Excellence Initiative. ** 00028 ** ** 00029 ********************************************************************/ 00030 00031 #pragma once 00032 00033 #include <ICLCore/Types.h> 00034 #include <ICLUtils/Size.h> 00035 #include <string> 00036 00037 namespace icl{ 00038 namespace core{ 00039 00041 00430 void cc(const ImgBase *src, ImgBase *dst, bool roiOnly=false); 00431 00433 00436 bool lut_available(format srcFmt, format dstFmt); 00437 00439 00443 void createLUT(format srcFmt, format dstFmt); 00444 00446 00449 void releaseLUT(format srcFmt, format dstFmt); 00450 00452 void releaseAllLUTs(); 00453 00455 enum ccimpl{ 00456 ccAvailable = 0, 00457 ccEmulated = 1, 00458 ccAdapted = 2, 00459 ccUnavailable = 3, 00460 ccImpossible = 4 00461 }; 00462 00464 00465 std::string translateCCImpl(ccimpl i); 00466 00468 ccimpl translateCCImlp(const std::string &s); 00469 00471 ccimpl cc_available(format srcFmt, format dstFmt); 00472 00473 00475 00481 void convertYUV420ToRGB8(const unsigned char *pucSrc, const utils::Size &s, Img8u* poDst); 00482 00484 00488 //void convertToARGB32Interleaved(const Img8u *poSrc, unsigned char *pucDst); 00489 00491 00500 //void convertToARGB32Interleaved(const Img32f *poSrc, Img8u *poBuffer, unsigned char *pucDst); 00501 00502 00504 00510 template<class S, class D> 00511 void planarToInterleaved(const Img<S> *src, D* dst, int dstLineStep=-1); 00512 00514 00519 template<class S, class D> 00520 void interleavedToPlanar(const S *src, Img<D> *dst, int srcLineStep=-1); 00521 00523 void cc_util_rgb_to_yuv(const icl32s r, const icl32s g, const icl32s b, icl32s &y, icl32s &u, icl32s &v); 00524 00526 void cc_util_yuv_to_rgb(const icl32s y,const icl32s u,const icl32s v, icl32s &r, icl32s &g, icl32s &b); 00527 00529 void cc_util_rgb_to_hls(const icl32f r255,const icl32f g255,const icl32f b255, icl32f &h, icl32f &l, icl32f &s); 00530 00532 void cc_util_hls_to_rgb(const icl32f h255, const icl32f l255, const icl32f sl255, icl32f &r, icl32f &g, icl32f &b); 00533 00535 void cc_util_rgb_to_chroma(const icl32f r, const icl32f g, const icl32f b, icl32f &chromaR, icl32f &chromaG); 00536 } // namespace core 00537 }