logo       

cvFitLine: msg#01182

lib.opencv

Subject: cvFitLine

Hi!
I am trying to fit a line to some points.
I take the points as
for(int i = first; i<last+1; i++)
{
points[k] = cvPointTo32f(position[i]);
k++;
}
cvFitLine2D(points,no_of_frames,CV_DIST_L2,0, 0.0, 0.0,line);
I also tried
cvFitLine(points, CV_DIST_L2, 0, 0.01, 0.01, line);

My program compiles correctly but for both these commads, I get the error:
OpenCV Error: Bad argument
in function [cvlinefit.cpp:624]:cvFitLine():
Input array must be 1d continuous array of 2d or 3d points
OpenCV: terminating the application

I am using opencv-0.9.7 on Fedora Core 3.

I desparately need help, since all my work is stuck because of this.

Thanks in advance.


---------------------------------
New Yahoo! Messenger with Voice. Call regular phones from your PC and save big.

[Non-text portions of this message have been removed]



Change settings: http://www.yahoogroups.com/mygroups, select
Get Emails (get all posts)
Daily Digest (one summary email per day)
Read on the web (read posts on the web only)Or Unsubscribe by mailing
OpenCV-unsubscribe@xxxxxxxxxxxxxxx



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise