PFeatureRectangle Class Reference

Detailed Description

The PFeatureRectangle class represents a sub-pixel accurate 2D area on an image; PFeatureRectangle instances are immutable (thread-safe).

Definition at line 27 of file PFeatureRectangle.h.

#include <PFeatureRectangle.h>

Constructor & Destructor Documentation

◆ PFeatureRectangle() [1/3]

PFeatureRectangle::PFeatureRectangle ( )

Constructs an invalid feature rectangle (coordinates are set to (NaN, NaN, NaN, NaN)).

◆ PFeatureRectangle() [2/3]

PFeatureRectangle::PFeatureRectangle ( const PFeatureRectangle other)

Constructs a shared copy of other.

◆ PFeatureRectangle() [3/3]

PFeatureRectangle::PFeatureRectangle ( const PRectanglef rectangle,
const PString description,
float  confidence 

Constructs a feature from its rectangle, its description and a confidence value.

◆ ~PFeatureRectangle()

virtual PFeatureRectangle::~PFeatureRectangle ( )

Destroys this object.

Member Function Documentation

◆ GetConfidence()

float PFeatureRectangle::GetConfidence ( ) const

Returns the confidence of this feature point.

◆ GetDescription()

PString PFeatureRectangle::GetDescription ( ) const

Returns the description associated with this feature point.

◆ GetRectangle()

const PRectanglef& PFeatureRectangle::GetRectangle ( ) const

Returns the location of this feature rectangle.

The returned rectangle is given in image coordinates: (0,0) is the top-left corner of the image.

◆ IsValid()

bool PFeatureRectangle::IsValid ( ) const

Returns true if the feature rectangle is valid, false otherwise.

◆ operator!=()

bool PFeatureRectangle::operator!= ( const PFeatureRectangle other) const

Returns true if this PFeatureRectangle is different from other; otherwise returns false.

◆ operator=()

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

Performs a shared copy of other to this object.

◆ operator==()

bool PFeatureRectangle::operator== ( const PFeatureRectangle other) const

Returns true if this PFeatureRectangle is equal to other; otherwise returns false.