![]() |
DeepSight SDK
3.0.0
DeepSight SDK - crowd face analysis
|
DeepSight SDK last detections container class class. More...
Public Member Functions | |
| LastDetections (std::chrono::milliseconds maxWindowDuration=std::chrono::milliseconds{ 10000 }) | |
| ds::LastDetections constructor. More... | |
| ~LastDetections () noexcept | |
| ds::LastDetections destructor. | |
| LastDetections (LastDetections &&lastDetections) noexcept | |
| ds::LastDetections move constructor. | |
| LastDetections & | operator= (LastDetections &&lastDetections) noexcept |
| ds::LastDetections move assignment operator. | |
| void | newDetections (const std::vector< ds::Person > &people) |
| Stores the provided detections as last detections for each person. More... | |
| std::vector< ds::Person > | getLastDetections (std::chrono::milliseconds windowDuration=std::chrono::milliseconds{ 0 }) |
| Get the last detection for each person in the provided time window. More... | |
| std::chrono::milliseconds | getMaxWindowDuration () const noexcept |
| Returns the maximum window duration data will be internaly stored. More... | |
| void | setMaxWindowDuration (std::chrono::milliseconds maxWindowDuration) noexcept |
| Sets the maximum window duration data will be internaly stored. More... | |
| void | clean () noexcept |
| Discards all detections from the internal state. More... | |
DeepSight SDK last detections container class class.
The ds::LastDetections class keeps track of the last detection for each ID in a given time window. All detections provided to ds::LastDetections::newDetections calls outside of the window will be discarded.
| ds::LastDetections::LastDetections | ( | std::chrono::milliseconds | maxWindowDuration = std::chrono::milliseconds{ 10000 } | ) |
ds::LastDetections constructor.
| maxWindowDuration | The maximum window of time over which the last detection of each person is kept. |
The maximum time window is defined as the time between (std::chrono::system_clock::now() - maxWindowDuration) and (std::chrono::system_clock::now())
|
noexcept |
Discards all detections from the internal state.
| std::vector< ds::Person > ds::LastDetections::getLastDetections | ( | std::chrono::milliseconds | windowDuration = std::chrono::milliseconds{ 0 } | ) |
Get the last detection for each person in the provided time window.
| windowDuration | The window of time over which the last detection are returned. |
This function returns the last detection of each person in the last windowDuration milliseconds. The windowDuration parameter cannot be larger than the maxWindowDuration provided during construction. All detections older than (std::chrono::system_clock::now() - maxWindowDuration) will be discarded. A person with a detection duration shorter that 1 second is considered a false positive and therefore not returned.
|
noexcept |
Returns the maximum window duration data will be internaly stored.
| void ds::LastDetections::newDetections | ( | const std::vector< ds::Person > & | people | ) |
Stores the provided detections as last detections for each person.
| people | New detections to keep track of. |
This function stores the new detections in the internal buffer. All detections outside the time window will be discarded.
Example usage:
|
noexcept |
Sets the maximum window duration data will be internaly stored.
| maxWindowDuration | The maximum window duration in milliseconds. |