Skip to main content

Extract UBO BTF archive format(UBO2003, ATRIUM, UBO2014).

Project description

BTF Extractor

PyPI version GitHub version Python Versions

Extract UBO BTF archive format(UBO2003, ATRIUM, UBO2014).

This repository uses zeroeffects/btf's btf.hh (MIT License).

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

Example

>>> from btf_extractor import Ubo2003, AtriumHdr, Ubo2014

>>> btf = Ubo2003("UBO_CORDUROY256.zip")
>>> angles_list = list(btf.angles_set)
>>> print(angles_list[0])
(0, 0, 0, 0)
>>> image = btf.angles_to_image(*angles_list[0])
>>> print(image.shape)
(256, 256, 3)
>>> print(image.dtype)
uint8

>>> btf = AtriumHdr("CEILING_HDR.zip")
>>> angles_list = list(btf.angles_set)
>>> print(angles_list[0])
(0, 0, 0, 0)
>>> image = btf.angles_to_image(*angles_list[0])
>>> print(image.shape)
(256, 256, 3)
>>> print(image.dtype)
float32

>>> btf = Ubo2014("carpet01_resampled_W400xH400_L151xV151.btf")
>>> print(btf.img_shape)
(400, 400, 3)
>>> angles_list = list(btf.angles_set)
>>> print(angles_list[0])
(60.0, 270.0, 60.0, 135.0)
>>> image = btf.angles_to_image(*angles_list[0])
>>> print(image.shape)
(400, 400, 3)
>>> print(image.dtype)
float16

Supported Datasets

UBO2003

6561 images, 256x256 resolution, 81 view and 81 light directions.

ubo2003

Mirko Sattler, Ralf Sarlette and Reinhard Klein "Efficient and Realistic Visualization of Cloth", EGSR 2003.

ATRIUM (non-HDR and HDR)

6561 images, 800x800 resolution, 81 view and 81 light directions.

atrium

UBO2014

22,801 images, 512x512(400x400) resolution, 151 view and 151 light directions.

ubo2014

Michael Weinmann, Juergen Gall and Reinhard Klein. "Material Classification based on Training Data Synthesized Using a BTF Database", accepted at ECCV 2014.

Project details


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.5.0rc7.tar.gz (142.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

btf_extractor-1.5.0rc7-cp39-cp39-macosx_11_0_x86_64.whl (244.3 kB view details)

Uploaded CPython 3.9macOS 11.0+ x86-64

File details

Details for the file btf_extractor-1.5.0rc7.tar.gz.

File metadata

  • Download URL: btf_extractor-1.5.0rc7.tar.gz
  • Upload date:
  • Size: 142.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.9.4 Darwin/20.3.0

File hashes

Hashes for btf_extractor-1.5.0rc7.tar.gz
Algorithm Hash digest
SHA256 2fdc87d7cfc04add72ab16ce8d6ea3e6185629862f840e6bc16452c3ce8fefef
MD5 2e45ff0c01a97252228b3a131ad6db6d
BLAKE2b-256 dd4389c4d256719e7fdc2bde3547dc4a24af93421fdcf1311bdb27bf016f1932

See more details on using hashes here.

File details

Details for the file btf_extractor-1.5.0rc7-cp39-cp39-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for btf_extractor-1.5.0rc7-cp39-cp39-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 99596407d1b18e13bdeb69d9aa29e6cdf4303f6b6cda2fb228ad96e68abd41e7
MD5 9e0f4fd6c6b92b1777c63035d398df9a
BLAKE2b-256 30607a608e71bda9a6f8c760ba94cbe0f7305f873ab25b61b86b9a3db0e2c076

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page