Image Component Library (ICL)
|
Class to setup an images border pixels. More...
#include <ImgBorder.h>
Static Public Member Functions | |
template<class T > | |
static ICLCore_API void | fixed (Img< T > *poImage, T *ptVal) |
sets up an images border with a fixed value More... | |
static void | copy (ImgBase *poImage) |
sets up an images border by extruding the images ROI pixels towards the image border More... | |
static void | fromOther (ImgBase *poImage, ImgBase *poOther) |
copies an images border from another image More... | |
Class to setup an images border pixels.
Border pixels are all pixels, that are not within the images ROI. The ImgBorder class provides three different strategies to setup these pixels with defined values:
This strategy sets all pixels to a fixed value, that is given by a 2nd argument to the "fixed"-method. To optimize performace, this function does only allow to set up Img<T>-borders with T-values. Hence it is realized as a template function.
.................. vvvvvvvvvvvvvvvvvv ..+-------------+. vv...............v ..|.............|. vv...............v ..|.............|. --> vv...............v ..|.............|. vv...............v ..+-------------+. vv...............v .................. vvvvvvvvvvvvvvvvvv
The copy strategy is an analogue to the IPPs "ippCopyReplicateBorder_.." function. It will extrude the images ROI edges towards the images borders.
ROI Img Result .................. .......++++++++##. .....++++++++##### ..+-------------+. .....++++++++####. .....++++++++##### ..|.............|. ....+++++++######. ....+++++++####### ..|.............|. --> ....-------######. --> ....-------####### ..|.............|. ....-------######. ....-------####### ..+-------------+. ....-------####... ....-------####... .................. ....-------##..... ....-------####...
The last strategy is to copy the border pixels from another given Img.
|
static |
sets up an images border by extruding the images ROI pixels towards the image border
poImage | destination image |
|
static |
sets up an images border with a fixed value
poImage | destination image (with channel count C) |
ptVal | destination value (for each of the C channels) |
copies an images border from another image
poImage | destination image |
poOther | source image for the border data. This image must have the same size and channel count as poImage. The function will print a warning and return immediately without any changings otherwise. |