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).
Install
pip install btf-extractor
This package uses the Python C API. To install this package, a C++ build environment is required.
Build is tested on
- Windows 10 20H2 + MSVC v14.28 (Build Tools for Visual Studio 2019)
- MacOS 11(Big Sur) + clang 12.0.0 (Command line tools for Xcode (
xcode-select --install
)) - Ubuntu 20.04 + GCC 9.3.0 (build-essential)
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)
Supported Datasets
UBO2003
6561 images, 256x256 resolution, 81 view and 81 light directions.
Mirko Sattler, Ralf Sarlette and Reinhard Klein "Efficient and Realistic Visualization of Cloth", EGSR 2003.
ATRIUM (non-HDR)
6561 images, 800x800 resolution, 81 view and 81 light directions.
UBO2014
22,801 images, 512x512(400x400) resolution, 151 view and 151 light directions.
Michael Weinmann, Juergen Gall and Reinhard Klein. "Material Classification based on Training Data Synthesized Using a BTF Database", accepted at ECCV 2014.
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
Built Distribution
Hashes for btf_extractor-1.3.0-cp38-cp38-macosx_11_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | df087816d2cdd45aeb639bbbfe59247b5e7585b6c1d61f5185c363d3163db1da |
|
MD5 | 327c81da9d28629a5017aa05f10dcbca |
|
BLAKE2b-256 | 2cb2281653d40585b2880ea6805ff9a58e2c118c26fe2ffd5765f06aeaf6fb1a |