#include <ObjectDataMap.h>
|
| ObjectDataMap (size_t frame_index) |
|
| ObjectDataMap (size_t frame_index, std::vector< std::string > keys, std::vector< double > value_list) |
|
| ObjectDataMap (size_t frame_index, std::vector< std::string > keys, std::vector< double > value_list, std::vector< double > weight_list) |
|
| ObjectDataMap (size_t frame_index, std::vector< std::string > keys, std::vector< std::pair< double, double >> value_weight_list) |
|
double | GetValue (std::string key) |
|
double | GetWeight (std::string key) |
|
void | Put (std::string key, double value, double weight) |
|
void | Put (std::string key, std::pair< double, double > value_weight) |
|
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 |
|
| 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 |
|
Stores a map of key-value-weight pairs. The weight is used to compare this object with other objects.
core::ObjectDataMap::ObjectDataMap |
( |
size_t |
frame_index | ) |
|
Creates a new empty object data map.
- Parameters
-
frame_index | The index of the frame this object was detected in |
core::ObjectDataMap::ObjectDataMap |
( |
size_t |
frame_index, |
|
|
std::vector< std::string > |
keys, |
|
|
std::vector< double > |
value_list |
|
) |
| |
Creates a object data map with the given keys and values and an equal weight for every value.
- Parameters
-
frame_index | The index of the frame this object was detected in |
keys | The keys for the values to store |
value_list | The values to store with the given keys |
core::ObjectDataMap::ObjectDataMap |
( |
size_t |
frame_index, |
|
|
std::vector< std::string > |
keys, |
|
|
std::vector< double > |
value_list, |
|
|
std::vector< double > |
weight_list |
|
) |
| |
Creates a object data map with the given keys and values and an given weight for the corresponding key-value pair.
- Parameters
-
frame_index | The index of the frame this object was detected in |
keys | The keys for the values to store |
value_list | The values to store with the given keys |
weight_list | The weights to store with the given key-value pairs |
core::ObjectDataMap::ObjectDataMap |
( |
size_t |
frame_index, |
|
|
std::vector< std::string > |
keys, |
|
|
std::vector< std::pair< double, double >> |
value_weight_list |
|
) |
| |
Creates a object data map with the given keys and value-weight pairs.
- Parameters
-
frame_index | The index of the frame this object was detected in |
keys | The keys for the values to store |
value_weight_list | The value-weight-pairs to store with the keys |
double core::ObjectDataMap::CompareTo |
( |
ObjectDataPtr |
obj | ) |
const |
|
overridevirtual |
Compares this object with the given object.
- Parameters
-
obj | A pointer to the object to compare this object to |
- Returns
- A double value indicating the comparison result
Reimplemented from core::ObjectData.
double core::ObjectDataMap::GetValue |
( |
std::string |
key | ) |
|
Gets the value of the given key.
- Parameters
-
- Returns
- The value
double core::ObjectDataMap::GetWeight |
( |
std::string |
key | ) |
|
Gets the weight of the given key.
- Parameters
-
- Returns
- The weight
ObjectDataPtr core::ObjectDataMap::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
-
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. |
- Returns
- The interpolated object
Reimplemented from core::ObjectData.
void core::ObjectDataMap::Put |
( |
std::string |
key, |
|
|
double |
value, |
|
|
double |
weight |
|
) |
| |
Stores the given value-weight pair with the given key. If the key is already stored it will be overridden with the new pair.
- Parameters
-
key | The key to store the value-weight pair at |
value | The value of the value-weight pair |
weight | The weight of the value-weight pair |
void core::ObjectDataMap::Put |
( |
std::string |
key, |
|
|
std::pair< double, double > |
value_weight |
|
) |
| |
Stores the given value-weight pair with the given key. If the key is already stored it will be overridden with the new pair.
- Parameters
-
key | The key to store the value-weight pair at |
value_weight | The value-weight pair |
void core::ObjectDataMap::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
-
image | The image to write into |
color | The color to use |
Reimplemented from core::ObjectData.
The documentation for this class was generated from the following files: