F_VN_RemoveLocalMaxima
Remove local maxima up to a given height from a gray-scale single-channel image.
Syntax
Definition:
FUNCTION F_VN_RemoveLocalMaxima : HRESULT
VAR_INPUT
ipSrcImage : ITcVnImage;
ipDestImage : Reference To ITcVnImage;
fHeight : LREAL;
hrPrev : HRESULT;
END_VAR
Inputs
Name |
Type |
Description |
---|---|---|
ipSrcImage |
Source image (USINT, UINT, INT, REAL, or LREAL, 1 channel) | |
ipDestImage |
Reference To ITcVnImage |
Destination image (An appropriate destination image will be created if required.) |
fHeight |
LREAL |
Maximum height of the maxima to be removed (must be greater than 0) |
hrPrev |
HRESULT indicating the result of previous operations (If SUCCEEDED(hrPrev) equals false, no operation is executed.) |
Further information
The function F_VN_RemoveLocalMaxima
removes local maxima from the input image.
Parameter
Input image
The input image ipSrcImage
may only have one channel and must have one of the following element types: USINT
, UINT
, INT
, REAL
or LREAL
.
Result image
The result image ipDestImage
returns the image from which the local maxima have been removed.
Maximum height
The maximum height fHeight
defines the height up to which maxima in the input image are removed. The height describes the difference in intensity between the maximum and the value to which the pixels concerned are set. fHeight
must be larger than 0
.
Application
The removal of local maxima up to a height of 10
looks like this, for example:
hr := F_VN_RemoveLocalMaxima(
ipSrcImage := ipImageIn,
ipDestImage := ipImageRes,
fHeight := 10,
hrPrev := hr
);
Samples
- Removing local extremes
Required License
TC3 Vision Base
System Requirements
Development environment | Target platform | PLC libraries to include |
---|---|---|
TwinCAT V3.1.4024.54 or later | PC or CX (x64) with PL50, e.g. Intel 4-core Atom CPU | Tc3_Vision |