Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<opencv2/imgproc/imgproc.hpp>
- #include<opencv2/highgui/highgui.hpp>
- #include <iostream>
- #include<QString>
- using namespace cv;
- using namespace std;
- const Mat Ix = (Mat1d(3,3) << 0.1464466, 0.0, -0.1464466,
- 0.2071067, 0.0, -0.2071067,
- 0.1464466, 0.0, -0.1464466);
- const Mat Iy = (Mat1d(3,3) << 0.1464466, 0.2071067, 0.1464466,
- 0.0 , 0.0 , 0.0,
- -0.1464466,-0.2071067, -0.1464466);
- const Mat Ixx = (Mat1d(3,3) << 0.25, -0.5, 0.25,
- 0.5 , -1.0, 0.5,
- 0.25, -0.5, 0.25);
- const Mat Iyy = (Mat1d(3,3) << 0.25, 0.5 , 0.25,
- -0.5 ,-1.0 , -0.5,
- 0.25, 0.5 , 0.25);
- const Mat Ixy = (Mat1d(3,3) << 0.25, 0.0, -0.25,
- 0.0 , 0.0, 0.0,
- -0.25, 0.0, 0.25);
- class Tools
- {
- public:
- Tools();
- static Mat _Ix(){return Ix;}
- static Mat _Iy(){return Iy;}
- static Mat _Ixx(){return Ixx;}
- static Mat _Iyy(){return Iyy;}
- static Mat _Ixy(){return Ixy;}
- static Mat _DiZenzoGradient(Mat image);
- static Mat _SapiroGradient(Mat image);
- static Mat _BlomgrenGradient(Mat image);
- static vector<Mat> _DiZenzoRestoration(Mat image,int iterations,double dt);
- static vector<Mat> _SapiroRestoration(Mat image,int iterations,double dt);
- static vector<Mat> _BlomgrenRestoration(Mat image,int iterations,double dt);
- static vector<Mat> _DericheRestoration(Mat image,int iterations,double dt);
- static vector<Mat> _BelfkihRestoration(Mat image,int iterations,double dt);
- static Mat _Convolution(Mat image,Mat kernel);
- static double gaussianOp(int x,int y,double sigma);
- static Mat _GaussianKernel(int size,double sigma);
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement