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

#include <DetectionSequence.h>

Public Member Functions

 DetectionSequence (const std::string &name="DetectionSequence")
 
void AddObject (ObjectDataPtr object_data)
 
void Clear ()
 
std::string GetName () const
 
ObjectDataPtr GetObject (size_t frame_index, size_t object_index) const
 
size_t GetFrameCount () const
 
size_t GetObjectCount (size_t frame_index) const
 

Friends

std::ostream & operator<< (std::ostream &os, const DetectionSequence &obj)
 

Detailed Description

Class for storing a full sequence of frame, each with multiple detected objects.

Constructor & Destructor Documentation

core::DetectionSequence::DetectionSequence ( const std::string &  name = "DetectionSequence")

Creates a detection sequence with the given name.

Parameters
nameThe name of this sequence

Member Function Documentation

void core::DetectionSequence::AddObject ( ObjectDataPtr  object_data)

Adds a new object, creates a new frame vector if the given objects frame index is greater than the current frame vector size.

Parameters
object_dataThe object to add
void core::DetectionSequence::Clear ( )

Removes all objects.

size_t core::DetectionSequence::GetFrameCount ( ) const

Gets the frame count.

Returns
The frame count
std::string core::DetectionSequence::GetName ( ) const

Gets the name of this sequence.

Returns
The name
ObjectDataPtr core::DetectionSequence::GetObject ( size_t  frame_index,
size_t  object_index 
) const

Gets a pointer to the object in the given frame with the given index.

Parameters
frame_indexThe frame to get the object from
object_indexThe objects index in the corresponding frame
Returns
A pointer to the stored object data
size_t core::DetectionSequence::GetObjectCount ( size_t  frame_index) const

Gets the object count in the given frame.

Parameters
frame_indexThe frame to get the object count of
Returns
The number of objects in this frame

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const DetectionSequence obj 
)
friend

Overrides the << operator for easy output.

Parameters
osThe stream to write to
objThe object to write into the stream
Returns
The stream written to

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