-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCanny.h
52 lines (43 loc) · 1.15 KB
/
Canny.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
/*
* File: Canny.h
* Author: heshan
*
* Created on April 14, 2017, 11:36 PM
*/
#ifndef CANNY_H
#define CANNY_H
#include <iostream>
#include <Magick++.h>
class Canny {
public:
Canny();
Canny(const Canny& orig);
virtual ~Canny();
int detectLines(std::string inputImage, std::string outputImage, int smoothType);
int initializeImage(std::string path);
int grayScale();
int gaussianFilter();
int meanFilter();
int gradients();
float arcTan(float x, float y);
int NonMaximizedSuppression();
int gradientOrientation();
int threshold();
int writeGrayScaleImage(std::string path);
int writeIntermediateImage(std::string path);
int writeImage(std::string path);
int printResultMatrix();
int printGxMatrix();
int printGyMatrix();
int printGmMatrix();
int printGoMatrix();
private:
Magick::Image img;
float **imageMatrix,**resultMatrix,
**gXMatrix,**gYMatrix,
**gradientMagnitudeMatrix,**gradientOrientationMatrix,
**NonMaximizedSuppressionMatrix, **thinnedMatrix;
int width, height;
double range;
};
#endif /* CANNY_H */