NormalizeImage
Normalize an image regarding its value range (e.g. stretch pixel values [50..150] to full range [0..255]) or scale the values regarding a specific normalization (e.g. L2-norm).
Syntax
Definition:
HRESULT NormalizeImage(
HRESULT hrPrev,
ITcVnImage* ipSrcImage,
ITcVnImage*& ipDestImage,
double fAlpha = 0,
double fBeta = 255,
ETcVnNormalizationType eNormType = NT_MINMAX,
ETcVnElementType eDestType = TCVN_ET_SAME_AS_SOURCE,
ITcVnImage* ipMask = nullptr
)
Parameters
Name |
Type |
Default |
Description |
---|---|---|---|
hrPrev |
|
HRESULT indicating the result of previous operations (If SUCCEEDED(hrPrev) equals false, no operation is executed.) | |
ipSrcImage |
|
Source image | |
ipDestImage |
|
Destination image (An appropriate destination image will be created if required.) | |
fAlpha |
double |
0 |
Lower range boundary (in case of normalizing the value range) or value to normalize to (||ipDestImage|| = fAlpha) |
fBeta |
double |
255 |
Upper range boundary (in case of normalizing the value range) |
eNormType |
NT_MINMAX |
Normalization type (only INF, L1, L2 or MINMAX) | |
eDestType |
TCVN_ET_SAME_AS_SOURCE |
Destination image depth (usually SAME_AS_SOURCE) | |
ipMask |
nullptr |
Mask to restrict the normalization to specific pixel positions (set 0 to normalize the whole image) |
Required License
TC3 Vision Base
System Requirements
Development environment | Target platform | PLC libraries to include |
---|---|---|
TwinCAT V3.1.4024.59 or later | PC or CX (x64) with PL50, e.g. Intel 4-core Atom CPU | Tc3_Vision |