Lines Matching refs:points

48 static void fitLine2D_wods( const Point2f* points, int count, float *weights, float *line )  in fitLine2D_wods()  argument
60 x += points[i].x; in fitLine2D_wods()
61 y += points[i].y; in fitLine2D_wods()
62 x2 += points[i].x * points[i].x; in fitLine2D_wods()
63 y2 += points[i].y * points[i].y; in fitLine2D_wods()
64 xy += points[i].x * points[i].y; in fitLine2D_wods()
72 x += weights[i] * points[i].x; in fitLine2D_wods()
73 y += weights[i] * points[i].y; in fitLine2D_wods()
74 x2 += weights[i] * points[i].x * points[i].x; in fitLine2D_wods()
75 y2 += weights[i] * points[i].y * points[i].y; in fitLine2D_wods()
76 xy += weights[i] * points[i].x * points[i].y; in fitLine2D_wods()
99 static void fitLine3D_wods( const Point3f * points, int count, float *weights, float *line ) in fitLine3D_wods() argument
117 float x = points[i].x; in fitLine3D_wods()
118 float y = points[i].y; in fitLine3D_wods()
119 float z = points[i].z; in fitLine3D_wods()
139 float x = points[i].x; in fitLine3D_wods()
140 float y = points[i].y; in fitLine3D_wods()
141 float z = points[i].z; in fitLine3D_wods()
202 static double calcDist2D( const Point2f* points, int count, float *_line, float *dist ) in calcDist2D() argument
213 x = points[j].x - px; in calcDist2D()
214 y = points[j].y - py; in calcDist2D()
223 static double calcDist3D( const Point3f* points, int count, float *_line, float *dist ) in calcDist3D() argument
235 x = points[j].x - px; in calcDist3D()
236 y = points[j].y - py; in calcDist3D()
237 z = points[j].z - pz; in calcDist3D()
315 static void fitLine2D( const Point2f * points, int count, int dist, in fitLine2D() argument
333 return fitLine2D_wods( points, count, 0, line ); in fitLine2D()
381 fitLine2D_wods( points, count, w, _line ); in fitLine2D()
408 err = calcDist2D( points, count, _line, r ); in fitLine2D()
437 fitLine2D_wods( points, count, w, _line ); in fitLine2D()
455 static void fitLine3D( Point3f * points, int count, int dist, in fitLine3D() argument
471 return fitLine3D_wods( points, count, 0, line ); in fitLine3D()
516 fitLine3D_wods( points, count, w, _line ); in fitLine3D()
550 err = calcDist3D( points, count, _line, r ); in fitLine3D()
579 fitLine3D_wods( points, count, w, _line ); in fitLine3D()
597 Mat points = _points.getMat(); in fitLine() local
600 int npoints2 = points.checkVector(2, -1, false); in fitLine()
601 int npoints3 = points.checkVector(3, -1, false); in fitLine()
605 if( points.depth() != CV_32F || !points.isContinuous() ) in fitLine()
608 points.convertTo(temp, CV_32F); in fitLine()
609 points = temp; in fitLine()
613 fitLine2D( points.ptr<Point2f>(), npoints2, distType, in fitLine()
616 fitLine3D( points.ptr<Point3f>(), npoints3, distType, in fitLine()
630 cv::Mat points = cv::cvarrToMat(array, false, false, 0, &buf); in cvFitLine() local
631 cv::Mat linemat(points.checkVector(2) >= 0 ? 4 : 6, 1, CV_32F, line); in cvFitLine()
633 cv::fitLine(points, linemat, dist, param, reps, aeps); in cvFitLine()