image annotateImages

Autonomous Driving: Multi-Layer Scene Annotation

Scénario de test & Cas d'usage

Business Context

An autonomous vehicle's perception system identifies objects (cars, pedestrians), classifies drivable areas (road, lane markings), and plans a trajectory. This complex scenario tests the ability of `annotateImages` to overlay multiple, different types of annotations onto a single image for simulation and debugging.
About the Set : image

Image processing, manipulation, and analysis.

Discover all actions of image
Data Preparation

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.

Copied!
1DATA 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;
11RUN;

Étapes de réalisation

1
Load the complex scene data into a CAS table.
Copied!
1PROC CAS;
2 TABLE.loadTable /
3 caslib='casuser' path='driving_scene.sashdat'
4 casOut={name='driving_scene_input', caslib='casuser', replace=true};
5QUIT;
2
Apply three different annotations in a single call: a semi-transparent segmentation overlay for the drivable area, protobuf-defined bounding boxes for objects, and a blue line for the planned path.
Copied!
1PROC 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 ];
12QUIT;

Expected Result


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.