Select a specific area of an RGB image

조회 수: 2 (최근 30일)
Riccardo Rossi
Riccardo Rossi 2019년 3월 1일
편집: KALYAN ACHARJYA 2019년 3월 1일
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
KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 3월 1일
편집: KALYAN ACHARJYA 2019년 3월 1일
Define four spatial co-ordinates.
Please elaborate, is there any issue?
or
RGB=insertShape(I,'rectangle',[Position],'LineWidth',xx);

댓글을 달려면 로그인하십시오.

답변 (1개)

KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 3월 1일
편집: KALYAN ACHARJYA 2019년 3월 1일
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);

카테고리

Help CenterFile Exchange에서 Read, Write, and Modify Image에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by