Advertisement
Guest User

Untitled

a guest
Feb 19th, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.95 KB | None | 0 0
  1. #include<opencv2/imgproc/imgproc.hpp>
  2. #include<opencv2/highgui/highgui.hpp>
  3. #include <iostream>
  4. #include<QString>
  5.  
  6. using namespace cv;
  7. using namespace std;
  8.  
  9.  
  10. const Mat Ix = (Mat1d(3,3) << 0.1464466, 0.0, -0.1464466,
  11. 0.2071067, 0.0, -0.2071067,
  12. 0.1464466, 0.0, -0.1464466);
  13. const Mat Iy = (Mat1d(3,3) << 0.1464466, 0.2071067, 0.1464466,
  14. 0.0 , 0.0 , 0.0,
  15. -0.1464466,-0.2071067, -0.1464466);
  16. const Mat Ixx = (Mat1d(3,3) << 0.25, -0.5, 0.25,
  17. 0.5 , -1.0, 0.5,
  18. 0.25, -0.5, 0.25);
  19. const Mat Iyy = (Mat1d(3,3) << 0.25, 0.5 , 0.25,
  20. -0.5 ,-1.0 , -0.5,
  21. 0.25, 0.5 , 0.25);
  22. const Mat Ixy = (Mat1d(3,3) << 0.25, 0.0, -0.25,
  23. 0.0 , 0.0, 0.0,
  24. -0.25, 0.0, 0.25);
  25.  
  26. class Tools
  27. {
  28. public:
  29. Tools();
  30. static Mat _Ix(){return Ix;}
  31. static Mat _Iy(){return Iy;}
  32. static Mat _Ixx(){return Ixx;}
  33. static Mat _Iyy(){return Iyy;}
  34. static Mat _Ixy(){return Ixy;}
  35.  
  36. static Mat _DiZenzoGradient(Mat image);
  37. static Mat _SapiroGradient(Mat image);
  38. static Mat _BlomgrenGradient(Mat image);
  39. static vector<Mat> _DiZenzoRestoration(Mat image,int iterations,double dt);
  40. static vector<Mat> _SapiroRestoration(Mat image,int iterations,double dt);
  41. static vector<Mat> _BlomgrenRestoration(Mat image,int iterations,double dt);
  42. static vector<Mat> _DericheRestoration(Mat image,int iterations,double dt);
  43. static vector<Mat> _BelfkihRestoration(Mat image,int iterations,double dt);
  44.  
  45. static Mat _Convolution(Mat image,Mat kernel);
  46.  
  47. static double gaussianOp(int x,int y,double sigma);
  48. static Mat _GaussianKernel(int size,double sigma);
  49.  
  50.  
  51.  
  52. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement