mjirik / imcut

3D graph cut segmentation

Home Page:http://mjirik.github.io/imcut/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Convert triangle mesh to a needed format .

luiboom opened this issue · comments

Hi,

I have a triangle mesh model (3d) or point cloud.
How may I convert it to a needed format for the following code:

igc = pspc.ImageGraphCut(data, voxelsize=[1, 1, 1])
igc.set_seeds(seeds)
igc.run()

Thank you!

Hi.
The Graph-Cut works with volumetric 3D data. The input is basically the 3D array filled with the intensity. The output is the 3D delineation of the required object. The output data can be converted into a triangle mesh.

If you already have the shape of your object represented by the mesh, there is no reason to run Graph-Cut. Maybe I don't understand your problem well... :-)

Fisrt of all, thank you for a fast answer.
I have a mesh of the group of objects, the goal is sighn them as different kind of objects (segmentation).
So, my question is how I convert it (triangle mesh or point cloud) into "data" numpy array ?
What are data[dim1, dim2, dim3] ? Where does the intensity go ? and where the [x, y, z] ?

Thank you! :)