Preprocessing¶
Warning
The processing methods are currently only supported in the Python extension. Some or all of these will be supported in the C library at some point in the future.
The SDK provides a number of built-in pre-processing methods. These generally work as pipeline elements, i.e., they
return new qtec_hv_sdk.Image
Reflectance transformation¶
- jlk import qtec_hv_sdk as hs
from qtec_hv_sdk.preprocessing import make_reference, reflectance_calibration
img = hs.open(“path/to/file.hdr”) dark = hs.open(“path/to/dark_file.hdr”)
white_ref = make_reference(img[:100, :, :]) dark_ref = make_reference(dark)
reflectance = reflectance_calibration(img, white_ref, dark_ref)
Normalization (SNV)¶
import qtec_hv_sdk as hs
from qtec_hv_sdk.preprocessing import snv
img = hs.open("path/to/file.hdr")
normalized = snv(img, dtype=hs.float32)
Savitzky-Golay filter¶
import qtec_hv_sdk as hs
from qtec_hv_sdk.preprocessing import savgol_filter
img = hs.open("path/to/file.hdr")
filtered = savgol_filter(img, window_length=10, polyorder=2, dtype=hs.float32)