- Open any prebuilt scene in the Driving Scenario app.
- In the Driving Scenario Designer app, in the top toolbox, click on Add Camera. You will get a prompt to attach the camera sensor at your preferred position on the ego vehicle.
- In the Driving Scenario Designer app, click on the export dropdown and select Simulink Model under Simulink section.
- In the Simulink model you should be able to see a Scenario Reader block that gives object detections as output. But you still do not have images from the point of view of the camera. To achieve it, follow the steps below.
- Double click in Simulink to get a prompt to add a block. Enter Simulation 3D Camera and add it to the model.
- Once the Simulation 3D Camera is added, double click the Simulation 3D Camera block.
- In the dialog box that appears, select checkbox specify offset. Here we can set the relative translation to match with the sensor in the scenario. To find the values of these parameters, select sensors in the Driving Scenario Designer, and go to sensor placements.
- In the same dialog box, go to properties tab and set the values by matching them with camera settings in the Driving Scenario App.
- In the Simulink model, add a Simulation 3D Scene Configuration block. Double click to open the block. Set the Scene name to the prebilt scene that you had used in the Driving Scenario App.
- In the Simulink model double click to open the Scenario Reader block, and check the box next to output ego vehicle pose.
- Next, add a CuboidTo3DSimulation and Simulation3DVehicle block. The image below point 12 describes how to set the signals.
- Once all these steps are completed, the Simulation 3D Camera will return a frame as an output, which contains the image from the point of view of the camera on the ego vehicle.
Image extraction in Driving scenario Designer
1 view (last 30 days)
Show older comments
Hi Team,
I am looking for Image extraction for detection part in Driving scenario Designer,the view of image from camera point of view, Please do let me know how to check it.
0 Comments
Accepted Answer
Pratyush
on 16 Jun 2023
Hi Rajini.
It is my understanding that you have a driving scenario and you would like to get images from the point of view of the camera for object detection. You can follow the following steps to achieve the above. I am assuming that you are familiar with the basic import/export in Driving Scenario Designer app.
Here are some additional images describing the process.
Here are some additional resources to help you with the above.
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!