How I use bounding box for multiple objects?
이전 댓글 표시
I write a code for bounding box, but this code work just one object. How I use bounding box a lot objects.(I want to write algorithm, I do not use any command or library.)
The code is,
clc,
clear,
im1=imread('binary_image');
im1_binary=imbinarize(rgb2gray(im1));
bottom=-1;
right=-1;
top=439;
left=470;
for row=1:439
for column=1:470
if (im1_binary(row,column)==1)
if(row>botton) botton=row;
end
if(column>right) right=column;
end
if(row<top) botton=row;
end
if(column<left) left=column;
end
end
end
end
답변 (1개)
Muhammad Usama Sharaf SAAFI
2020년 2월 5일
0 개 추천
Try to use "Image Labler app". It will solve your issue. you can choose your multiple ROI from an image and my exporting it will return you multiple boundry boxes for multiple objects.
댓글 수: 1
mehmet can
2020년 2월 5일
편집: mehmet can
2020년 2월 5일
카테고리
도움말 센터 및 File Exchange에서 Programming에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!