Extract UBO BTF archive format(UBO2003, UBO2014).
Reason this release was yanked:
"Pillow >= 7" was intended, but was actually "Pillow > 7"
Project description
BTF Extractor
Extract UBO BTF archive format(UBO2003, UBO2014).
This repository uses zeroeffects/btf's btf.hh.
Extract to ndarray compatible with openCV(BGR, channels-last).
Build tested on
- Windows 10 20H2 + MSVC v14.20
- MacOS 11(Big Sur) + Homebrew GCC 10.2.0
- Ubuntu 20.04 + GCC 9.3.0
Install
pip install btf-extractor
Example
>>> from btf_extractor import Ubo2003, Ubo2014
>>> btf = Ubo2003("UBO_CORDUROY256.zip")
>>> angles_list = list(btf.angles_set)
>>> image = btf.angles_to_image(*angles_list[0])
>>> print(image.shape)
(256, 256, 3)
>>> print(angles_list[0])
(0, 0, 0, 0)
>>> btf = Ubo2014("carpet01_resampled_W400xH400_L151xV151.btf")
>>> print(btf.img_shape)
(400, 400, 3)
>>> angles_list = list(btf.angles_set)
>>> image = btf.angles_to_image(*angles_list[0])
>>> print(image.shape)
(400, 400, 3)
>>> print(angles_list[0])
(60.0, 270.0, 60.0, 135.0)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
btf_extractor-1.0.2.tar.gz
(13.7 kB
view hashes)
Built Distribution
Close
Hashes for btf_extractor-1.0.2-cp39-cp39-macosx_11_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ce0b86b8d17945c87c6a72e2c2c4a0e9aa7c632947b250975eb4769f0c91a4e |
|
MD5 | ec4211fed802115ce7f6d5c3d76fb2ec |
|
BLAKE2b-256 | d88cd4aa00d085bce8cb666abad9ce9224b6fbd117403f94e0113ae26cd712b2 |