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

Antworten (1)

Sean de Wolski
Sean de Wolski am 1 Dez. 2015
Bearbeitet: Sean de Wolski am 1 Dez. 2015

0 Stimmen

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 Kommentare

ganesh s
ganesh s am 1 Dez. 2015
Bearbeitet: ganesh s am 1 Dez. 2015
Thanks for the answer Sir but getting the error Undefined function 'alphaShape' for input arguments of type 'double'. Even tough i changed the data type from the double to logical i am getting the same error.
Steven Lord
Steven Lord am 1 Dez. 2015
The documentation page for alphaShape indicates it was introduced in release R2014b. Are you using an earlier release?
ganesh s
ganesh s am 2 Dez. 2015
Yes sir, I am using earlier version. How to find it for the older version.
Sean de Wolski
Sean de Wolski am 3 Dez. 2015
Upgrade...

Melden Sie sich an, um zu kommentieren.

Kategorien

Gefragt:

am 1 Dez. 2015

Kommentiert:

am 3 Dez. 2015

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by