Infosys在阅读器中打开 / AI 翻译

TF7xxx - Vision · 0 次阅读

ETcVnContourRetrievalMode

Offers retrieval modes for a contour search.

Syntax

Definition:

TYPE ETcVnContourRetrievalMode :
(
    TCVN_CRM_EXTERNAL             := 0,
    TCVN_CRM_LIST                 := 1,
    TCVN_CRM_CONNECTED_COMPONENTS := 2,
    TCVN_CRM_TREE                 := 3,
    TCVN_CRM_FLOODFILL            := 4
)DINT;
END_TYPE

Values

Name

Description

TCVN_CRM_EXTERNAL

Returns only external contours.

TCVN_CRM_LIST

Returns all found contours, not considering their hierarchy.

TCVN_CRM_CONNECTED_COMPONENTS

Returns all contours with a 2-level hierarchy (External contours are assigned level 0, internal contours level 1).

TCVN_CRM_TREE

Returns all contours and their full hierarchy.

TCVN_CRM_FLOODFILL

Returns the found contours using a floodfill algorithm (only available for DINT images).

Further information

This type specifies how the contour hierarchy is to be taken into account in the contour search.

  • TCVN_CRM_EXTERNAL
    Only the outer contours are returned; inner contours are not taken into account.
    ETcVnContourRetrievalMode 1:
  • TCVN_CRM_LIST
    All contours are returned. The contour hierarchy is not taken into account.
    ETcVnContourRetrievalMode 2:
  • TCVN_CRM_CONNECTED_COMPONENTS
    All contours are returned, and a 2-level hierarchy is created. In the graphic, all contours at level 1 are shown in red, level 2 is shown in green. It is evident that the next inner contour after a level 2 contour is again on level 1.
    ETcVnContourRetrievalMode 3:
  • TCVN_CRM_TREE
    All contours are returned, and a hierarchy is created based on a tree structure. In the image level 1 is red, level 2 green, level 3 blue and level 4 yellow.
    ETcVnContourRetrievalMode 4:

Related functions