Im2mesh_GUI (2D image to finite element mesh)

Version 2.47 (5.43 MB) by Jiexian Ma
GUI version of Im2mesh. Generate finite element mesh based on 2D multi-phase image. For image-based finite element analysis.
88 Downloads
Updated 28 Aug 2025

View License

This is a GUI version of Im2mesh package.
Standalone desktop application: Installer (No need to install MATLAB)
News
  • Version 2.42 adds more settings for plotting mesh.
  • Version 2.23 supports manual multi-thresholding.
  • Version 2.20 supports Gmsh.
  • Version 2.16 updates the DOI. Im2mesh is now citable.
Features
  • Exactly preserve the contact detail between different phases.
  • Incorporates polyline smoothing and simplification
  • Able to avoid sharp corners when simplifying polyline.
  • Support phase selection before meshing.
  • 4 mesh generators are available for selection: MESH2D, generateMesh, Gmsh, and pixelMesh.
  • Generated mesh can be exported as mat file (MATLAB), xls file (Excel), inp file (Abaqus), bdf file (Nastran bulk data, compatible with COMSOL), msh file (Gmsh), and MATLAB PDE model object.
  • The mesh can also export as other fomat files via Gmsh, such as STL, KEY, and VTK.
Installation
  • Im2mesh_GUI can be installed in two ways: MATLAB app or standalone desktop application.
Acknowledgments
Great thanks Dr. Yang Lu for providing valuable suggestions and testing of export formats. I also appreciate Dr. Darren Engwirda for the open-source mesh generator.

Cite As

If you use Im2mesh package or Im2mesh_GUI, please cite it as follows.

Ma, Jiexian, and Yuanyuan Li. Im2mesh: A MATLAB/Octave Package for Generating Finite Element Mesh Based on 2D Multi-Phase Image. Zenodo, 2025, https://doi.org/10.5281/ZENODO.14847059.

View more styles

Once my paper is published, I will update a new DOI here.

MATLAB Release Compatibility
Created with R2021b
Compatible with R2017b and later releases
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
2.47

Improve function printInp2d. Add parameter 'opt.mode' to function printInp2d. The arrangement of text within the inp file, or its format, can be customized.
Update Im2mesh_GUI: Export inp file; Export stl file.
Update Tutorial

2.45

Able to export polygonal boundaries as dxf files (CAD).
The mesh generated by Gmsh can be exported using two different methods.

2.42

Fix a small bug related to simplifying polylines.
Improve plot mesh (function plotMeshes)
Add one new parameter to GUI (for Gmsh): num_threads

2.40

Fix the crash issue when using generateMesh.
Fix bugs when writing geo file and msh file.
Improve the behavior when setting threshold for polyline smoothing and Simplification
Function printInp2d is now able to export boundary node set automatically.

2.33

Revise the parameters for function poly2mesh

2.32

Update description

2.31

Update description

2.30

Add more settings for mesh generation and file export

2.27

Update description

2.26

Revise image.

2.25

Support exporting mesh as msh file (Gmsh) and MATLAB PDE model objects.
Add version check before manual thresholding
Add version check before generateMesh
Add mesh quality plot for quadrilateral element
Add saving segmented image

2.23

Compatible with MATLAB R2017b or later.
Add manual multi-thresholding.
Update tutorial.

2.22

Update export panel & tutorial

2.21

Minor update for GUI and tutorial

2.20

Support Gmsh (unstructured quadrilateral mesh).
Fix pixelMesh.

2.18

Add function pixel2Mesh
Generalize the following functions, make them work for quadrilateral & quadratic: plotMeshes, printInp_multiSect,printBdf,insertNode
Make function im2meshBuiltIn, poly2meshBuiltIn work for phase selection
Update GUI & tutorial

2.16

Update the DOI. Im2mesh is now citable!
Align the version number of Im2mesh_GUI with the Im2mesh package.

2.10

Speed up extract boundaries.
Support quadratic element.
Support exporting to excel file.
Support exporting as MATLAB FEmesh object.
Delete export to inp file with multi-parts.
Update tutorial.

2.06

update description

2.05

Make Taubin smoothing faster
Change the default value of smoothing

2.02

Add more images to the tutorial. Fix bug - exporting files on macOS.

2.01

update license

2.00