Skip to main content

A package for accurate and vivid visualization of hyperspectral images

Project description

TrueColorHSI

Overview

Traditional hyperspectral visualization methods convert images to RGB by averaging bands into fixed ranges corresponding to blue, green, and red. While practical, this method oversimplifies the data and may result in a loss of important details and nuances.

TrueColorHSI takes a more sophisticated approach by using colorimetric science to process the entire visible spectrum, delivering vivid, perceptually accurate images. Additionally, it offers users the flexibility to adjust the illuminant (D50, D55, D65, D75), enhancing the interpretation of hyperspectral data under different lighting conditions.

Updated Comparison Table: Traditional Method vs. TrueColorHSI

Aspect Traditional Method ✨ TrueColorHSI ✨
Spectral Band Usage ⚙️ Fixed RGB ranges (Blue, Green, Red) 🌈 Full visible spectrum utilization
Color Basis ⚙️ Based on peak wavelengths (~470, ~545, ~680 nm) 🌈 Colorimetric science-based
Color Accuracy ⚠️ Approximate color reproduction Highly accurate color representation
Visualization Quality ⚠️ Simplified, may lose details Vivid and detailed output
User Experience ⚙️ Limited user control Tunable illuminants (D50, D55, D65, D75)

Installation:

You can install TrueColorHSI via pip:

pip install TrueColorHSI

Usage:

from truecolorhsi.visualization import vanilla_visualization, colorimetric_visualization
from pathlib import Path
input_path = Path("path/to/the/input/file")
vanilla_display_images = vanilla_visualization(input_path)
colorimetric_display_images = colorimetric_visualization(input_path, visualize=True, saveimages=True)

Supportted data format:

Notes:

  • The package provides methods that help translate complex hyperspectral data into intuitive, true-to-life images that are easier to interpret and analyze.

Example results

Visualization from RGB bands Figure 1. Visualization from appximated RGB bands (traditional method).

Visualization from colorimetric conversion Figure 2. Visualization from colorimetric conversion (our method).

True color visualization from different illuminants Figure 3. True color visualization using different standard illuminants (D50, D65, D75). Adjusting the chosen illuminant allows for tuning the color temperature.

illuminant_spd_and_CIE_xyz
Figure 4. The spectral power distribution of the D65 illuminant and the CIE xyz curves.

Citation

If you find this repository useful in your research, please consider the following citation.

@article{amiri2024colorimetric,
  title={Colorimetric characterization of multispectral imaging systems for visualization of historical artifacts},
  author={Amiri, Morteza Maali and Messinger, David W and Hanneken, Todd R},
  journal={Journal of Cultural Heritage},
  volume={68},
  pages={136--148},
  year={2024},
  publisher={Elsevier}
}

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

truecolorhsi-0.1.2.tar.gz (11.1 MB view details)

Uploaded Source

Built Distribution

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

TrueColorHSI-0.1.2-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file truecolorhsi-0.1.2.tar.gz.

File metadata

  • Download URL: truecolorhsi-0.1.2.tar.gz
  • Upload date:
  • Size: 11.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.16

File hashes

Hashes for truecolorhsi-0.1.2.tar.gz
Algorithm Hash digest
SHA256 8f5fc9f44b91b9f3c6af1361d817142df55d7cb35c98688262872bba5c3623b7
MD5 f4a523a09b8b4440c66d9b97f38804a7
BLAKE2b-256 90c408923d8461e632cf0ee1401208e756481c9eac4791094fd3b340e52f23ba

See more details on using hashes here.

File details

Details for the file TrueColorHSI-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: TrueColorHSI-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 10.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.16

File hashes

Hashes for TrueColorHSI-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b1dcf0ae712da1e08ee4c4f6cb8afdbb2197a37d48d87540addd676d5809a4a7
MD5 f05ae95d796ecaaa8256a6371b02eb7f
BLAKE2b-256 99183eea399931baba9e57605de0b507631564f313d17408bf943b48a46954ce

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