Select a specific area of an RGB image
1 次查看(过去 30 天)
显示 更早的评论
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
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
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);
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Processing Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!