HOw to draw boundingBox/rectangle transperent over an image
43 次查看(过去 30 天)
显示 更早的评论
i i have four coordinates which correspond to (x,y,width,height) . I can draw a rectangle over an image from this script but it is a filled rectangle with redcolor i want a a bounding box or a transparent rectangle.It might be very trivial but i am not a regular coder.
I=imread('000027.jpg');
figure,imshow(I)
hold on
rectangle('Position',[203, 147, 218, 162],'FaceColor','r')
Thanks guys
0 个评论
采纳的回答
Image Analyst
2014-10-10
Change FaceColor to EdgeColor:
rgbImage=imread('peppers.png');
imshow(rgbImage)
hold on
rectangle('Position', [203, 147, 218, 162],...
'EdgeColor','r', 'LineWidth', 3)
3 个评论
Image Analyst
2016-2-18
Use the text() function
text(x, y, 'This is my rectangle', 'FontSize', 20);
更多回答(1 个)
mohd abdul wahed faisal faisal
2019-7-13
bro instead of rectangle i want the particular area(irregular shape)
1 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 3-D Volumetric Image Processing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!