Image Component Library (ICL)
|
General Image Converter. More...
#include <Converter.h>
Public Types | |
enum | oporder { orderScaleConvertCC = 12, orderScaleCCConvert = 21, orderConvertScaleCC = 102, orderConvertCCScale = 201, orderCCScaleConvert = 120, orderCCConvertScale = 210 } |
enum to define internal used operation order More... | |
Public Member Functions | |
Converter (bool applyToROIOnly=false) | |
constructor More... | |
Converter (oporder o, bool applyToROIOnly=false) | |
other constructor More... | |
Converter (const ImgBase *srcImage, ImgBase *dstImage, bool applyToROIOnly=false) | |
creates a converter, and converts the srcImage to dstImage immediately More... | |
~Converter () | |
destructor More... | |
void | apply (const ImgBase *src, ImgBase *dst) |
image conversion function More... | |
void | setApplyToROIOnly (bool applyToROIOnly) |
sets up the converter to apply operations on the source images roi only More... | |
void | setOperationOrder (oporder o) |
Sets up the operation order for this converter. More... | |
void | setScaleMode (scalemode scaleMode) |
sets a new scale interpolation method (default is interpolateNN) More... | |
Private Member Functions | |
void | dynamicConvert (const ImgBase *src, ImgBase *dst) |
converts dependent on the destination images depth More... | |
void | cc (const ImgBase *src, ImgBase *dst) |
internally used conversion function More... | |
Private Attributes | |
ImgBase * | m_poSizeBuffer |
Buffer for size conversion. More... | |
ImgBase * | m_poCCBuffer |
Buffer for emulated color conversin using Converter::cc(...) More... | |
ImgBase * | m_poDepthBuffer |
Buffer for depth conversion. More... | |
ImgBase * | m_poROIBuffer |
Buffer for ROI extraction. More... | |
ImgBase * | m_poColorBuffer |
Buffer for color conversion. More... | |
bool | m_bROIOnly |
flag that indicates whether to work on source images ROI or on the whole sorce image More... | |
oporder | m_eOpOrder |
currently set operation order More... | |
scalemode | m_scaleMode |
internal scalemode More... | |
Additional Inherited Members | |
Protected Member Functions inherited from icl::utils::Uncopyable | |
Uncopyable () | |
Empty base constructor. More... | |
General Image Converter.
The Converter wraps and summarizes all image conversion routines, including depth change, scaling and color conversion. It provides all necessary buffers to do several of these changes in series. Simply provide the desired output format to dst of the apply function, and this method will select the appropriate conversion steps.
If demanded, the converter provides an interface to specify the order of the different operations.
icl::core::Converter::Converter | ( | bool | applyToROIOnly = false | ) |
constructor
applyToROIOnly | if true, the source images ROI only is used instead of the whole src image. |
icl::core::Converter::Converter | ( | oporder | o, |
bool | applyToROIOnly = false |
||
) |
other constructor
o | operation order |
applyToROIOnly | if true, the source images ROI only is used instead of the whole src image. |
icl::core::Converter::Converter | ( | const ImgBase * | srcImage, |
ImgBase * | dstImage, | ||
bool | applyToROIOnly = false |
||
) |
creates a converter, and converts the srcImage to dstImage immediately
icl::core::Converter::~Converter | ( | ) |
destructor
image conversion function
Although this function looks like the iclcc function located in the iclcc.h, it brings some additional functionalities (see class description).
src | source image |
dst | destination imagetransfers the image data from the source image into the image data of the destination image |
src | source image |
dst | destination image |
internally used conversion function
This function wraps the icl::cc function and optimizes its performance by using the Converter objects internally hold color conversion buffer for "emulated" color conversions. (E.g. HLStoYUV, is emulated by HLSToRGB followed by RGBToYUV. icl::cc stores the result of HLSToRGB in a temporarily allocated and released image buffer. The Converter uses an persistent buffer of the Converter object.) This will speed up cross format conversions in looped applications.
src | source image |
dst | destination image |
converts dependent on the destination images depth
|
inline |
sets up the converter to apply operations on the source images roi only
|
inline |
Sets up the operation order for this converter.
In many cases it is necessary to apply two or three different operations after another to convert the source image into the given destination image. Possible operation are:
o | new operation order definition |
void icl::core::Converter::setScaleMode | ( | scalemode | scaleMode | ) |
sets a new scale interpolation method (default is interpolateNN)
|
private |
flag that indicates whether to work on source images ROI or on the whole sorce image
|
private |
currently set operation order
|
private |
Buffer for emulated color conversin using Converter::cc(...)
|
private |
Buffer for color conversion.
|
private |
Buffer for depth conversion.
|
private |
Buffer for ROI extraction.
|
private |
Buffer for size conversion.
|
private |
internal scalemode