PDetectionList Class Reference

Detailed Description

The PDetectionList class represents nothing more than a collection of detections (PDetection), Typically PDetectionList's are returned from a PDetector.

Definition at line 30 of file PDetectionList.h.

#include <PDetectionList.h>

Constructor & Destructor Documentation

◆ PDetectionList() [1/2]

PDetectionList::PDetectionList ( papillon::int32  size = 0)

Constructs an empty list of detections.

◆ PDetectionList() [2/2]

PDetectionList::PDetectionList ( const PDetectionList other)

Constructs a shared copy of other.

◆ ~PDetectionList()

virtual PDetectionList::~PDetectionList ( )

Destroys this object.

Member Function Documentation

◆ Get()

PDetection PDetectionList::Get ( papillon::int32  n) const

Returns the nth detection of this list or a bad detection (PDetection::Bad()) if n is not the valid range.

◆ GetBoundingBox()

PRectanglef PDetectionList::GetBoundingBox ( ) const

Returns the minimum bounding axis-parallel rectangle of all the features specified in the combined feature maps.

◆ GetLargest()

PDetection PDetectionList::GetLargest ( ) const

Returns the detection of this list with the largest area (number of pixels) or a bad detection (PDetection::Bad()) if the list is empty.

◆ Keep()

void PDetectionList::Keep ( const PSizei minBoundingBox,
const PSizei maxBoundingBox,
const PString objectType,
papillon::int32  maxNumber = 0 

Only keep detections whose bounding boxes lie in the given range.

If any of the width's or height's of the minimum or maximum bounding range are set to zero then that range is not checked.

◆ operator=()

PDetectionList& PDetectionList::operator= ( const PDetectionList other)

Performs a shared copy of other to this object.

◆ RemoveSmallest()

void PDetectionList::RemoveSmallest ( papillon::int32  minWidthBBox,
papillon::int32  minHeightBBox,
const PString objectType 

Removes detections from this list which have a bounding box smaller than the specified size.

◆ Translate()

void PDetectionList::Translate ( float  x,
float  y 

Translates all detections (coordinates of points and rectangles) by the specified (x,y) values.