Extract Image from Detection Results
Description
This operator extracts corresponding image regions from the original image based on 2D detection results (polygons/masks). It supports multiple extraction shapes and styles, aiding in visual localized analysis or data preparation for subsequent tasks.
Scenarios
-
Secondary recognition: Detect the approximate location of objects, crop them out, then run finer recognition or classification.
-
Defect detection: Extract only the object region and remove background clutter so that defect analysis can focus on the object in later steps.
-
Data cleansing: Extract and save specific targets for building training datasets.
Inputs and Outputs
Inputs |
Detection Results: Returns a list containing class, score, polygon, and angle information. Image: Image. |
Outputs |
Masked Image List: List of extracted images. 2D ROI: A 2x2 ROI list represented as [{min: [min_pixel_row, min_pixel_col], max: [max_pixel_row, max_pixel_col]}]. |
Parameters
Shape Type
Description |
Selects the geometric shape rule used when extracting target regions. |
Tuning Instructions |
|
Parameter Range |
Values/Range:
Default: Minimum bounding rectangle |
Bounding Box Scale Ratio
Description |
Controls the enlargement or shrinkage of the target region relative to the original detection area. |
Tuning Instructions |
|
Parameter Range |
Values/Range: [0.01, 10000.0] Default: 1.0 |
Mask Edge Only
Description |
Only extracts the pixels along the object’s contour edge instead of the entire mask interior. Active only when the shape type is 'Polygon'. |
Parameter Range |
Values/Range:
Default: False |
Edge Thickness
Description |
Sets the pixel width for contour extraction when 'Edge Only' is enabled. |
Tuning Instructions |
|
Parameter Range |
Values/Range: [1, 50] Default: 1 |
Enable Invert
Description |
Inverts the image extraction logic. |
Tuning Instructions |
|
Parameter Range |
Default: False |
Merge into One Result
Description |
Controls the output list format when multiple objects are detected. |
Tuning Instructions |
|
Parameter Range |
Values/Range:
Default: False |
Keep Original Image Size
Description |
Sets the output image size strategy (effective only when 'Reverse' is False). |
Tuning Instructions |
|
Parameter Range |
Values/Range:
Default: True |