@@ -23,13 +23,13 @@ class EdgeDrawingImpl : public EdgeDrawing
23
23
};
24
24
25
25
EdgeDrawingImpl ();
26
- void detectEdges (InputArray src);
27
- void getEdgeImage (OutputArray dst);
28
- void getGradientImage (OutputArray dst);
26
+ void detectEdges (InputArray src) CV_OVERRIDE ;
27
+ void getEdgeImage (OutputArray dst) CV_OVERRIDE ;
28
+ void getGradientImage (OutputArray dst) CV_OVERRIDE ;
29
29
30
- vector<vector<Point> > getSegments ();
31
- void detectLines (OutputArray lines);
32
- void detectEllipses (OutputArray ellipses);
30
+ vector<vector<Point> > getSegments () CV_OVERRIDE ;
31
+ void detectLines (OutputArray lines) CV_OVERRIDE ;
32
+ void detectEllipses (OutputArray ellipses) CV_OVERRIDE ;
33
33
34
34
virtual void read (const FileNode& fn) CV_OVERRIDE;
35
35
virtual void write (FileStorage& fs) const CV_OVERRIDE;
@@ -391,13 +391,15 @@ void EdgeDrawingImpl::ComputeGradient()
391
391
case SCHARR:
392
392
gx = abs (3 * (com1 + com2) + 10 * (smoothImg[i * width + j + 1 ] - smoothImg[i * width + j - 1 ]));
393
393
gy = abs (3 * (com1 - com2) + 10 * (smoothImg[(i + 1 ) * width + j] - smoothImg[(i - 1 ) * width + j]));
394
+ break ;
394
395
case LSD:
395
396
// com1 and com2 differs from previous operators, because LSD has 2x2 kernel
396
397
com1 = smoothImg[(i + 1 ) * width + j + 1 ] - smoothImg[i * width + j];
397
398
com2 = smoothImg[i * width + j + 1 ] - smoothImg[(i + 1 ) * width + j];
398
399
399
400
gx = abs (com1 + com2);
400
401
gy = abs (com1 - com2);
402
+ break ;
401
403
}
402
404
403
405
int sum;
@@ -2943,7 +2945,7 @@ void EdgeDrawingImpl::DetectArcs()
2943
2945
bm->move (noPixels);
2944
2946
2945
2947
// Try to fit a circle to the entire arc of lines
2946
- double xc, yc, radius, circleFitError;
2948
+ double xc = - 1 , yc = - 1 , radius = - 1 , circleFitError = - 1 ;
2947
2949
CircleFit (x, y, noPixels, &xc, &yc, &radius, &circleFitError);
2948
2950
2949
2951
double coverage = noPixels / (CV_2PI * radius);
0 commit comments