EXTRACTOBJECTS Procedure
Example 7.1 Visualize Only One Object Detection
(View the complete code for this example.)
This example shows how to use the EXTRACTOBJECTS procedure to visualize a single object detection.
The following statements highlight only one object in the original image and save the output in the mylib.objects table. This code assumes that the mylib.images_annotations table is loaded in advance. It has one image, and that image (see Figure 2) has two object detections.
proc extractobjects data=mylib.images_annotations
coordinateformat=rect maxobjects=1;
output out=mylib.objects;
run;
Output 7.1.1 shows the output image with one object highlighted.
Output 7.1.1: Visualization of One Object Detection

Note: By default, PROC EXTRACTOBJECTS assumes that coordinates are in RECT format. But you can still specify the COORDINATEFORMAT=RECT option. Therefore, ensure that the following variables are specified for each detected object in the mylib.images_annotations table (see Figure 1), where N denotes the Nth detected object:
_ObjectN__ObjectN_x_ObjectN_y_ObjectN_width_ObjectN_height