Home | History | Annotate | Download | only in src

Lines Matching full:points

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