Skip to content

jyang526843/mesh_from_bitmap_matlab

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MATLAB Code for Creating a Mesh from a Bitmap Image

This MATLAB code generates a mesh from a black and white bitmap image:

  • Find the contour of a black and white bitmap image (raster)
  • Simplify the contour with a specified tolerance
  • Mesh the shape (handling of holes and multiple domains)

This code uses the MATLAB PDE toolbox and generatates a FEM mesh (FEMesh object). However, the mesh can be used for other purposes than FEM simulations, such as 3d printing.

Example

Look at the example run_example.m which generates the following mesh:

Compatibility

  • Tested with MATLAB R2018b.
  • Requires the image_toolbox (for contour detection).
  • Requires the map_toolbox (for contour simplification).
  • Requires the pde_toolbox (for meshing).
  • Compatibility with GNU Octave not tested but probably problematic.

This code share some files with laser_cut_matlab_slicer.

Author

Thomas Guillod - GitHub Profile

License

This project is licensed under the BSD License, see LICENSE.md.

About

MATLAB Code for Creating a Mesh from a Bitmap Image

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • MATLAB 100.0%