Getting all points which are inside of the convexhull

5 vues (au cours des 30 derniers jours)
user6567
user6567 le 9 Oct 2015
Commenté : user6567 le 13 Oct 2015
I have an image in 3D. I'd like to get all points which are inside its convexhull, but don't belong to the image. So I'd like to do something like this:
[K, V] = convhull(image);
result= zeros(size(image));
result(K == 1 & granule == 0) = 2;
It doesn't work, because K is of size x (the number of rectangles which create the convex hull) by 3.
How can I do it properly?

Réponse acceptée

Image Analyst
Image Analyst le 9 Oct 2015
Don't use image as the name of your variable because it's the name of a built-in function.
Don't use convhull(). Use bwconvhull() instead. Then do an XOR with the binary image.
  6 commentaires
Image Analyst
Image Analyst le 12 Oct 2015
You need to use convhulln(), not convhull().
user6567
user6567 le 13 Oct 2015
Why? convhull() should also work in 3D, shouldn't it? And it still doesn't solve my problem.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Bounding Regions dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by