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.
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.
![]() |
![]() |
![]() |
| Photo by CHUTTERSNAP on Unsplash | ||
![]() |
![]() |
![]() |
| Photo by Andreas Gücklhorn on Unsplash | ||
![]() |
![]() |
![]() |
| Photo by Viktor Talashuk on Unsplash | ||
![]() |
![]() |
![]() |
| Photo by Geran de Klerk on Unsplash | ||
In case you like to try it on your own images, execute the following steps from your terminal.
-
Clone the repository to your local machine:
git clone https://github.com/schsmn/three_dimensional_image.git -
Access the repositories directory by:
cd three_dimensional_image -
Setup the conda environment by executing:
conda create --name three_dimensional_image_env --file ./requirements.txt -
Activate the new environment:
conda activate three_dimensional_image_env -
Open the main.py and provide the path to the image as well as the image-name by adapting the corresponding variables.
-
Finaly run the script with:
python main.py











