Scénario de test & Cas d'usage
Create a table for a single, complex driving scene. It includes a base image, a segmentation mask for the drivable area, protobuf data for object detection bounding boxes, and line coordinates for the planned vehicle path.
| 1 | DATA casuser.driving_scene; |
| 2 | LENGTH _image_ $10 _segmentation_mask_ $10 _protobuf_ $1024 _planned_path_ $256 scene_id $10; |
| 3 | scene_id = 'scene_098'; |
| 4 | /* Protobuf would be a binary blob in reality, here a string placeholder */ |
| 5 | _protobuf_ = '...complex protobuf data...'; |
| 6 | /* Segmentation mask is also a binary image placeholder */ |
| 7 | _segmentation_mask_ = '...mask image...'; |
| 8 | _planned_path_ = 'x1:480,y1:720,x2:490,y2:600;x1:490,y1:600,x2:510,y2:500;x1:510,y1:500,x2:520,y2:450'; |
| 9 | _image_ = '...scene image...'; |
| 10 | OUTPUT; |
| 11 | RUN; |
| 1 | PROC CAS; |
| 2 | TABLE.loadTable / |
| 3 | caslib='casuser' path='driving_scene.sashdat' |
| 4 | casOut={name='driving_scene_input', caslib='casuser', replace=true}; |
| 5 | QUIT; |
| 1 | PROC CAS; |
| 2 | image.annotateImages / |
| 3 | TABLE={name='driving_scene_input', caslib='casuser'} |
| 4 | casOut={name='driving_scene_annotated', caslib='casuser', replace=true} |
| 5 | decode=true |
| 6 | copyVars={'scene_id'} |
| 7 | annotations=[ |
| 8 | {annotation={annotationType='SEGMENTATION', image='_segmentation_mask_', colorMap='JET', transparency=60}}, |
| 9 | {annotation={annotationType='PROTOBUF', representation={representationType='SINGLE_COLUMN', columnName='_protobuf_'}}}, |
| 10 | {annotation={annotationType='LINES', r=0, g=100, b=255, thickness=4, representation={representationType='SINGLE_COLUMN', columnName='_planned_path_'}}} |
| 11 | ]; |
| 12 | QUIT; |
A single annotated image is created in the `driving_scene_annotated` table. This image should correctly display all three layers: a semi-transparent colored overlay on the road, bounding boxes around objects like cars and pedestrians, and a distinct blue line showing the future path of the vehicle. This validates the action's capability to combine multiple, heterogeneous annotation types.