Odd Outcome From imerode and bwlabel
이전 댓글 표시
Hello,
I am trying to program a shape placement algorithm using image processing in Matlab.
The algorithm should place images of shapes on a larger background image in a way that minimizes the wasted background. I am using imerode to erode the current background image with the bounding box of the shape to be placed as the structuring element. Thus, imerode should return an image with 1's everywhere where the origin of the structuring element can be placed so that it is entirely contained within the background image. Imerode does this correctly. However, when I use bwlabel on the image returned from erosion for further processing, an image of the structuring element appears in the bottom left corner. I don't understand why this is happening. I'm sure it would help to see the images that I am refering to but I don't think pictures can be attached to this question. Can anyone explain please? Any help would be greatly appreciated. Thank you.
댓글 수: 2
Sean de Wolski
2011년 10월 17일
Use a free image hosting website and give us the link. Also, post the code and use formatting so we can see what MATLAB is _actually_ doing.
http://www.mathworks.com/matlabcentral/answers/7924-where-can-i-upload-images-and-files-for-use-on-matlab-answers
Sean de Wolski
2011년 10월 17일
Welcome to MATLAB Answers!
답변 (2개)
ssklios Sklios
2011년 10월 29일
카테고리
도움말 센터 및 File Exchange에서 MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!