Skip to content

Commit 746acb9

Browse files
committed
Merge pull request #2909 from alalek:build_warnings
2 parents f7efcba + e59b8f7 commit 746acb9

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

modules/ximgproc/src/edge_drawing.cpp

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ class EdgeDrawingImpl : public EdgeDrawing
2323
};
2424

2525
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;
2929

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;
3333

3434
virtual void read(const FileNode& fn) CV_OVERRIDE;
3535
virtual void write(FileStorage& fs) const CV_OVERRIDE;
@@ -391,13 +391,15 @@ void EdgeDrawingImpl::ComputeGradient()
391391
case SCHARR:
392392
gx = abs(3 * (com1 + com2) + 10 * (smoothImg[i * width + j + 1] - smoothImg[i * width + j - 1]));
393393
gy = abs(3 * (com1 - com2) + 10 * (smoothImg[(i + 1) * width + j] - smoothImg[(i - 1) * width + j]));
394+
break;
394395
case LSD:
395396
// com1 and com2 differs from previous operators, because LSD has 2x2 kernel
396397
com1 = smoothImg[(i + 1) * width + j + 1] - smoothImg[i * width + j];
397398
com2 = smoothImg[i * width + j + 1] - smoothImg[(i + 1) * width + j];
398399

399400
gx = abs(com1 + com2);
400401
gy = abs(com1 - com2);
402+
break;
401403
}
402404

403405
int sum;
@@ -2943,7 +2945,7 @@ void EdgeDrawingImpl::DetectArcs()
29432945
bm->move(noPixels);
29442946

29452947
// 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;
29472949
CircleFit(x, y, noPixels, &xc, &yc, &radius, &circleFitError);
29482950

29492951
double coverage = noPixels / (CV_2PI * radius);

0 commit comments

Comments
 (0)