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
12public:
13 cv::Mat raw_image;
14
19 void load_from_file(const char* filename) override;
20
26 void assigned(const CVImageImpl* impl, bool req_copy) override;
27
33 void pass_copy(const CVImageImpl* copied) override;
34
39 bool image_valid() override {
40 return !raw_image.empty();
41 }
42};
43
44#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
Definition CVImagePrivateOpencvImp.cpp:6
bool image_valid() override
image_valid check if the image is valid
Definition CVImagePrivateOpencvImp.h:39
void pass_copy(const CVImageImpl *copied) override
pass_copy makes a passing assigned, for OpenCV like it just increase the ref count
Definition CVImagePrivateOpencvImp.cpp:26
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
Definition CVImagePrivateOpencvImp.cpp:11