Skip to content

schsmn/three_dimensional_image

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

three_dimensional_image

This python-script takes a rgb-color image as input, which is then visualized within a three dimensional plot.

The gray value of each pixel is interpreted as depth-information.

Sample images

Below you find some sample images. Each is displayed as normal input image, top down view onto the 3D image and rotated view onto the 3D image.

Moon

base image 3d - top down 3d - rotated
Photo by CHUTTERSNAP on Unsplash

Forest and Sea

base image 3d - top down 3d - rotated
Photo by Andreas Gücklhorn on Unsplash

Door

base image 3d - top down 3d - rotated
Photo by Viktor Talashuk on Unsplash

Zebra

base image 3d - top down 3d - rotated
Photo by Geran de Klerk on Unsplash

Usage

In case you like to try it on your own images, execute the following steps from your terminal.

  1. Clone the repository to your local machine:

     git clone https://github.com/schsmn/three_dimensional_image.git
    
  2. Access the repositories directory by:

     cd three_dimensional_image
    
  3. Setup the conda environment by executing:

     conda create --name three_dimensional_image_env --file ./requirements.txt 
    
  4. Activate the new environment:

     conda activate three_dimensional_image_env
    
  5. Open the main.py and provide the path to the image as well as the image-name by adapting the corresponding variables.

  6. Finaly run the script with:

     python main.py
    

About

Printing 2D-images in 3D

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages