Image box or rectangle color
4 views (last 30 days)
Show older comments
Nasir Ali
on 29 May 2021
Commented: Khalid Mahmood
on 29 May 2021
I want to drag a rectangle on image and set color of edges of rectangle. How to start?
0 Comments
Accepted Answer
Khalid Mahmood
on 29 May 2021
I hope you want this
set(gcf,'Units','normalized')
im=imread('peppers.png');
imshow(im);
k = waitforbuttonpress;
rect_pos = rbbox;
annotation('rectangle',rect_pos,'Color','red')
2 Comments
More Answers (0)
See Also
Categories
Find more on Image Data Workflows in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!