Tracore
|
#include <ObjectData2D.h>
Public Member Functions | |
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 |
virtual double | CompareTo (ObjectDataPtr obj) const override |
virtual bool | IsWithinConstraints (ObjectDataPtr obj, std::unordered_map< std::string, double > &constraints) const override |
virtual ObjectDataPtr | Interpolate (ObjectDataPtr obj, double fraction) const override |
virtual void | Visualize (cv::Mat &image, cv::Scalar &color) const override |
virtual std::string | ToString (char delimiter) const override |
![]() | |
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 |
Class for storing a detection in two dimensional space.
core::ObjectData2D::ObjectData2D | ( | size_t | frame_index, |
cv::Point2d | position | ||
) |
Creates a new detection with the given index and position.
frame_index | The frame index |
position | The position in three dimensional space |
|
overridevirtual |
Compares this object with the given object.
obj | A pointer to the object to compare this object to |
Reimplemented from core::ObjectData.
Reimplemented in core::ObjectDataAngular, and core::ObjectDataBox.
cv::Point2d core::ObjectData2D::GetPosition | ( | ) | const |
Gets the position in two dimensional space.
double core::ObjectData2D::GetSpatialWeight | ( | ) | const |
Gets the spatial weight
double core::ObjectData2D::GetTemporalWeight | ( | ) | const |
Gets the temporal weight.
|
overridevirtual |
Linearly interpolates between this and the given object. Creates a new object to fit between the two objects.
obj | A pointer to the target object |
fraction | Describes 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. |
Reimplemented from core::ObjectData.
Reimplemented in core::ObjectDataAngular, and core::ObjectDataBox.
|
overridevirtual |
Checks if the difference between this object and the specified object is within the constraints specified. The difference is calculated for each constraint separately.
obj | The object to get the difference to |
constraints | The constraints to assure |
Reimplemented from core::ObjectData.
Reimplemented in core::ObjectDataAngular, and core::ObjectDataBox.
void core::ObjectData2D::SetSpatialWeight | ( | double | weight | ) |
Sets the spatial weight
weight | The spatial weight |
void core::ObjectData2D::SetTemporalWeight | ( | double | weight | ) |
Sets the temporal weight.
weight | The temporal weight |
|
overridevirtual |
Returns a string representing the values of this object data.
delimiter | The delimiter used to separate values |
Reimplemented from core::ObjectData.
Reimplemented in core::ObjectDataAngular, and core::ObjectDataBox.
|
overridevirtual |
Visualizes the object in the given image with the given color. This method does nothing, it needs to be overwritten to visualize something.
image | The image to write into |
color | The color to use |
Reimplemented from core::ObjectData.
Reimplemented in core::ObjectDataAngular, and core::ObjectDataBox.