spectral image viewer
Explore hyperspectral images band by band, render them in color, and inspect pixel spectra.
Open an HDF5 spectral image (.h5, or a MATLAB v7.3 .mat). The file is read directly from your disk inside the browser: nothing is uploaded, and only the parts of the file that are needed are read.
Cube Reading…
Set the illuminant, sensitivities and output in the settings panels.
Pixel spectra
Hover over the image to preview a spectrum; click to pin it.
Click the plot to jump to the nearest band.
Supported files and how rendering works
The Macbeth ColorChecker sample is synthetic: each of the 24 patches holds the ISO 17321-1 reference spectral reflectance (identical to Ohta’s measurements), 380–780 nm in 5 nm steps, on a zero-reflectance frame. Rendered with the CIE 1931 observer under D65 and “Perfect reflector = white” exposure, it gives the chart’s nominal sRGB colors.
The ColorChecker Digital SG sample is synthetic too: its 140 patches (columns A–N, rows 1–10, as printed on the chart) hold X-Rite’s (GretagMacbeth) reference spectral reflectances, measured with a Spectrolino in 2005 under D50 with an absolute white base, from 380 to 730 nm in 10 nm steps, on a zero-reflectance surround.
The viewer lists every three-dimensional numeric dataset in the file and picks the largest. The spectral axis is the one matching a wavelength vector stored in the file (for example wavelengths, wvs, or bands), or otherwise the shortest axis. MATLAB v7.3 files store arrays transposed; this is detected automatically. Wavelengths stored in µm are converted to nm.
Large cubes are read with a spatial stride so that the decoded single-precision cube stays within about 512 MB; choose “Full” resolution to override this. Chunked and gzip-compressed datasets are supported.
Rotations and flips change only how the image is shown (and the downloaded PNG). Pixel coordinates in the readout and the CSV export always refer to the file.
“Data range” maps stored values to 0–1 without reloading the file. Min–max normalization uses the exact minimum and maximum of the whole cube, so spectral shapes are preserved. Clipping limits values to a range you choose and then scales that range to 0–1. Bit depth suits integer sensors whose samples are stored in a wider type, for example 12-bit data in uint16: values are divided by 2ⁿ − 1 and clipped. The mapping applies to band images, color rendering, pixel spectra and the CSV export.
Illuminants include the CIE 015:2018 fluorescent (F1–F12), high-pressure discharge (HP1–HP5) and LED (B1–B5, BH1, RGB1, V1, V2) spectra, which are defined from 380 to 780 nm. “LED from Gaussian peaks” sums Gaussians given by their peak wavelength, full width at half maximum and relative power: one peak models a colored LED, a blue peak plus a broad phosphor peak a white LED. In radiance mode, pixel spectra are the data multiplied by the illuminant’s spectral power distribution at each band, with the distribution normalized to a peak of 1; with reflectance data this is the light reaching the camera.
Colors are computed as Σ S(λ) R(λ) s̄(λ) Δλ, with trapezoidal band widths, so that a perfect reflector under the chosen illuminant has Y = 1. Use the equal-energy illuminant E for radiance data, which already includes the light source. Curves are linearly interpolated at the image wavelengths, and contributions outside the image range are ignored. In camera modes the result is the camera’s raw RGB, shown linearly unless “sRGB encoding” is ticked. With color correction, the white-balanced camera RGB is converted to CIE XYZ (adapted to D65) by a 3 × 3 color correction matrix (CCM) and then to sRGB. CCMs are fitted on the 24 ISO 17321-1 ColorChecker reflectances simulated over 380–780 nm under each calibration illuminant, by least squares with the white point preserved, against CIE 1931 XYZ Bradford-adapted to D65 (like a DNG forward matrix, which targets D50). For other illuminants the CCM is interpolated linearly in inverse correlated color temperature (mired) between the two calibration illuminants that bracket the scene’s CCT (McCamy’s approximation), and clamped outside the calibrated range; “fitted at the scene illuminant” skips the interpolation, for comparison. The reported ΔE00 is the CCM’s error on the 24 patches under the scene illuminant. The camera database holds the spectral sensitivities of 96 cameras and phones measured by Image Engineering (April 2024 release). Camera curve files contain one row per wavelength (nm, then one column per channel) or an HDF5 file with a wavelength vector and a matching channel array.