PSafeZoneEdge2dParameters Class Reference

Detailed Description

The PSafeZoneEdge2dParameters is an helper class to configure SafeZoneEdge2d PAnalytics plugin.

See plugin_analyticsSafeZoneEdge2D to learn more.

This class inherits from papillon::PProperties.

Definition at line 61 of file PSafeZoneEdge2dParameters.h.

#include <PSafeZoneEdge2dParameters.h>

Constructor & Destructor Documentation

◆ PSafeZoneEdge2dParameters()

PSafeZoneEdge2dParameters::PSafeZoneEdge2dParameters ( )
inline

Constructs an empty set of parameters.

To get a pre-configured set of parameters, see BuildDefaultParameters().

See also
BuildDefaultParameters()

Definition at line 70 of file PSafeZoneEdge2dParameters.h.

◆ ~PSafeZoneEdge2dParameters()

virtual PSafeZoneEdge2dParameters::~PSafeZoneEdge2dParameters ( )
inlinevirtual

Destroys this object.

Definition at line 75 of file PSafeZoneEdge2dParameters.h.

Member Function Documentation

◆ BuildDefaultParameters()

static PSafeZoneEdge2dParameters PSafeZoneEdge2dParameters::BuildDefaultParameters ( )
inlinestatic

Builds a standard set of parameters:

  • image width = 176 (QCIF)
  • image height = 144 (QCIF)
  • sensitivity = 0.5
  • post alarm time = 0 millisecond
  • no ROI (region of interest), i.e. the algorithm will analyse images entirely
  • no filter set on target size

Definition at line 86 of file PSafeZoneEdge2dParameters.h.

◆ EnableDNNClassifier()

void PSafeZoneEdge2dParameters::EnableDNNClassifier ( bool  enable)
inline

Enable the DNN Classifier.

Definition at line 239 of file PSafeZoneEdge2dParameters.h.

◆ EnableDNNDetector()

void PSafeZoneEdge2dParameters::EnableDNNDetector ( bool  enable)
inline

Enable the DNN Detector.

Definition at line 269 of file PSafeZoneEdge2dParameters.h.

◆ FromAnalytics()

static PSafeZoneEdge2dParameters PSafeZoneEdge2dParameters::FromAnalytics ( const papillon::PAnalytics &  analytics)
inlinestatic

Retrieves parameters from a SafeZoneEdge2d analytics.

If the specified analytics is not a SafeZoneEdge2d analytics, then returned parameters will be an empty container.

Definition at line 106 of file PSafeZoneEdge2dParameters.h.

◆ GetDNNClassifierEngine()

PString PSafeZoneEdge2dParameters::GetDNNClassifierEngine ( ) const
inline

Gets the current DNN engine for the classifier.

Definition at line 259 of file PSafeZoneEdge2dParameters.h.

◆ GetDNNDetectorEngine()

PString PSafeZoneEdge2dParameters::GetDNNDetectorEngine ( ) const
inline

Gets the current DNN engine for the detector.

Definition at line 289 of file PSafeZoneEdge2dParameters.h.

◆ GetImageHeight()

papillon::int32 PSafeZoneEdge2dParameters::GetImageHeight ( ) const
inline

Returns the image height (in pixels) used to performed video analytics or -1 if this parameter is not available.

Definition at line 149 of file PSafeZoneEdge2dParameters.h.

◆ GetImageWidth()

papillon::int32 PSafeZoneEdge2dParameters::GetImageWidth ( ) const
inline

Returns the image width (in pixels) used to performed video analytics or -1 if this parameter is not available.

Definition at line 144 of file PSafeZoneEdge2dParameters.h.

◆ GetMaxTargetHeight()

papillon::int32 PSafeZoneEdge2dParameters::GetMaxTargetHeight ( ) const
inline

Returns the maximum height of targets to be detected, or -1 if this parameter is not available.

Definition at line 200 of file PSafeZoneEdge2dParameters.h.

◆ GetMaxTargetWidth()

papillon::int32 PSafeZoneEdge2dParameters::GetMaxTargetWidth ( ) const
inline

Returns the maximum width of targets to be detected, or -1 if this parameter is not available.

Definition at line 180 of file PSafeZoneEdge2dParameters.h.

◆ GetMinTargetHeight()

papillon::int32 PSafeZoneEdge2dParameters::GetMinTargetHeight ( ) const
inline

Returns the minimum height of targets to be detected, or -1 if this parameter is not available.

Definition at line 190 of file PSafeZoneEdge2dParameters.h.

◆ GetMinTargetWidth()

papillon::int32 PSafeZoneEdge2dParameters::GetMinTargetWidth ( ) const
inline

Returns the minimum width of targets to be detected, or -1 if this parameter is not available.

Definition at line 170 of file PSafeZoneEdge2dParameters.h.

◆ GetPostAlarmTimeMs()

papillon::int32 PSafeZoneEdge2dParameters::GetPostAlarmTimeMs ( ) const
inline

Returns the post-alarm-time parameter is milliseconds or -1 if this parameter is not available.

Definition at line 212 of file PSafeZoneEdge2dParameters.h.

◆ GetROI()

papillon::PRectanglef PSafeZoneEdge2dParameters::GetROI ( ) const
inline

Returns the ROI (Region Of Interest) if available or an invalid rectangle otherwise.

Definition at line 234 of file PSafeZoneEdge2dParameters.h.

◆ GetSensitivity()

double PSafeZoneEdge2dParameters::GetSensitivity ( ) const
inline

Returns the sensitivity parameter of NaN if this parameter is not available.

Definition at line 160 of file PSafeZoneEdge2dParameters.h.

◆ IsDNNClassifierEnabled()

bool PSafeZoneEdge2dParameters::IsDNNClassifierEnabled ( ) const
inline

Returns true if DNN Classifier is enabled, false otherwise.

Returns false if the parameter is not available.

Definition at line 245 of file PSafeZoneEdge2dParameters.h.

◆ IsDNNDetectorEnabled()

bool PSafeZoneEdge2dParameters::IsDNNDetectorEnabled ( ) const
inline

Returns true if DNN Detector is enabled, false otherwise.

Returns false if the parameter is not available.

Definition at line 276 of file PSafeZoneEdge2dParameters.h.

◆ IsROIEnabled()

bool PSafeZoneEdge2dParameters::IsROIEnabled ( ) const
inline

Returns true if ROI (Region Of Interest) is enabled, false otherwise.

Returns false if the parameter is not available.

Definition at line 223 of file PSafeZoneEdge2dParameters.h.

◆ SetDNNClassifierEngine()

void PSafeZoneEdge2dParameters::SetDNNClassifierEngine ( const PString dnnClassifierEngine)
inline

Sets the preferred DNN engine for the classifier.

Currently supported 'cpu' or 'gpu'. If 'gpu' is specified and the GPU is not able to be used at run-time, it will default back to the 'cpu'.

Definition at line 252 of file PSafeZoneEdge2dParameters.h.

◆ SetDNNDetectorEngine()

void PSafeZoneEdge2dParameters::SetDNNDetectorEngine ( const PString dnnDetectorEngine)
inline

Sets the preferred DNN engine for the detector.

Currently supported 'cpu' or 'gpu'. If 'gpu' is specified and the GPU is not able to be used at run-time, it will default back to the 'cpu'.

Definition at line 282 of file PSafeZoneEdge2dParameters.h.

◆ SetImageSize()

void PSafeZoneEdge2dParameters::SetImageSize ( papillon::int32  width,
papillon::int32  height 
)
inline

Sets image resolution (in pixels) used to performed analysis.

Definition at line 139 of file PSafeZoneEdge2dParameters.h.

◆ SetMaxTargetHeight()

void PSafeZoneEdge2dParameters::SetMaxTargetHeight ( papillon::int32  maxHeight)
inline

Sets the maximum height of targets to be detected.

Definition at line 195 of file PSafeZoneEdge2dParameters.h.

◆ SetMaxTargetWidth()

void PSafeZoneEdge2dParameters::SetMaxTargetWidth ( papillon::int32  maxWidth)
inline

Sets the maximum width of targets to be detected.

Definition at line 175 of file PSafeZoneEdge2dParameters.h.

◆ SetMinTargetHeight()

void PSafeZoneEdge2dParameters::SetMinTargetHeight ( papillon::int32  minHeight)
inline

Sets the minimum height of targets to be detected.

Definition at line 185 of file PSafeZoneEdge2dParameters.h.

◆ SetMinTargetWidth()

void PSafeZoneEdge2dParameters::SetMinTargetWidth ( papillon::int32  minWidth)
inline

Sets the minimum width of targets to be detected.

Definition at line 165 of file PSafeZoneEdge2dParameters.h.

◆ SetPostAlarmTimeMs()

void PSafeZoneEdge2dParameters::SetPostAlarmTimeMs ( papillon::int32  timeMs)
inline

Sets the post alarm time in milliseconds.

Post alarm time corresponds to amount of time during which alarm will be kept after disappearance of a target.

Definition at line 207 of file PSafeZoneEdge2dParameters.h.

◆ SetROI()

void PSafeZoneEdge2dParameters::SetROI ( const papillon::PRectanglef &  roi)
inline

Sets the ROI (Region Of Interest) in relative coordinates (all coordinates are in 0..1).

Relative coordinates allows to scale ROI according to the frame resolution.

Definition at line 229 of file PSafeZoneEdge2dParameters.h.

◆ SetSensitivity()

void PSafeZoneEdge2dParameters::SetSensitivity ( double  sensitivity)
inline

Sets analytics sensitivity in 0..1 (0=less detections, 1=more detections) The specified value will automatically be clamped if outside the valid range.

Definition at line 155 of file PSafeZoneEdge2dParameters.h.

◆ UseROI()

void PSafeZoneEdge2dParameters::UseROI ( bool  enable)
inline

Enables or disables ROI (Region Of Interest) usage.

Definition at line 217 of file PSafeZoneEdge2dParameters.h.