Image Component Library (ICL)
CCFunctions.h
Go to the documentation of this file.
1 /********************************************************************
2 ** Image Component Library (ICL) **
3 ** **
4 ** Copyright (C) 2006-2013 CITEC, University of Bielefeld **
5 ** Neuroinformatics Group **
6 ** Website: www.iclcv.org and **
7 ** http://opensource.cit-ec.de/projects/icl **
8 ** **
9 ** File : ICLCore/src/ICLCore/CCFunctions.h **
10 ** Module : ICLCore **
11 ** Authors: Christof Elbrechter, Andre Justus **
12 ** **
13 ** **
14 ** GNU LESSER GENERAL PUBLIC LICENSE **
15 ** This file may be used under the terms of the GNU Lesser General **
16 ** Public License version 3.0 as published by the **
17 ** **
18 ** Free Software Foundation and appearing in the file LICENSE.LGPL **
19 ** included in the packaging of this file. Please review the **
20 ** following information to ensure the license requirements will **
21 ** be met: http://www.gnu.org/licenses/lgpl-3.0.txt **
22 ** **
23 ** The development of this software was supported by the **
24 ** Excellence Cluster EXC 277 Cognitive Interaction Technology. **
25 ** The Excellence Cluster EXC 277 is a grant of the Deutsche **
26 ** Forschungsgemeinschaft (DFG) in the context of the German **
27 ** Excellence Initiative. **
28 ** **
29 ********************************************************************/
30 
31 #pragma once
32 
33 #include <ICLUtils/CompatMacros.h>
34 #include <ICLCore/Types.h>
35 #include <ICLUtils/Size.h>
36 #include <string>
37 #include <ICLUtils/Macros.h>
38 
39 namespace icl{
40  namespace core{
41 
43 
449  ICLCore_API void cc(const ImgBase *src, ImgBase *dst, bool roiOnly=false);
450 
452 
455  ICLCore_API bool lut_available(format srcFmt, format dstFmt);
456 
458 
462  ICLCore_API void createLUT(format srcFmt, format dstFmt);
463 
465 
468  ICLCore_API void releaseLUT(format srcFmt, format dstFmt);
469 
472 
474  enum ccimpl{
477  ccAdapted = 2,
480  };
481 
483 
484  ICLCore_API std::string translateCCImpl(ccimpl i);
485 
487  ICLCore_API ccimpl translateCCImlp(const std::string &s);
488 
490  ICLCore_API ccimpl cc_available(format srcFmt, format dstFmt);
491 
492 
494 
500  ICLCore_API void convertYUV420ToRGB8(const unsigned char *pucSrc, const utils::Size &s, Img8u* poDst);
501 
503 
507  //void convertToARGB32Interleaved(const Img8u *poSrc, unsigned char *pucDst);
508 
510 
519  //void convertToARGB32Interleaved(const Img32f *poSrc, Img8u *poBuffer, unsigned char *pucDst);
520 
521 
523 
529  template<class S, class D> ICLCore_API
530  void planarToInterleaved(const Img<S> *src, D* dst, int dstLineStep = -1);
531 
533 
538  template<class S, class D> ICLCore_API
539  void interleavedToPlanar(const S *src, Img<D> *dst, int srcLineStep = -1);
540 
541 
543  ICLCore_API void cc_util_rgb_to_yuv(const icl32s r, const icl32s g, const icl32s b, icl32s &y, icl32s &u, icl32s &v);
544 
546  ICLCore_API void cc_util_yuv_to_rgb(const icl32s y, const icl32s u, const icl32s v, icl32s &r, icl32s &g, icl32s &b);
547 
549  ICLCore_API void cc_util_rgb_to_hls(const icl32f r255, const icl32f g255, const icl32f b255, icl32f &h, icl32f &l, icl32f &s);
550 
552  ICLCore_API void cc_util_hls_to_rgb(const icl32f h255, const icl32f l255, const icl32f sl255, icl32f &r, icl32f &g, icl32f &b);
553 
555  ICLCore_API void cc_util_rgb_to_chroma(const icl32f r, const icl32f g, const icl32f b, icl32f &chromaR, icl32f &chromaG);
556 
558  void cc_util_rgb_to_lab(const icl32f &r, const icl32f &g, const icl32f &b, icl32f &L, icl32f &A, icl32f &B);
559  } // namespace core
560 }
ICLCore_API void convertYUV420ToRGB8(const unsigned char *pucSrc, const utils::Size &s, Img8u *poDst)
Convert an image in YUV420-format to RGB8 format (ippi accelerated)
ICLCore_API std::string translateCCImpl(ccimpl i)
translates a ccimpl enum into a string representation
undocument this line if you encounter any issues!
Definition: Any.h:37
ICLCore_API void cc_util_rgb_to_chroma(const icl32f r, const icl32f g, const icl32f b, icl32f &chromaR, icl32f &chromaG)
converts given (r,g,b) pixel into the RG-chroma format
ICLCore_API void createLUT(format srcFmt, format dstFmt)
Internally creates a lookup table to accelerate conversion between given formats.
ICLCore_API void cc_util_yuv_to_rgb(const icl32s y, const icl32s u, const icl32s v, icl32s &r, icl32s &g, icl32s &b)
converts given (y,u,v) pixel into the rgb format
Definition: CCFunctions.h:476
ICLCore_API void releaseLUT(format srcFmt, format dstFmt)
releases the internal lookup table created with createLUT
ICLCore_API void cc(const ImgBase *src, ImgBase *dst, bool roiOnly=false)
Color conversion from source to destination image.
ICLCore_API void releaseAllLUTs()
releases all lookup tables that were created with createLUT
ICLCore_API void cc_util_rgb_to_hls(const icl32f r255, const icl32f g255, const icl32f b255, icl32f &h, icl32f &l, icl32f &s)
converts given (r,g,b) pixel into the hls format
Definition: CCFunctions.h:479
ICLCore_API ccimpl translateCCImlp(const std::string &s)
translates the string represenation of a
format
determines the color-format, that is associated with the images channels
Definition: Types.h:70
Ipp32s icl32s
32bit signed integer type for the ICL
Definition: BasicTypes.h:58
ICLCore_API void cc_util_hls_to_rgb(const icl32f h255, const icl32f l255, const icl32f sl255, icl32f &r, icl32f &g, icl32f &b)
converts given (h,l,s) pixel into the rgb format
Ipp32f icl32f
32Bit floating point type for the ICL
Definition: BasicTypes.h:55
ICLCore_API ccimpl cc_available(format srcFmt, format dstFmt)
returns the ccimpl state to a conversion from srcFmt to dstFmt
Img< icl8u > Img8u
typedef for 8bit integer images
Definition: Types.h:42
Size class of the ICL.
Definition: Size.h:61
Definition: CCFunctions.h:475
Definition: CCFunctions.h:477
ICLCore_API bool lut_available(format srcFmt, format dstFmt)
returns whether a lookup table was already created for src and dst format
void cc_util_rgb_to_lab(const icl32f &r, const icl32f &g, const icl32f &b, icl32f &L, icl32f &A, icl32f &B)
converts given (r,g,b) pixel into the Lab format
Definition: CCFunctions.h:478
ICLCore_API void planarToInterleaved(const Img< S > *src, D *dst, int dstLineStep=-1)
Convert an 4 channel Img8u into Qts ARGB32 interleaved format.
ICLCore_API void interleavedToPlanar(const S *src, Img< D > *dst, int srcLineStep=-1)
Converts interleaved image data into planar representation.
ICLCore_API void cc_util_rgb_to_yuv(const icl32s r, const icl32s g, const icl32s b, icl32s &y, icl32s &u, icl32s &v)
converts given (r,g,b) pixel into the yuv format
ccimpl
Internal used type, that describes an implementation type of a specific color conversion function.
Definition: CCFunctions.h:474
#define ICLCore_API
Definition: CompatMacros.h:174