![]() |
Companion
1.0.0
Companion is an object recognition framework written with OpenCV.
|
#include <Image.h>
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 () |
Streaming class implementation for an image stream.
Companion::Input::Image::Image | ( | int | maxImages | ) |
Default constructor to create an empty image stream.
maxImages | Maximum amount of images that can be loaded at the same time. |
|
virtualdefault |
Destructor;
bool Companion::Input::Image::AddImage | ( | std::string | imgPath | ) |
Store image from given path to FIFO.
imgPath | Image path to store image from. |
True
if the image was stored and false
if image not exists. bool Companion::Input::Image::AddImage | ( | cv::Mat | img | ) |
Store a given image to FIFO.
img | Image to store. |
True
if the image was stored and false
if image not exists. bool Companion::Input::Image::AddImage | ( | int | width, |
int | height, | ||
int | type, | ||
uchar * | data | ||
) |
Store a given image to FIFO.
width | Width of the image to store. |
height | Height of the image to store. |
type | Type of the image to store. |
data | Raw image data to store. |
True
if the image was stored and false
if image not exists.
|
virtual |
Stop this stream.
Implements Companion::Input::Stream.
void Companion::Input::Image::FinishAfterProcessing | ( | ) |
Stop image stream after all images were processed.
|
virtual |
Indicator if stream has finished.
True
if image stream has finished, false
otherwise. Implements Companion::Input::Stream.
|
virtual |
Obtain next image from open image stream.
Implements Companion::Input::Stream.