typedef struct EXOBJ_OPTIONS 
   L_UINT64 uStructSize; 
   L_UINT uFlags; 
   L_RECT * pROI; 
   L_INT nSmallNoiseThreshold; 
   L_INT nLargeNoiseThreshold; 
   L_UINT uContainerMinCount; 
   L_DOUBLE dTableMaxBorderPercent; 
   L_INT nTableSizeThreshold; 
   EXOBJ_COLORINFO * pColorInfo; 
   L_UINT uColorInfoCount; 
   L_INT nMaxObjectCount; 

Provides the options for extracting the objects.


L_UINT64 uStructSize

Size of this structure in bytes, for versioning. Use the sizeof(EXOBJ_OPTIONS) operator to calculate this value.

L_UINT uFlags

Flags must be a combination of the following values:

Value Meaning
EXOBJ_8_CONNECTIVITY [0x0001] Pass to enable 8-way connectivity (diagonals), otherwise 4-way (only NSEW)
EXOBJ_OUTLINE [0x0002] Extract pixels along each object's outline
EXOBJ_DETECT_CHILDREN [0x0004] Detect the children for each object, and output as a tree of nested objects
EXOBJ_REPORT_IGNORED [0x0008] Return ignored noise/containers in their respective lists
EXOBJ_IGNORE_SMALL_NOISE [0x0010] Ignore small noise during extraction (refer to nSmallNoiseThreshold)
EXOBJ_IGNORE_LARGE_NOISE [0x0020] Ignore large noise during extraction (refer to nLargeNoiseThreshold)
EXOBJ_IGNORE_CONTAINERS [0x0040] (Requires EXOBJ_DETECT_CHILDREN) Ignore containers during extraction (refer to uContainerMinCount)
EXOBJ_CHECK_CONTAINER_SUBCHILDREN [0x0080] (Requires EXOBJ_IGNORE_CONTAINERS) Check the number of children in a container by recursing to lower objects (not just immediate children)
EXOBJ_CHECK_FOR_TABLES [0x0100] (Requires EXOBJ_CHECK_CONTAINER_SUBCHILDREN) When filtering out a container, attempt to preserve the cell containers as children (refer to dTableMaxBorderPercent)
EXOBJ_USE_MULTICOLORS [0x0200] Extract objects for each specified color level (instead of just 1 BPP)
EXOBJ_SORT_TOPLEFT [0x0400] Sort the object lists in each EXOBJ_RESULT structure (sub-lists not sorted)
EXOBJ_FLATTEN [0x0800] (Requires EXOBJ_DETECT_CHILDREN) Flatten the final lists to store the children of an object immediately after the parent, rather than in a tree structure.


Optional region of interest for extraction.

L_INT nSmallNoiseThreshold

The maximum pixel size of noise that will be considered too small.

L_INT nLargeNoiseThreshold

The minimum pixel size of noise that will be considered too large.

L_UINT uContainerMinCount

The minimum number of sub-objects within a container before ignoring.

L_DOUBLE dTableMaxBorderPercent

The maximum percentage of black pixels (estimated by the area of bounding rectangles) for a container to be considered a table.

L_INT nTableSizeThreshold

The minimum pixel size for a container to be considered a table.


Optional array of color information structures.

L_UINT uColorInfoCount

The number of items in pColorInfo.

L_INT nMaxObjectCount

The maximum number of objects to return (or 0 for all objects).


If EXOBJ_IGNORE_LARGE_NOISE and EXOBJ_IGNORE_SMALL_NOISE are both specified, iSmallNoiseThreshold must be smaller than iLargeNoiseThreshold.

If EXOBJ_USE_MULTICOLORS is specified, pColorInfo is NULL, and uColorInfoCount is 0, then the colors are pulled from BITMAPHANDLE.pPalette.

EXOBJ_SORT_TOPLEFT is applied after EXOBJ_FLATTEN and will remove the parent-child ordering in the final lists.

Containers (even if ignored) and sub-children will count towards the iMaxObjectCount threshold, while small/large noise will not.

The structure is used by:


Help Version 21.0.2021.4.7
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C API Help