你好,下午好,我希望你能帮我
我想用matlab视觉检测附加和正方形,但是正方形还没有被检测到。
有人能支持我吗?万博1manbetx
凸轮= ipcam (“http://192.168.68.102:8080 videofeed”)
统计= regionprops (BW,“周长”,“区域”,“重心”,的边界框(“大小));
thisboundingbox =统计(k) .BoundingBox;
矩形(“位置”, (thisboundingbox (1) thisboundingbox (2), thisboundingbox (3), thisboundingbox (4)],“EdgeColor”,“b”,“线宽”2);
矩形(“位置”, (thisboundingbox (1) thisboundingbox (2), thisboundingbox (3), thisboundingbox (4)],“EdgeColor”,“r”,“线宽”2);
如果统计(k) .Perimeter ^ 2 /统计(k)。面积< 15
文本(统计(k) .Centroid(1),数据(k) .Centroid (2),‘* Ciculo‘,“颜色”,“r”);
标题(Imagen blanco y negro);
次要情节(1,3,3);imshow (BW2);