PFeverCamCalibration Class Reference

Detailed Description

The PFeverCamCalibration class provides methods to associate images produced by DigitalBarriers FeverCam color and thermal camera heads.

PFeverCamCalibration class provides methods to:

  • Perform calibration of color and thermal camera heads from 2 lists of matching points (minimum requirement is 3 non aligned points pairs)
  • Save/Load a calibration to/from a string or a binary file
  • Generate a fused image (color image projected inside the thermal image) to make calibration validation easier
  • Project rectangle in color coordinates to thermal coordinates (useful to retrieve temperature from detected faces in color image)

As a general principle, calibration should be performed with:

  • Easily paired points, typically on objects in the scene that are visible in both color and thermal images
  • Points scattered in the field of view to improve calibration precision
  • Points on objects at a distance from FeverCam corresponding to FeverCam usage, typically at around 5 meters

Definition at line 41 of file PFeverCamCalibration.h.

#include <PFeverCamCalibration.h>

Constructor & Destructor Documentation

◆ PFeverCamCalibration() [1/2]

PFeverCamCalibration::PFeverCamCalibration ( )

Constructs and empty, invalid, FeverCam calibration.

◆ PFeverCamCalibration() [2/2]

PFeverCamCalibration::PFeverCamCalibration ( const PFeverCamCalibration other)

Constructs a shared copy of other.

◆ ~PFeverCamCalibration()

virtual PFeverCamCalibration::~PFeverCamCalibration ( )

Destroys this object.

Member Function Documentation

◆ FuseImages()

PResult PFeverCamCalibration::FuseImages ( const PImage i_colorImg,
const PImage i_thermalImg,
PImage o_fusedImg 
) const

Performs image fusion between color and thermal images using calibration Color image is projected, using calibration matrix, and alpha-blended in thermal image Objects at calibration distance should nicely correspond in the fused image Fails if calibration is invalid.

◆ IsValid()

bool PFeverCamCalibration::IsValid ( ) const

Checks if calibration is valid i.e.

if it can be used for transforming images or rectangles in color image to thermal image coordinates

◆ LoadFromFile()

PResult PFeverCamCalibration::LoadFromFile ( const PString i_calibFilePath)

Load calibration from a binary file generated by SafeToFile call Fails if file is not readable or contents invalid.

◆ LoadFromString()

PResult PFeverCamCalibration::LoadFromString ( const PString i_strCalib)

Loads calibration from a PString Expected format is "a00 a01 a02\na10 a11 a12" Fails if calibration string is invalid (i.e.

incorrect format/contents)

◆ ProjectRectangle()

PResult PFeverCamCalibration::ProjectRectangle ( const PRectanglef i_colorRect,
PRectanglef o_thermalRect 
) const

Projects a rectangle in color image coordinates to thermal image coordinates Output rectangle is the bounding rectangle of the polygon obtained by projection of the color rectangle Note that projection has best correspondence at calibration distance Fails if calibration is invalid.

◆ Reset()

void PFeverCamCalibration::Reset ( )

Clears this calibration, making it invalid.

◆ SaveToFile()

PResult PFeverCamCalibration::SaveToFile ( const PString i_calibFilePath) const

Saves calibration in binary format to a file Fails if calibration is invalid or destination file unreachable.

◆ SaveToString()

PResult PFeverCamCalibration::SaveToString ( PString o_strCalib) const

Saves calibration to a PString Output format is "a00 a01 a02\na10 a11 a12" Fails if calibration is invalid.

◆ UpdateCalibration()

PResult PFeverCamCalibration::UpdateCalibration ( const PPoint2DfList i_colorPts,
const PPoint2DfList i_thermalPoints 

Update calibration using provided list of points Fails if:

  • Not enough points pairs are provided
  • lists of points don't have the same size
  • calibration is impossible to compute (e.g. aligned points) On success, previous calibration is overwritten; on failure, calibration is not modified

Friends And Related Function Documentation

◆ PFeverCamCalibrationImpl

friend class PFeverCamCalibrationImpl

Definition at line 123 of file PFeverCamCalibration.h.