I want to insert rectangle shape to the real time image
Show older comments

MATLAB Function3:
function fakeImg = fcn(RealImg)
I = RealImg;
fakeImg = insertShape(I,"line",[10 10 40 40],Color="black",Opacity=1);
Answers (2)
Image Analyst
on 2 Aug 2023
1 vote
You might find using rectangle to draw into the overlay is faster than using insertShape to burn the rectangle into an RGB image.
Birju Patel
on 10 Aug 2023
0 votes
You can also use the Draw Shapes block in Simulink:
https://www.mathworks.com/help/vision/ref/drawshapes.html
Categories
Find more on Neighborhood and Block Processing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!