9 #ifndef __PBIO_API__PBIO__EXAMPLE__CV_RAW_IMAGE_H_
10 #define __PBIO_API__PBIO__EXAMPLE__CV_RAW_IMAGE_H_
12 #include <opencv2/opencv.hpp>
61 virtual const unsigned char*
data()
const;
79 virtual int32_t
width()
const;
96 virtual int32_t
height()
const;
118 virtual int32_t
format()
const;
154 const cv::Mat&
mat()
const;
182 ( _mat.type() != CV_8UC1 && _mat.type() != CV_8UC3 ) ||
183 !_mat.isContinuous() )
208 if(_mat.type() == CV_8UC1)
213 if(_mat.type() == CV_8UC3)
237 #endif // __PBIO_API__PBIO__EXAMPLE__CV_RAW_IMAGE_H_
virtual ~CVRawImage()
Virtual destructor.
Definition: CVRawImage.h:42
Example of implementation of the pbio::IRawImage interface via OpenCV.
Definition: CVRawImage.h:28
virtual int32_t format() const
Get an image format.
Definition: CVRawImage.h:206
Grayscale, 8 bit per pixel.
Definition: IRawImage.h:53
IRawImage - Raw image interface.
BGR, 24 bit per pixel, 8 bit per channel.
Definition: IRawImage.h:67
Raw image interface. To use this interface, you need to inherit it and create your own implementation...
Definition: IRawImage.h:30
virtual int32_t width() const
Get an image width.
Definition: CVRawImage.h:192
cv::Mat & mat()
Get a reference to the stored cv::Mat object.
Definition: CVRawImage.h:224
CVRawImage()
Contructor.
Definition: CVRawImage.h:36
virtual const unsigned char * data() const
Get a pointer to the image data buffer.
Definition: CVRawImage.h:178
virtual int32_t height() const
Get an image height.
Definition: CVRawImage.h:199