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.0.0.tar.gz
(13.7 kB
view hashes)
Built Distributions
Close
Hashes for btf_extractor-1.0.0-cp39-cp39-macosx_11_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a4e6870ab223570af50abd8e510bf252c28e179dc541e3bd1027675e928977d |
|
MD5 | 16f03d3542daf8c7697095b85603394c |
|
BLAKE2b-256 | fb34872915b1fd23bb32d7da9025428ea2c28d055db8ad07823d7b9ddaae506f |
Close
Hashes for btf_extractor-1.0.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c9c84051a3c16c696789e0bfb40c59e8fd87bb76843c677fbf235221306f3ce |
|
MD5 | 45d2eee0bd4fd59ad26ff322f0d0977d |
|
BLAKE2b-256 | 7848c648da47c028ad0c539482b92e90c08b1948e9679c4769182d237da37d5e |
Close
Hashes for btf_extractor-1.0.0-cp38-cp38-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22c475e8f9d86791c7316b61b7689763f288409693b1b082c4b8c12c9e74e008 |
|
MD5 | 7ac4617e4f0da39b9a2b1b1b41bb22a2 |
|
BLAKE2b-256 | 1dbbc18a2779c29e69df01a8863169dd9d135e11fd982b474642e4358487c48f |