How to determine which boundaries are rough and smooth?
5 次查看(过去 30 天)
显示 更早的评论
How can Matlab determine the roughness along the boundary of an edge? For example, how can Matlab determine that the 1st image is smooth and the 2nd one is rough?
![smooth.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/206032/smooth.png)
![rough.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/206033/rough.png)
0 个评论
回答(1 个)
Image Analyst
2019-2-27
Several ways, like smooth the boundary and find the residuals between the original coordinates and the smoothed coordinates. See attached demo for a start.
Or you could smooth the image with activecontour() or blurring and thresholding or using imclose(), then using xor() on the smoothed and original image and summing the white pixels in the result with bwarea() or sum().
Pick one and give it a try.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Segmentation and Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!