Tracore
|
#include <ObjectData.h>
Public Member Functions | |
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 |
virtual double | CompareTo (ObjectDataPtr obj) const |
virtual bool | IsWithinConstraints (ObjectDataPtr obj, std::unordered_map< std::string, double > &constraints) const |
virtual ObjectDataPtr | Interpolate (ObjectDataPtr obj, double fraction) const |
virtual void | Visualize (cv::Mat &image, cv::Scalar &color) const |
virtual std::string | ToString (char delimiter) const |
Friends | |
std::ostream & | operator<< (std::ostream &os, const ObjectData &obj) |
Base class for all detected objects. Stores the corresponding frame index.
core::ObjectData::ObjectData | ( | ) |
Creates a new empty virtual ObjectData
core::ObjectData::ObjectData | ( | std::size_t | frame_index | ) |
Creates a new ObjectData with the given frame index
frame_index | the index in which the object was detected |
|
virtual |
Compares this object with the given object.
obj | A pointer to the object to compare this object to |
Reimplemented in core::Tracklet, core::ObjectData2D, core::ObjectDataAngular, and core::ObjectDataBox.
double core::ObjectData::GetDetectionScore | ( | ) | const |
Gets the detection score
std::size_t core::ObjectData::GetFrameIndex | ( | ) | const |
Gets the frame index
|
virtual |
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 in core::Tracklet, core::ObjectData2D, core::ObjectDataAngular, and core::ObjectDataBox.
bool core::ObjectData::IsVirtual | ( | ) | const |
Is this node considered a virtual node
|
virtual |
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 in core::ObjectData2D, core::ObjectDataAngular, and core::ObjectDataBox.
void core::ObjectData::SetDetectionScore | ( | double | score | ) |
Sets the detection score
score | The detection score |
void core::ObjectData::SetFrameIndex | ( | size_t | index | ) |
Sets the frame index
index | The new frame index |
|
virtual |
Returns a string representing the values of this object data.
delimiter | The delimiter used to separate values |
Reimplemented in core::ObjectData2D, core::ObjectDataAngular, and core::ObjectDataBox.
|
virtual |
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 in core::Tracklet, core::ObjectData2D, core::ObjectDataAngular, and core::ObjectDataBox.
|
friend |
Overrides the << operator for custom output. Calls the print method.
os | The stream to write to |
obj | The object to write into the stream |