How to find the Alpha Hull of 2-D image
显示 更早的评论
i would like to know how to find the alpha hull of the image like convex hull for 2-D image
回答(1 个)
Sean de Wolski
2015-12-1
编辑:Sean de Wolski
2015-12-1
You will need to binarize the image (however, you need to do that), find the points on the perimeter ( find/bwperim , or bwboundaries) and then call alphaShape on those points.
Simple example:
I = imread('onion.png');
BW = I(:,:,2)>100 & I(:,:,1)<150;
[r,c] = find(bwperim(BW));
ah = alphaShape(c,r);
plot(ah)
This is about as simple of an example as it gets. You might want to do more advanced things like calling regionprops with 'SubarrayIdx' so that you find the alpha hull of each object in the image, etc.
4 个评论
Steven Lord
2015-12-1
The documentation page for alphaShape indicates it was introduced in release R2014b. Are you using an earlier release?
ganesh s
2015-12-2
Sean de Wolski
2015-12-3
Upgrade...
类别
在 帮助中心 和 File Exchange 中查找有关 Bounding Regions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!