This is a very simple m file. It creates a structured mesh out of the given 3D vertices or a depth map and utilizes the same technique for resizing the mesh.
The code is heavily commented, so you will be able to find all the details of implementation within the code.
This function creates a structured mesh out of ordered vertices.
It's useful for dealing with depth maps and treating them as meshes. Kinect or ToF cameras would be an option. gen_structured_mesh is a C mex file doing the actual meshing. It doesnt' produce sorted vertex-face list, so if we really require sorting, we should do it separately (a sample which does the sorting is also included). To display the mesh, I make use of Dr. Vladimir Bondarenk's drawMesh function.
The code itself includes the test function. Just run it without any parameters.
Copyright (c) 2011, Tolga Birdal <http://www.tbirdal.me>
Tolga Birdal (2021). Quick Structured Mesh Generator (https://www.mathworks.com/matlabcentral/fileexchange/32372-quick-structured-mesh-generator), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
- Image Processing and Computer Vision > Computer Vision Toolbox > Point Cloud Processing >
- Image Processing and Computer Vision > Image Acquisition Toolbox > Image Acquisition Toolbox Supported Hardware > Kinect For Windows Sensor >
- MATLAB > Graphics > Images > Read, Write, and Modify Image >
- Image Processing and Computer Vision > Image Acquisition Toolbox > Image Data Acquisition > Acquisition Using Kinect for Windows Hardware >
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!