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

#include <DetectionSequence.h>

Public Member Functions

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

Friends

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

Detailed Description

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

Constructor & Destructor Documentation

core::DetectionSequence::DetectionSequence ( std::string const &  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
size_t core::DetectionSequence::GetFrameOffset ( ) const

Gets the frame offset.

Returns
The Frame offset
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 
)

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)

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,
DetectionSequence const &  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: