F_VN_RemoveLocalMinima

F_VN_RemoveLocalMinima 1:

Remove local minima up to a given height from a gray-scale single-channel image.

Syntax

Definition:

FUNCTION F_VN_RemoveLocalMinima : HRESULT
VAR_INPUT
    ipSrcImage  : ITcVnImage;
    ipDestImage : Reference To ITcVnImage;
    fHeight     : LREAL;
    hrPrev      : HRESULT;
END_VAR

F_VN_RemoveLocalMinima 2: Inputs

Name

Type

Description

ipSrcImage

ITcVnImage

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 minima to be removed (must be greater than 0)

hrPrev

HRESULT

HRESULT indicating the result of previous operations (If SUCCEEDED(hrPrev) equals false, no operation is executed.)

F_VN_RemoveLocalMinima 3: Return value

HRESULT

Weiterführende Informationen

Die Funktion F_VN_RemoveLocalMinima entfernt lokale Minima aus dem Eingangsbild.

Parameter

Eingangsbild

Das Eingangsbild ipSrcImage darf nur einen Kanal haben und muss einen der folgenden Element-Typen haben: USINT, UINT, INT, REAL oder LREAL.

Ergebnisbild

Das Ergebnisbild ipDestImage gibt das Bild zurück, in dem die lokalen Minima entfernt wurden.

Maximal-Höhe

Die Maximal-Höhe fHeight definiert, bis zu welcher Höhe Minima im Eingangsbild entfernt werden. Die Höhe beschreibt dabei die Intensitätsdifferenz zwischen dem Minimum und dem Wert, auf den die betroffenen Pixel gesetzt werden. fHeight muss größer als 0 sein.

Anwendung

Das Entfernen von lokalen Minima bis zu einer Höhe von 10 sieht z.B. so aus:

hr := F_VN_RemoveLocalMinima(
    ipSrcImage      :=  ipImageIn,
    ipDestImage     :=  ipImageRes,
    fHeight         :=  10,
    hrPrev          :=  hr
);

Beispiele

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