HSI Studio

Annotation & ROIs

Annotation in HSI Studio produces a mask — a per-pixel class assignment laid over the cube. It's the input to supervised training, to class statistics, and to every masked export.

Tools

ToolKeyWhat it does
ViewVPan and inspect without editing
BrushBPaint the active class
EraserEClear pixels back to unlabelled
PolygonPClick vertices, close the shape to fill
LassoLFreehand outline, filled on release
Magic Wand—Click a pixel, select everything spectrally similar
Crop / RectangleCDrag a rectangle to define a sub-region
Three classes selected with the Magic Wand — one click per field. Each selection follows the real crop boundary, because the wand matches on the whole spectrum rather than on brightness.
Three classes selected with the Magic Wand — one click per field. Each selection follows the real crop boundary, because the wand matches on the whole spectrum rather than on brightness.

Brush size is adjustable with [ / ] (or - / +), from 1 to 100 pixels, and has a hardness setting — a hard brush writes a binary mask, a soft brush feathers the edge.

The Magic Wand

This is the tool that makes hyperspectral annotation practical. Click a pixel and the wand selects every connected pixel whose full spectrum is within a tolerance of the one you clicked — not just similar in brightness or colour, but similar across all bands.

Tolerance is adjustable. Start low and increase it until the selection covers the material without bleeding into its neighbours. Because it compares whole spectra, it separates materials that look identical in RGB.

Classes

Each class has an id, a name and a colour drawn from a built-in palette. The active class is what the brush, polygon, lasso and wand write. Classes are carried through:

  • Class statistics (mean spectrum per class)
  • Supervised training, in the browser and in the ML Hub
  • CSV export, as a Class column and optionally a Class_Name column
  • .hz project files and JSON export

Mask overlay can be toggled and its opacity adjusted, so you can check your labels against the underlying image.

Undo / redo — Ctrl/Cmd+Z and Ctrl/Cmd+Y (or Shift+Ctrl+Z). The mask history is independent of anything else in the app.

Background handling

Many captures include a tray, a conveyor, or a saturated backdrop that isn't part of the subject.

Background detection on a rambutan capture. The checkerboard is where the background was, leaving only the subject to be measured.
Background detection on a rambutan capture. The checkerboard is where the background was, leaving only the subject to be measured.

Detect Background finds those pixels automatically, and Hide background pixels removes them from the display, from class statistics and from training samples — so a large uniform background doesn't dominate every computation.

Regions of interest

An ROI is a named rectangle over the scene. Draw them with the rectangle tool and name them; they're listed in the sidebar.

Auto ROI detects each distinct subject in a capture and creates an ROI for each — the usual case being a tray of samples photographed together, where you want each specimen as its own file. It can order the detected regions left to right, in reading order, or largest first.

Batch ROI export writes every ROI out as its own file. The naming convention is configurable (default {imagename}_{roi_name}), and output can go to a folder, a zip, or back alongside the source file. See Exporting.

Cropping

Select the Crop tool, drag a rectangle, and apply. The cube is cropped to that region — all bands, all metadata preserved. Cropping is reversible: reset the crop to return to the full scene. Exports after a crop contain only the cropped region, which is usually what you want when you're isolating a specimen.