请在图像上绘制边界框/矩形 [英] HOw to draw boundingBox/rectangle transperent over an image

查看:153
本文介绍了请在图像上绘制边界框/矩形的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hi
我有四个坐标,对应于(x,y,width,height)。我可以在这个脚本的图像上绘制一个矩形,但它是一个带有红色的填充矩形我想要一个边框或一个透明的矩形





我= imread('000027.jpg');

数字,imshow(I)

持有

矩形('位置' ,[203,147,218,162],'FaceColor','r')



谢谢大家

解决方案

I = imread('000027.jpg');

imshow(I);

持有

矩形('位置,[401369464496], 'edgecolor', 'R', '的lineWidth',3)

hi 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


I=imread('000027.jpg');
figure,imshow(I)
hold on
rectangle('Position',[203, 147, 218, 162],'FaceColor','r')

Thanks guys

解决方案

I=imread('000027.jpg');
imshow(I);
hold on
rectangle('position',[401,369,464,496],'edgecolor','r','lineWidth',3)


这篇关于请在图像上绘制边界框/矩形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆