Skip to content

dbraun-ub/image2stl-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

image2stl-python

Easy to use solution to convert a 2d image into an stl file. All you need is opencv to load the image and numpy-stl to handle the mesh.

Installation

You need the following packages:

Examples

  • To generate a stl file from an rgb image.
python img2stl.py --img_path images/Lenna.png --save_path stl/Lenna.stl
python img2stl.py --img_path images/Lenna.png --save_path stl/Lenna.stl --scale_size 3 --z_res 0.3
python img2stl.py --img_path images/Lenna.png--save_path stl/Lenna.stl --scale_size 3 --nb_levels 100 --base_depth 10 --z_res 0.3 --xy_res 0.8 

Only the arguments img_path and save_path are mandatory.

  • For more parameters, look at the help.
python img2stl.py --help

Result

Input Image Output STL
Lenna.png Lenna.stl

About

Convert a 2d image into an stl file.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages