Granulometry

Computes the granulometry of a textured image using morphological operations.

Syntax

Definition:

HRESULT Granulometry(
    HRESULT                    hrPrev,
    ITcVnImage*                ipImage,
    ITcVnContainer*&           ipIntensityDiffs,
    ETcVnMorphologicalOperator eMorphType,
    ULONG                      nMinSize,
    ULONG                      nMaxSize,
    ULONG                      nStep
)

Parameters

Name

Type

Description

hrPrev

HRESULT

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

ipImage

ITcVnImage*

Source image (1 channel)

ipIntensityDiffs

ITcVnContainer*&

Returns the intensity differences between successive structuring element sizes (CTcVnContainer_Vector_LREAL), which can be used as features for texture description.

eMorphType

ETcVnMorphologicalOperator

Only opening or closing are supported.

nMinSize

ULONG

Min structuring element size (odd, >= 3)

nMaxSize

ULONG

Max structuring element size (>= nMinSize)

nStep

ULONG

Step, by which nMinSize is incremented until nMaxSize is exceeded (even, >= 2).

Granulometry 1: Return value

HRESULT

Required License

TC3 Vision Machine Learning

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