I use trisurf
for plotting a convex hull. I need to convert it to binary image for using "Geometric measures in 2D/3D images" for calculating "Minkowski functionals" but I don't know how to convert.
Asked
Active
Viewed 798 times
0

Sardar Usama
- 19,536
- 9
- 36
- 58

sarvenaz
- 1
- 5
-
33D to a binary image is not a lot to go on. What have you tried? Do you have an example image and expected output? We aren't mindreaders. Learn [ask]. – rayryeng Aug 16 '17 at 12:57
-
i have some scattered points i plotted convex hull by using "trisurf" function. now i wanna convert this figure to binary image because the next code's input is binary image – sarvenaz Aug 17 '17 at 10:47
-
1So do you want to convert the resulting figure in binary? I am still unclear. – rayryeng Aug 17 '17 at 13:18
-
yes , the resulting figure to binary image – sarvenaz Aug 17 '17 at 16:25
1 Answers
0
Create regular grid with the right scale using meshgrid
and then use one of the already written codes to check if the points you generated are in the convex hull such as inchull or inhull

MosGeo
- 1,012
- 9
- 9
-
the package i wanna use , need binary image as input. so how creating mesh could help me? – sarvenaz Aug 17 '17 at 11:05
-
Sorry, I meant regular grid. That is basically the ijk values for all the points in the grid. The method used is called `meshgrid` – MosGeo Aug 17 '17 at 15:30
-
yes but after that i should convert the resulting figure to binary image . – sarvenaz Aug 17 '17 at 16:27
-