PFeverCamAnalytics Class Reference

Detailed Description

The PFeverCamAnalytics class provides analytics functions to process FeverCam images (change detection and black body localization)

  • Temperature change detection using DetectContentChanges which is useful to avoid invalid temperature readings caused by background
  • Black body localization in color and/or thermal image

Definition at line 33 of file PFeverCamAnalytics.h.

#include <PFeverCamAnalytics.h>

Constructor & Destructor Documentation

◆ PFeverCamAnalytics() [1/2]

PFeverCamAnalytics::PFeverCamAnalytics ( double  i_changeThreshold = 1.,
int32  i_histSize = 500,
double  i_learningRate = -1. 
)

Constructs and empty, invalid, FeverCam calibration.

  • i_changeThreshold is the minimum image difference to consider that a pixel doesn't belong to background
  • i_histSize is the maximum number of frames that affect the background
  • i_learningRate is the rate at which background changes (0 doesn't update, 1 updates immediately) negative values let the algorithm automatically adjust

◆ PFeverCamAnalytics() [2/2]

PFeverCamAnalytics::PFeverCamAnalytics ( const PFeverCamAnalytics other)

Constructs a shared copy of other.

◆ ~PFeverCamAnalytics()

virtual PFeverCamAnalytics::~PFeverCamAnalytics ( )
virtual

Destroys this object.

Member Function Documentation

◆ DetectContentChanges()

PResult PFeverCamAnalytics::DetectContentChanges ( const PImage i_thermalImg,
PImage o_contentChangesImg,
int32 &  o_nbChangedPixels 
)

Detects content changes in input thermal image Outputs:

  • o_contentChangesImg: a E_GREY8U PImage with values 0 where no significant changes was detected, 255 for any pixel considered changed
  • o_nbChangedPixels: amount of pixels in input image that have been considered as significantly changes Fails if image is empty or input image size has changed since last call

◆ FindBlackBodyCandidates() [1/2]

static PResult PFeverCamAnalytics::FindBlackBodyCandidates ( const PImage i_img,
PList o_candidatesRects,
bool  i_bFromThermalImage = true,
int32  i_minArea = 40,
double  i_minAreaRatio = 0.8 
)
static

Finds any area that might be a black-body in the input image Detection is done from expected appearance of black body:

  • black/dark in color images
  • bright with constant temperature in thermal images
  • rectangular

Parameters:

  • i_img: input PImage in which black body should be found
  • o_candidatesRects: List of PRectanglef objects, each one corresponding to a possible black body location
  • i_bFromThermalImage: indicates whether input image is thermal or color image
  • i_minArea: minimum area black body should have in image. Minimum size depends on image resolution and distance to black-body
  • i_minAreaRatio: minimum ratio between black body surface and candidate bounding box. Let's user adapt to rotated/non-parallel black body

Fails if:

  • Input image is empty
  • Minimum area is negative
  • Minimum area ratio is negative or larger than 1

◆ FindBlackBodyCandidates() [2/2]

static PResult PFeverCamAnalytics::FindBlackBodyCandidates ( const PImage i_colorImg,
const PImage i_thermalImg,
const PFeverCamCalibration i_calib,
PList o_candidatesRects,
int32  i_minAreaColor = 40,
int32  i_minAreaTherm = 40,
double  minAreaRatio = 0.8 
)
static

Finds black-body candidates in color and thermal images and outputs only those that match according to calibration Detection is done from expected appearance of black body:

  • black/dark in color images
  • bright with constant temperature in thermal images
  • rectangular Additionally, black-body must be detected in both color and thermal image to be returned

Parameters:

  • i_colorImg: input PImage from color camera in which black body should be found
  • i_thermImg: input PImage from thermal camera in which black body should be found
  • i_calib: input calibration (must be valid) to be used to filter candidates that don't match
  • o_candidatesRects: List of PRectanglef objects, each one corresponding to a possible black body location in thermal image coordinates
  • i_minAreaColor: minimum area black body should have in color image
  • i_minAreaTherm: minimum area black body should have in thermal image
  • i_minAreaRatio: minimum ratio between black body surface and candidate bounding box. Let's user adapt to rotated/non-parallel black body

Fails if:

  • One of the input images is empty
  • Calibration is invalid
  • Minimum area is negative
  • Minimum area ratio is negative or larger than 1

◆ SetLearningRate()

PResult PFeverCamAnalytics::SetLearningRate ( double  i_learningRate)

Changes learning rate to adapt to a sudden change of background for example or to stop background learning.

  • Negative values mean algorithm adapts automatically
  • 0 means algorithm doesn't update background
  • 1 means background will be immediately updated. Note that while learning rate is at 1 no content change can be detected Fails if i_learningRate is larger than 1

Friends And Related Function Documentation

◆ PFeverCamAnalyticsImpl

friend class PFeverCamAnalyticsImpl
friend

Definition at line 130 of file PFeverCamAnalytics.h.