Image box or rectangle color

I want to drag a rectangle on image and set color of edges of rectangle. How to start?

 Risposta accettata

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 Commenti

Nasir Ali
Nasir Ali il 29 Mag 2021
It worked. I will contact you on email for further help
I will try best to help you

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Display Image in Centro assistenza e File Exchange

Prodotti

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by