Skip to content

Eliminate build warnings #2909

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 5, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions modules/ximgproc/src/edge_drawing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ class EdgeDrawingImpl : public EdgeDrawing
};

EdgeDrawingImpl();
void detectEdges(InputArray src);
void getEdgeImage(OutputArray dst);
void getGradientImage(OutputArray dst);
void detectEdges(InputArray src) CV_OVERRIDE;
void getEdgeImage(OutputArray dst) CV_OVERRIDE;
void getGradientImage(OutputArray dst) CV_OVERRIDE;

vector<vector<Point> > getSegments();
void detectLines(OutputArray lines);
void detectEllipses(OutputArray ellipses);
vector<vector<Point> > getSegments() CV_OVERRIDE;
void detectLines(OutputArray lines) CV_OVERRIDE;
void detectEllipses(OutputArray ellipses) CV_OVERRIDE;

virtual void read(const FileNode& fn) CV_OVERRIDE;
virtual void write(FileStorage& fs) const CV_OVERRIDE;
Expand Down Expand Up @@ -391,13 +391,15 @@ void EdgeDrawingImpl::ComputeGradient()
case SCHARR:
gx = abs(3 * (com1 + com2) + 10 * (smoothImg[i * width + j + 1] - smoothImg[i * width + j - 1]));
gy = abs(3 * (com1 - com2) + 10 * (smoothImg[(i + 1) * width + j] - smoothImg[(i - 1) * width + j]));
break;
case LSD:
// com1 and com2 differs from previous operators, because LSD has 2x2 kernel
com1 = smoothImg[(i + 1) * width + j + 1] - smoothImg[i * width + j];
com2 = smoothImg[i * width + j + 1] - smoothImg[(i + 1) * width + j];

gx = abs(com1 + com2);
gy = abs(com1 - com2);
break;
}

int sum;
Expand Down Expand Up @@ -2943,7 +2945,7 @@ void EdgeDrawingImpl::DetectArcs()
bm->move(noPixels);

// Try to fit a circle to the entire arc of lines
double xc, yc, radius, circleFitError;
double xc = -1, yc = -1, radius = -1, circleFitError = -1;
CircleFit(x, y, noPixels, &xc, &yc, &radius, &circleFitError);

double coverage = noPixels / (CV_2PI * radius);
Expand Down