CCIMXDesktop
 
Loading...
Searching...
No Matches
CVImagePrivateOpencvImp.h
1#ifndef CVIMAGEPRIVATEOPENCVIMP_H
2#define CVIMAGEPRIVATEOPENCVIMP_H
3/* Here placed the common dependency files */
4#include "CVImageImpl.h"
5#include <opencv2/opencv.hpp>
6
7class CVImageOpencvImpl : public CVImageImpl {
8public:
9 cv::Mat raw_image;
10
15 void load_from_file(const char* filename) override;
16
22 void assigned(const CVImageImpl* impl, bool req_copy) override;
23
29 void pass_copy(const CVImageImpl* copied) override;
30
35 bool image_valid() override {
36 return !raw_image.empty();
37 }
38};
39
40#endif // CVIMAGEPRIVATEOPENCVIMP_H
The CVImageImpl class is the image interface classes, or, backend of the CVImage.
Definition CVImageImpl.h:9
opencv implement of the CVImage
Definition CVImagePrivateOpencvImp.h:11
void load_from_file(const char *filename) override
load_from_file loads the image from file
bool image_valid() override
image_valid check if the image is valid
Definition CVImagePrivateOpencvImp.h:35
void pass_copy(const CVImageImpl *copied) override
pass_copy makes a passing assigned, for OpenCV like it just increase the ref count
cv::Mat raw_image
handling raw image in opencv
Definition CVImagePrivateOpencvImp.h:13
void assigned(const CVImageImpl *impl, bool req_copy) override
assigned assigns the image to this image