A class to project 360x180 images onto a cube
Project description
Three60Cube
A Package to project a 360 x 180 image onto a cube.
Installation
pip install three60cube
Usage
Creation of projection template:
from three30cube import Three60Cube
# create instance
transf = Three60Cube()
# open image
transf.open_image("/Users/casperkaandorp/Desktop/streetview/Abstede_1.JPG")
# calculate a projection for one side
transf.get_pane(pane=1, dim=512)
# save transformation template
transf.save_cache("/Users/casperkaandorp/Desktop/streetview/templ.pickle")
With the saved transformation template you can perform new projections without calculating the transformation:
# create instance with transformation template
transf = Three60Cube("/Users/casperkaandorp/Desktop/streetview/templ.pickle")
# open image
transf.open_image("/Users/casperkaandorp/Desktop/streetview/Abstede_2.JPG")
# perform projection, write image to HDD
transf.save_pane("/Users/casperkaandorp/proj_2.JPG", pane=2, dim=512)
Panes 0 through 3 are taken from the left to right side of the 360 image. Pane 4 is the top of the cube and pane 5 is the bottom part. The dim
parameter refers to dimension of the output image; a dim
of 500 will produce a 500 x 500px image.
To do: testing and meaningful messages when filepaths are incorrect
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file three60cube-0.0.9.tar.gz
.
File metadata
- Download URL: three60cube-0.0.9.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.0.0.post20200309 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47b173eaa9c63d15cb3800b5b78a8c8105d0b5a6712e415a70aebb50b56bbcb4 |
|
MD5 | 55152ccdbf5e01c3df1506a05acfe5fb |
|
BLAKE2b-256 | 86b7e8f4daccaee1a5b8a8fff063ff18ecc463ed41db4cc199119b89422c4a61 |
File details
Details for the file three60cube-0.0.9-py3-none-any.whl
.
File metadata
- Download URL: three60cube-0.0.9-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.0.0.post20200309 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c3db69cf5d3eaf33ff026b766547ad8a7749cf51f3f77b62b03861ee0d6a548 |
|
MD5 | 1fd62de7296b4cb47d6682f082cecf1d |
|
BLAKE2b-256 | 4394cf6dc69dc4f2cda7b5c96b950de925257194572b8e4f417c70b79c9cdc4a |