Extracts object detections from images. This action allows for cropping or highlighting detected objects using various bounding box coordinate formats such as COCO, RECT, or YOLO.
| Parameter | Description |
|---|---|
| casOut | Specifies the settings for an output table. |
| coordType | Specifies the type of input format to use for the bounding boxes around the detected objects. Values: COCO, RECT (default), YOLO. |
| copyVars | Specifies the variables to copy from the input table to the output table. |
| decode | When set to True, writes decoded images and metadata to the output table. Default is FALSE. |
| extractType | Specifies the type of extract action to perform. Values: CROP, HIGHLIGHT (default). |
| image | Specifies the name of the column that contains image binaries. Default is '_image_'. |
| maxObjects | Specifies the maximum number of detected objects to extract from the image data in the input table. Default is 10. |
| outputFormat | Specifies whether to save the cropped detections from a single image in multiple columns and one row or in one column and multiple rows. Default is MULTIPLE_ROWS. |
| table | Specifies the input table that contains image data. |
Load images containing object detection data into a CAS table.
| 1 | |
| 2 | PROC CAS; |
| 3 | image.loadImages / path="images" caslib="CASUSER" casOut={name="input_data", replace=true}; |
| 4 | RUN; |
| 5 |
Extracts and highlights detected objects using default settings.
| 1 | PROC CAS; |
| 2 | image.extractDetectedObjects / |
| 3 | TABLE={name="input_data"} |
| 4 | casOut={name="highlighted_images", replace=true} |
| 5 | extractType="HIGHLIGHT"; |
| 6 | RUN; |
Crops detected objects using YOLO coordinates, limits to 5 objects, and saves as multiple rows.
| 1 | PROC CAS; |
| 2 | image.extractDetectedObjects / |
| 3 | TABLE={name="input_data"} |
| 4 | casOut={name="cropped_objects", replace=true} |
| 5 | coordType="YOLO" |
| 6 | extractType="CROP" |
| 7 | maxObjects=5 |
| 8 | outputFormat="MULTIPLE_ROWS"; |
| 9 | RUN; |