Odd Outcome From imerode and bwlabel
1 回表示 (過去 30 日間)
古いコメントを表示
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
回答 (2 件)
参考
カテゴリ
Help Center および File Exchange で Display and Exploration についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!