-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmyClass.h
52 lines (39 loc) · 902 Bytes
/
myClass.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#include "myHeaders.h"
/*
* Author: Vipin Chaudhary
* github: https://github.com/vipin14119/openCV
*/
namespace vipin {
class OpenCV {
private:
Mat *input_image;
Mat *output_image;
Mat *kernel;
public:
OpenCV(void);
OpenCV (Mat *I);
// virtual ~myOpenCV ();
void showImage(const string title);
Mat filter2d(void);
void setKernel(Mat* kern);
Mat getKernel(void);
};
extern OpenCV::OpenCV(Mat *I){
input_image = I;
}
extern void OpenCV::showImage(const string title){
namedWindow(title, CV_WINDOW_AUTOSIZE);
imshow(title, *input_image);
}
extern void OpenCV::setKernel(Mat *kern){
kernel = kern;
}
extern Mat OpenCV::getKernel(){
return *kernel;
}
extern Mat OpenCV::filter2d(){
Mat output_image;
filter2D(*input_image, output_image, input_image->depth(), *kernel);
return output_image;
}
}