Tracore
Public Member Functions | List of all members
core::ObjectDataAngular Class Reference

#include <ObjectDataAngular.h>

Inheritance diagram for core::ObjectDataAngular:
core::ObjectData2D core::ObjectData

Public Member Functions

 ObjectDataAngular (size_t frame_index, const cv::Point2d &position, double angle)
 
 ObjectDataAngular (size_t frame_index, const cv::Point2d &position, double angle, double temporal_weight, double spatial_weight, double angular_weight)
 
void SetAngularWeight (double weight)
 
double GetAngle () const
 
double GetAngularWeight () const
 
virtual double CompareTo (ObjectDataPtr obj) const override
 
virtual ObjectDataPtr Interpolate (ObjectDataPtr obj, double fraction) const override
 
virtual void Visualize (cv::Mat &image, cv::Scalar &color) const override
 
- Public Member Functions inherited from core::ObjectData2D
 ObjectData2D (size_t frame_index, cv::Point2d position)
 
void SetTemporalWeight (double weight)
 
void SetSpatialWeight (double weight)
 
cv::Point2d GetPosition () const
 
double GetTemporalWeight () const
 
double GetSpatialWeight () const
 
- Public Member Functions inherited from core::ObjectData
 ObjectData ()
 
 ObjectData (std::size_t frame_index)
 
std::size_t GetFrameIndex () const
 
void SetFrameIndex (size_t index)
 
void SetDetectionScore (double score)
 
double GetDetectionScore () const
 
bool IsVirtual () const
 

Detailed Description

Class for storing a detection in two dimensional space with an rotation angle in radians.

Constructor & Destructor Documentation

core::ObjectDataAngular::ObjectDataAngular ( size_t  frame_index,
const cv::Point2d &  position,
double  angle 
)

Creates a new object in the given frame, with the given position and the given angle.

Parameters
frame_indexThe index of the frame
positionThe position in two dimensional space
angleThe rotation angle in radians
core::ObjectDataAngular::ObjectDataAngular ( size_t  frame_index,
const cv::Point2d &  position,
double  angle,
double  temporal_weight,
double  spatial_weight,
double  angular_weight 
)

Creates a new object in the given frame, with the given position and the given angle. The weights are used in the comparison calculation.

Parameters
frame_indexThe index of the frame
positionThe position in two dimensional space
angleThe rotation angle in radians
temporal_weightThe temporal weight
spatial_weightThe spatial weight
angular_weightThe angular weight

Member Function Documentation

double core::ObjectDataAngular::CompareTo ( ObjectDataPtr  obj) const
overridevirtual

Compares this object with the given object.

Parameters
objA pointer to the object to compare this object to
Returns
A double value indicating the comparison result

Reimplemented from core::ObjectData2D.

double core::ObjectDataAngular::GetAngle ( ) const

Gets the rotation angle in radians.

Returns
The rotation angle in radians
double core::ObjectDataAngular::GetAngularWeight ( ) const

Gets the angular weight.

Returns
The angular weight
ObjectDataPtr core::ObjectDataAngular::Interpolate ( ObjectDataPtr  obj,
double  fraction 
) const
overridevirtual

Linearly interpolates between this and the given object. Creates a new object to fit between the two objects.

Parameters
objA pointer to the target object
fractionDescribes where the interpolation should be done. A fraction of zero is a clone of this object, a fraction of one is a clone of the target object.
Returns
The interpolated object

Reimplemented from core::ObjectData2D.

void core::ObjectDataAngular::SetAngularWeight ( double  weight)

Sets the angular weight.

Parameters
weightThe angular weight
void core::ObjectDataAngular::Visualize ( cv::Mat &  image,
cv::Scalar &  color 
) const
overridevirtual

Visualizes the object in the given image with the given color. This method does nothing, it needs to be overwritten to visualize something.

Parameters
imageThe image to write into
colorThe color to use

Reimplemented from core::ObjectData2D.


The documentation for this class was generated from the following files: