Extract UBO BTF archive format(UBO2003, UBO2014).
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.1.0.tar.gz
(13.9 kB
view hashes)
Built Distributions
Close
Hashes for btf_extractor-1.1.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e321d03f90f375d03b6d0abd8a3436649f7640bd58c5ca3dac2041c369d39135 |
|
MD5 | ab6219058b0ee926aae7193ad829311e |
|
BLAKE2b-256 | 37db4c5b4c8b046603e53ae6a863e143ddc46df294f351d454c9391f56524be9 |
Close
Hashes for btf_extractor-1.1.0-cp38-cp38-macosx_11_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6cefb3f33580e825defe01c56e11abae5a44f2d154219c9b9a9cde7ec701193 |
|
MD5 | 051c53df68f56bf819ff7f013d2dc5cc |
|
BLAKE2b-256 | a4c97edee7ff9aa18fef649379d545ac2aaa23ac006e300e16c4fc6b3f9d7804 |