Wolfram Language

Core Geometry

Mesh from Images

Version 11 introduces the ImageMesh function for conversion from 2D and 3D images to meshes.

Obtain an image of the Great Salt Lake and a segmentation via region growing.

In[1]:=
Click for copyable input
orig = EntityValue[Entity["Lake", "GreatSaltLake::yw8cf"], "Image"]; img = RegionBinarize[orig, \!\(\* GraphicsBox[ TagBox[RasterBox[CompressedData[" 1:eJzt1jEKwkAQQNFdK0uv4C1sLW0VD6AYxSZCFMRzCJ7XiF3SzFb7lf8ggUCK D8MmM99f1sdJSuk67W/r3X3ZdbvHZtY/bNvr+dQ2h1V7a05Nt9h/Xnv21ytJ kiRJkiRJkn5H7tVuGLMqzqo4q+KsiuNW8bKsimNWfbNwXVbF5Yzuqp0xZFUB dBaui5kF/T5AsxJ1jNAsq0qgs3BlOSPDMrMLmvUBDcNnsbqov2x4FrWrdscA NIu6SjCzoEOEZlGniF5Ta0eMmVXCqjjmCJlV5KzaDWNWxXGreFnMKvAIazeM MUfIXEmtKsCs8hSWsCrOqjhmlSRJkiRJkvS/3tRrD1M= "], {{0, 147}, {150, 0}}, {0, 1}, ColorFunction->GrayLevel], BoxForm`ImageTag["Bit", ColorSpace -> Automatic, Interleaving -> None], Selectable->False], DefaultBaseStyle->"ImageGraphics", ImageSizeRaw->{150, 147}, PlotRange->{{0, 150}, {0, 147}}]\), 1/5]; GraphicsRow[{orig, img}]
Out[1]=

Create a 2D mesh of the image.

In[2]:=
Click for copyable input
ImageMesh[img]
Out[2]=

Obtain a 3D image of an engine.

In[3]:=
Click for copyable input
img = Import["ExampleData/CTengine.tiff", "Image3D"]
Out[3]=

Create a 3D mesh of the engine.

In[4]:=
Click for copyable input
ImageMesh[img]
Out[4]=

Related Examples

de es fr ja ko pt-br zh