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

#include <ObjectData3D.h>

Inheritance diagram for core::ObjectData3D:
core::ObjectData core::ObjectDataAngular

Public Member Functions

 ObjectData3D (size_t frame_index, cv::Point3d position)
 
void SetTemporalWeight (double weight)
 
void SetSpatialWeight (double weight)
 
cv::Point3d GetPosition () const
 
double GetTemporalWeight () const
 
double GetSpatialWeight () 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::ObjectData
 ObjectData ()
 
 ObjectData (std::size_t frame_index)
 
std::size_t GetFrameIndex () const
 
void SetFrameIndex (size_t index)
 
void SetDetectionScore (double score)
 
double GetDetectionScore ()
 
bool IsVirtual () const
 

Detailed Description

Class for storing a detection in three dimensional space.

Constructor & Destructor Documentation

core::ObjectData3D::ObjectData3D ( size_t  frame_index,
cv::Point3d  position 
)

Creates a new detection with the given index and position.

Parameters
frame_indexThe frame index
positionThe position in three dimensional space

Member Function Documentation

double core::ObjectData3D::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::ObjectData.

Reimplemented in core::ObjectDataAngular.

cv::Point3d core::ObjectData3D::GetPosition ( ) const

Gets the position in three dimensional space.

Returns
The position
double core::ObjectData3D::GetSpatialWeight ( ) const

Gets the spatial weight

Returns
The spatial weight
double core::ObjectData3D::GetTemporalWeight ( ) const

Gets the temporal weight.

Returns
The temporal weight
ObjectDataPtr core::ObjectData3D::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::ObjectData.

Reimplemented in core::ObjectDataAngular.

void core::ObjectData3D::SetSpatialWeight ( double  weight)

Sets the spatial weight

Parameters
weightThe spatial weight
void core::ObjectData3D::SetTemporalWeight ( double  weight)

Sets the temporal weight.

Parameters
weightThe temporal weight
void core::ObjectData3D::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::ObjectData.

Reimplemented in core::ObjectDataAngular.


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