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.1.tar.gz
(13.7 kB
view hashes)
Built Distributions
Close
Hashes for btf_extractor-1.0.1-cp39-cp39-macosx_11_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | df6a018a4403304af03d4838adefc90fa76233d09a42af25bb70e644fe0cbe71 |
|
MD5 | 2a382baad94fbaaf8699f3d10a484aac |
|
BLAKE2b-256 | 775db0876ab04bc4f64e0ae089429433d7268b9de25d93f080c3f4c381cf9ad7 |
Close
Hashes for btf_extractor-1.0.1-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94f3fa6d2b651746389287a5d7f0c9480546a82c514a9d53f297161ed6a2e475 |
|
MD5 | 05315a28a963a6653c58ab759d6c9602 |
|
BLAKE2b-256 | 02ca0bfe5af81884802037e9e7af6967eb8c99a5bd48a505903f699f2c738c23 |
Close
Hashes for btf_extractor-1.0.1-cp38-cp38-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 116c776da51bd44d2e8acde2100650960bad8f2efa61d43cb2a809ab7bacb1f2 |
|
MD5 | 351b42a6b357ecf59cdbeffe61f04dff |
|
BLAKE2b-256 | 4d3192377e9d3932a7b2257e20b01b1a7789a7a5aa9f9f8edfc918b8d9bacfbd |