Companion  1.0.0
Companion is an object recognition framework written with OpenCV.
Public Member Functions | List of all members
Companion::Input::Image Class Reference

#include <Image.h>

Inheritance diagram for Companion::Input::Image:
Inheritance graph
[legend]
Collaboration diagram for Companion::Input::Image:
Collaboration graph
[legend]

Public Member Functions

 Image (int maxImages)
 
virtual ~Image ()=default
 
bool AddImage (std::string imgPath)
 
bool AddImage (cv::Mat img)
 
bool AddImage (int width, int height, int type, uchar *data)
 
cv::Mat ObtainImage ()
 
bool IsFinished ()
 
void Finish ()
 
void FinishAfterProcessing ()
 

Detailed Description

Streaming class implementation for an image stream.

Author
Andreas Sekulski, Dimitri Kotlovsky

Constructor & Destructor Documentation

◆ Image()

Companion::Input::Image::Image ( int  maxImages)

Default constructor to create an empty image stream.

Parameters
maxImagesMaximum amount of images that can be loaded at the same time.

◆ ~Image()

virtual Companion::Input::Image::~Image ( )
virtualdefault

Destructor;

Member Function Documentation

◆ AddImage() [1/3]

bool Companion::Input::Image::AddImage ( std::string  imgPath)

Store image from given path to FIFO.

Parameters
imgPathImage path to store image from.
Returns
True if the image was stored and false if image not exists.

◆ AddImage() [2/3]

bool Companion::Input::Image::AddImage ( cv::Mat  img)

Store a given image to FIFO.

Parameters
imgImage to store.
Returns
True if the image was stored and false if image not exists.

◆ AddImage() [3/3]

bool Companion::Input::Image::AddImage ( int  width,
int  height,
int  type,
uchar *  data 
)

Store a given image to FIFO.

Parameters
widthWidth of the image to store.
heightHeight of the image to store.
typeType of the image to store.
dataRaw image data to store.
Returns
True if the image was stored and false if image not exists.

◆ Finish()

void Companion::Input::Image::Finish ( )
virtual

Stop this stream.

Implements Companion::Input::Stream.

◆ FinishAfterProcessing()

void Companion::Input::Image::FinishAfterProcessing ( )

Stop image stream after all images were processed.

◆ IsFinished()

bool Companion::Input::Image::IsFinished ( )
virtual

Indicator if stream has finished.

Returns
True if image stream has finished, false otherwise.

Implements Companion::Input::Stream.

◆ ObtainImage()

cv::Mat Companion::Input::Image::ObtainImage ( )
virtual

Obtain next image from open image stream.

Returns
An empty cv::Mat object if no image is obtained otherwise an cv::Mat entity from the obtained image.

Implements Companion::Input::Stream.


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