Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version
  • make the input Point2f, not Point2d
  • make the output Vec4f // a single one

std::vector<cv::Point2f> points;
points.push_back(cv::Point2f(3,3));
points.push_back(cv::Point2f(4,4));
points.push_back(cv::Point2f(5,5));
Vec4f line;
cv::fitLine(points,line,CV_DIST_L2,0,0.01,0.01);