Commit e0b7389d authored by songyuncen's avatar songyuncen

remove compile warnings in shapedescr.cpp

parent a69eeb6b
...@@ -164,8 +164,8 @@ void findSecondPoint(const PT *pts, int i, Point2f &center, float &radius) ...@@ -164,8 +164,8 @@ void findSecondPoint(const PT *pts, int i, Point2f &center, float &radius)
for (int j = 1; j < i; ++j) for (int j = 1; j < i; ++j)
{ {
float dx = center.x - (float)pts[j].x; dx = center.x - (float)pts[j].x;
float dy = center.y - (float)pts[j].y; dy = center.y - (float)pts[j].y;
if (norm(Point2f(dx, dy)) < radius) if (norm(Point2f(dx, dy)) < radius)
{ {
continue; continue;
...@@ -224,13 +224,11 @@ void cv::minEnclosingCircle( InputArray _points, Point2f& _center, float& _radiu ...@@ -224,13 +224,11 @@ void cv::minEnclosingCircle( InputArray _points, Point2f& _center, float& _radiu
const Point* ptsi = points.ptr<Point>(); const Point* ptsi = points.ptr<Point>();
const Point2f* ptsf = points.ptr<Point2f>(); const Point2f* ptsf = points.ptr<Point2f>();
Point2f pt = is_float ? ptsf[0] : Point2f((float)ptsi[0].x,(float)ptsi[0].y);
// point count <= 3 // point count <= 3
if (count <= 3) if (count <= 3)
{ {
Point2f ptsf3[3]; Point2f ptsf3[3];
for (size_t i = 0; i < count; ++i) for (int i = 0; i < count; ++i)
{ {
ptsf3[i] = (is_float) ? ptsf[i] : Point2f((float)ptsi[i].x, (float)ptsi[i].y); ptsf3[i] = (is_float) ? ptsf[i] : Point2f((float)ptsi[i].x, (float)ptsi[i].y);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment