Select a specific area of an RGB image

1 Ansicht (letzte 30 Tage)
Riccardo Rossi
Riccardo Rossi am 1 Mär. 2019
Bearbeitet: KALYAN ACHARJYA am 1 Mär. 2019
Hi everybody,
i have an RGB image and i want to select (not cut) a specific area with the following dimensions: [Xmin Ymin width length].
How can i do it?
Thank you so much!
  1 Kommentar
KALYAN ACHARJYA
KALYAN ACHARJYA am 1 Mär. 2019
Bearbeitet: KALYAN ACHARJYA am 1 Mär. 2019
Define four spatial co-ordinates.
Please elaborate, is there any issue?
or
RGB=insertShape(I,'rectangle',[Position],'LineWidth',xx);

Melden Sie sich an, um zu kommentieren.

Antworten (1)

KALYAN ACHARJYA
KALYAN ACHARJYA am 1 Mär. 2019
Bearbeitet: KALYAN ACHARJYA am 1 Mär. 2019
Are you looking for this one?
im=imread('test.jpg');
%[Xmin Ymin width length].
%Values are for example purpose only
Xmin=24;
Ymin=25;
length=20;
width=20;
%%
result=insertShape(im,'rectangle',[Xmin Ymin Xmin+length Ymin+width],'LineWidth',2);
imshow(result);

Kategorien

Mehr zu Read, Write, and Modify Image finden Sie in Help Center und File Exchange

Produkte


Version

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by