필터 지우기
필터 지우기

How to save bounding box image?

조회 수: 3 (최근 30일)
Maaz Muslim
Maaz Muslim 2014년 5월 22일
댓글: Azum Saeed 2018년 7월 2일
i am having trouble in saving bonding box image for later use but i can't.

답변 (1개)

Y.L.K KHUMAN
Y.L.K KHUMAN 2014년 5월 22일
[L, a,]=bwlabel(I); %%Label connected components
propied=regionprops(L,'BoundingBox'); %%Measure properties of image regions
for n=1:size(propied,1) %%Plot Bounding Box
rectangle('Position',propied(n).BoundingBox,'EdgeColor','g','LineWidth',1);
end
for n=1:a %%Objects extraction
[r,c] = find(L==n);
n1=Segout(min(r):max(r),min(c):max(c));
figure, subimage(~n1);
pause(0.5)
imsave();
end
*imsave() function will save your bounded image.
  댓글 수: 2
Maaz Muslim
Maaz Muslim 2014년 5월 22일
There is an error.
Undefined function 'Segout' for input arguments of type 'double'.
Error in DIP_Project>pushbutton1_Callback (line 175) n1=Segout(min(r):max(r),min(c):max(c));
I have MATLAB R2013b. Matlab version has anything to with this error.
Azum Saeed
Azum Saeed 2018년 7월 2일
I hope you found the answer but leaving it for people who might have lesser time. so segout is basically the image complete image it self and but not a function. min(r):max(r) are the range from where till where you want to copy image to n1 object.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Build Interactive Tools에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by