SatDump 2.0.0-alpha-76a915210
Loading...
Searching...
No Matches
satdump::image::ImgCalibHandler Struct Reference

Image Calibration Handler. This handles converting between raw pixel values and calibrated/physical units. It is a simple linear transform. More...

#include <meta.h>

Public Member Functions

double getVal (double img_val)
 Convert from raw image value to calibration.
double setVal (double cal_val)
 Convert from calibrated value to raw image value.

Public Attributes

std::string unit
double scale = 0
double offset = 0
double min = 0
double max = 0

Friends

void to_json (nlohmann::json &j, const ImgCalibHandler &v)
void from_json (const nlohmann::json &j, ImgCalibHandler &v)

Detailed Description

Image Calibration Handler. This handles converting between raw pixel values and calibrated/physical units. It is a simple linear transform.

Parameters
unitcalibrated unit (or name)
scalescale (a of ax+b function)
offsetoffset (b of ax+b function)

Member Function Documentation

◆ getVal()

double satdump::image::ImgCalibHandler::getVal ( double img_val)
inline

Convert from raw image value to calibration.

Parameters
img_valthe raw pixel value
Returns
calibrated value

◆ setVal()

double satdump::image::ImgCalibHandler::setVal ( double cal_val)
inline

Convert from calibrated value to raw image value.

Parameters
cal_valthe calibrated value
Returns
raw pixel value

The documentation for this struct was generated from the following file: