This visual studio project calculates normalized thickness of mesh and return depth map for matlab. It builds .mex file which can be used as function on matlab. This project supports 2 different mode for depth map. The idea is inspired by Philip Rideout and the code is based on his Glass project.
Normal depth | Z-axis depth map |
---|---|
The thickness of mesh like the X-ray | The thickness of rolled out mesh along the z-axis |
- (char)Full path to model(only .ctm format is supported)
(ex:
D:\\dev\\MESH-THK\\model\\venus.ctm','D:/dev/MESH-THK/model/bunny.ctm', and 'D:\dev\MESH-THK\model\venus.ctm'
are acceptable) - (matrix)Euler rotation matrix
(ex:
eye(3)
) - (int)Thickness mode (0: nomal thickness, 1: z-axis depth map)
- (matrix)2048x2048 normalized depth map
- Re-locate path to mex.h in the mesh_thk_mex project for your computer (in my case,
C:\Program Files\MATLAB\R2017a\extern\include
) - Locate .glsl file the same folder of .mex64 file. This app looks for .glsl up to 4 upper folder.
- Use
x64
matlab to buildx64
application