File Exchange

image thumbnail

gptoolbox

version 1.1 (26.5 MB) by

Useful functions for geometry processing, constrainted optimization and image processing.

52 Downloads

Updated

https://github.com/alecjacobson/gptoolbox/
This is a toolbox of useful matlab functions for geometry processing. There are also tools related to constrainted optimization and image processing. Typically these are utility functions that are not stand alone applications.
Here's an incomplete list of cool features this matlab toolbox contains:

- wrappers for TetGen, Triangle, QSlim, meshfix
- mesh smoothing
- mesh clean up (remove duplicates, remove unreferenced)
- geodesic distances on triangle and tetrahedral meshes
- mesh quantities and queries (normals, discrete gaussian curvature, list boundary edges, topology, angles, dihedral angles etc.)
- mesh deformation (as-rigid-as-possible (ARAP), moving least-squares, etc.)
- mesh parameterization (harmonic, least squares conformal, ARAP, etc.)
- automatic skinning weight computation (bounded biharmonic weights, bone heat)
- 2D triangle mesh from binary image
- Input/Output for many mesh formats (.obj,.off,.stl,.wrl,.ply,.mesh,.node,.ele,.poly,.smf,.bdl,.face)
- discrete differential geometry operators for triangle and tetrahedral meshes (cotangent Laplacian, gradient, divergence)
- quadratic programming, active set solver
- scribble-based image colorization, diffusion curves
- exact (un)signed distance field computation for meshes
- constructive solid geometry operations on meshes, booleans
- accelerated point location in triangle and tetrahedral meshes
- image dithering
- deep matlab function dependency

Comments and Ratings (11)

Great toolbox, However, I still have some problem compiling some of the .cpp files.

Does anyone have complied versions of 'point_mesh_squared_distance.cpp' and 'signed_distance.cpp' either in .mexw64 or .mexmaci64? It will be really helpful.

I already tried every way described on
https://github.com/alecjacobson/gptoolbox/issues?q=is%3Aissue+is%3Aclosed

Fritz

Fritz (view profile)

@Helen Khambay

You have to get the newest stable versions of eigen and libigl:
http://eigen.tuxfamily.org/index.php?title=Main_Page
https://github.com/libigl/libigl

You may deinstall MinGW? Not sure.
You can find more examples for other cpp functions of the gptoolbox here:
https://github.com/alecjacobson/gptoolbox/issues?q=is%3Aissue+is%3Aclosed

Then try following code:
---------------------------------------
clearvars

eigen_version='26667be4f70b';
path_to_eigen=['C:\dev\eigen-eigen-' eigen_version];

path_to_libigl='C:\dev\libigl';

MEXOPTS={'-v','-largeArrayDims','-DMEX'};

EIGEN_INC= ['-I' path_to_eigen];

LIBIGL_INC=['-I' path_to_libigl '\include'];
LIBIGL_FLAGS='-DIGL_SKIP';
LIBIGL_LIB={'-DIGL_SKIP'};
LIBIGL_LIBMATLAB='-DIGL_SKIP';
LIBIGL_LIBCGAL='-DIGL_SKIP';
LIBIGL_LIBCORK='-DIGL_NO_CORK';
LIBIGL_BASE={LIBIGL_INC, LIBIGL_FLAGS,LIBIGL_LIB{:}, LIBIGL_LIBMATLAB};

mex( ...
MEXOPTS{:}, ...
LIBIGL_BASE{:},EIGEN_INC, ...
'point_mesh_squared_distance.cpp');

Hello, Can someone please help me compile the point_mesh_squared_distance.cpp with mex as I want to use the hausdorff function. I have installed MinGW but get the error message "point_mesh_squared_distance.cpp:5:34: fatal error: igl/matlab/MexStream.h: No such file or directory compilation terminated."
I am a novice at using MATLAB.
Many thanks in advance...

Fritz

Fritz (view profile)

@Rik
It also works on a windows machine.

At first you have to compile the point_mesh_squared_distance.cpp with mex if you want to use the hausdorff function.

It may be useful, but since I work on a Windows machine, I can't use the hausdorff script.

This submission misses two things:
1) a list of function with a one-line explanation to facilitate searching
2) a mention in the description that some things that will not work on Windows.

Fritz

Fritz (view profile)

Great toolbox! Thanks a lot!

Some ideas:
Small examples in description of the functions would be useful.

You could reduce the file size of the zip file by compressing the "gptoolbox-logo.pdf".

Chiyu Jiang

Very helpful tool box! Great job! Thanks for sharing!

Xiao Sidao

good job!

AP

AP (view profile)

Wonderful job and thanks for sharing with the community.

My application is that I have a closed triangulated surface in 3D. I want to use the signed distance function and apply it to a uniform 3D Cartesian grid in which the 3D triangulated closed surface lies. In other words, this 3D surface is immersed in the Cartesian uniform grid. I was able to successfully compile and build the mex file.

Would you let me know how I should use the function and find the signed distance function for my application assuming V and F are the vertices, faces of the surface and x, y, z are the coordinates of the uniform Cartesian grid. I would be very grateful.

Anton Semechko

Anton Semechko (view profile)

This is a very useful toolbox for anyone working with surface meshes. Thanks for sharing!

Josef

Josef (view profile)

Updates

1.1

Logo thumbnail

MATLAB Release
MATLAB 8.4 (R2014b)
Acknowledgements

Inspired by: Toolbox Graph

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video