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

#include <DetectionSequence.h>

Public Member Functions

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

Protected Member Functions

virtual void Print (std::ostream &os) 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 ( std::string  name)

Creates a detection sequence with the given name.

Parameters
nameThe name of this sequence

Member Function Documentation

void core::DetectionSequence::AddObject ( ObjectData  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
ObjectData core::DetectionSequence::GetObject ( size_t  frame_index,
size_t  object_index 
)

Gets 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
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 object in this frame
void core::DetectionSequence::Print ( std::ostream &  os) const
protectedvirtual

Used in the << operator

Parameters
osThe stream to write to

Friends And Related Function Documentation

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

Overrides the << operator for easy output. Calls the print method.

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: