25 #ifndef _BIAS_IMAGE_CONVERSION_H_
26 #define _BIAS_IMAGE_CONVERSION_H_
28 #include "bias_config.h"
31 #include "ImageBase.hh"
33 #ifdef BIAS_HAVE_OPENCV
34 # include <opencv2/opencv.hpp>
42 #ifdef BIAS_HAVE_IMAGEMAGICKLIB
43 # include <Base/Common/BIASpragmaStart.hh>
44 # include <Magick++.h>
45 # include <Base/Common/BIASpragmaEnd.hh>
46 # if (MagickLibVersion >= 0x643)
47 # define MagickLib MagickCore
52 #define D_IMCONV_IPL 0x00000001
56 #ifndef vidap_DEFAULT_PACKED_COLORMODEL
57 # define vidap_DEFAULT_PACKED_COLORMODEL BIAS::ImageBase::CM_PGR_XB3_F7M3_GBRG
59 #ifndef vidap_DEFAULT_BAYER_COLORMODEL
61 # define vidap_DEFAULT_BAYER_COLORMODEL BIAS::ImageBase::CM_Bayer_GBRG
115 template<
class StorageType>
128 template<
class StorageType>
138 template<
class StorageType>
141 const unsigned int channel);
147 template<
class StorageType>
156 GetChannel(
ImageBase& image,
int channel,
bool strip =
false);
161 template<
class StorageType>
168 template<
class StorageType>
177 template<
class StorageType>
188 template<
class StorageType>
200 template<
class StorageType>
210 template<
class StorageType>
216 template<
class StorageType>
236 template<
class StorageType>
245 template<
class StorageType>
250 StorageType>& Image3);
263 template<
class StorageType>
266 float scale = 255.0);
288 float scale = 255.0);
294 float scale = 255.0);
298 template<
class StorageType>
301 float scale = 255.0);
310 template<
class sourceType>
311 static void ConvertRGBToI1I2I3Worker_(
const sourceType* soP,
float* siP,
int size);
326 template <
class StorageType>
331 #ifdef BIAS_HAVE_IMAGEMAGICKLIB
349 #ifdef BIAS_HAVE_OPENCV
361 template<
class StorageType>
376 template<
class StorageType>
379 #endif // BIAS_HAVE_OPENCV
381 template<
class StorageType>
385 template<
class StorageType>
389 template<
class StorageType>
393 template<
class StorageType>
397 template <
class StorageType>
401 template<
class StorageType>
405 template<
class StorageType>
409 template<
class StorageType>
412 template<
class StorageType>
416 template<
class StorageType>
423 template<
class StorageType>
427 template<
class StorageType>
434 template<
class StorageType>
446 template<
class StorageType>
449 template<
class StorageType>
450 static int BayerToRGBSimple(
const StorageType* source, StorageType* dest,
int sx,
int sy,
ImageBase::EColorModel tile);
460 template<
class StorageType> BIASImageBase_EXPORT
461 static int HSVToRGB(
const StorageType h,
const StorageType s,
const StorageType v,
462 StorageType &r, StorageType &g, StorageType &b);
470 template<
class StorageType>
476 template<
class StorageType>
483 template<
class StorageType>
484 static int BayerToRGBSimple_(
const StorageType* source, StorageType* dest,
int sx,
int sy,
ImageBase::EColorModel tile);
485 template<
class StorageType>
486 static int BayerToRGBBilinear_(
const StorageType* source, StorageType* dest,
int sx,
int sy,
ImageBase::EColorModel tile);
487 template<
class StorageType>
488 static int BayerToRGBNearestNeighbour_(
const StorageType* source, StorageType* dest,
int sx,
int sy,
ImageBase::EColorModel tile);
489 static int BayerToRGBHQLinear_(
const unsigned char* source,
unsigned char* dest,
int sx,
int sy,
ImageBase::EColorModel tile);
490 static int BayerToRGBHQLinear_(
const unsigned short* source,
unsigned short* dest,
int sx,
int sy,
ImageBase::EColorModel tile,
int bits);
491 template<
class StorageType>
492 static int BayerToRGBAHD_(
const StorageType* source, StorageType* dest,
int sx,
int sy,
ImageBase::EColorModel tile,
int bits);
493 template<
class StorageType>
494 static void ClearBorders_(StorageType *rgb,
int sx,
int sy,
int w);
496 template<
class StorageType>
497 static void CLIP(StorageType& in, StorageType& out);
498 template<
class StorageType>
499 static void CLIP16(StorageType& in, StorageType& out, StorageType bits);
503 template<
class StorageType>
508 template<
class StorageType>
512 template<
class StorageType>
517 template<
class StorageType>
521 template<
class StorageType>
526 template<
class StorageType>
531 template<
class StorageType>
538 template<
class StorageType>
542 template<
class StorageType>
547 template<
class StorageType>
551 template<
class StorageType>
555 template<
class StorageType>
559 template<
class StorageType>
563 template<
class StorageType>
567 template<
class StorageType>
592 #ifdef BUILD_IMAGE_INT
594 static int RGBTohsL_(
const Image<int>& source,
EColorModel
These are the most often used color models.
BayerDemosaicMethod
methods for conversion from bayer to rgb
class with static functions for converting all kinds of color formats and storage types ...
static dv_decoder_t * DVDecoder_
The image template class for specific storage types.
This is the base class for images in BIAS.