Reshape an object in binary image
古いコメントを表示
Hi dear;
I have a binary image that contains an object (some times a lot of objects), I want to reshape the object as showing in the image 1 to the one as showing in the image 2. My goal is to have an object tha has a straight boundaries.
Any help and suggestion will be appreciated.

4 件のコメント
Walter Roberson
2016 年 1 月 29 日
Do you mean like calculating the amount of white pixels and creating a new image with the same size and width but with all of the white pixels in the rectangular center, as long as there are the same number? If so then what should be done if the number of white pixels happens to be a prime and so cannot be factored into a rectangle?
Image Analyst
2016 年 1 月 29 日
And, if so, why do you think you need to do this, and would you want/need any black padding around the rectangle?
Walter Roberson
2016 年 1 月 29 日
Maybe you would like to skeletonize, remove spurs, and then dilate out again??
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Image Arithmetic についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!




