From: <bl...@us...> - 2009-07-16 10:20:29
|
Revision: 4043 http://hugin.svn.sourceforge.net/hugin/?rev=4043&view=rev Author: blimbo Date: 2009-07-16 10:20:23 +0000 (Thu, 16 Jul 2009) Log Message: ----------- Bug fix in Mapto3d Modified Paths: -------------- hugin/branches/gsoc2009_lenscalibration/src/lens_calibrate/MapPoints.cpp Modified: hugin/branches/gsoc2009_lenscalibration/src/lens_calibrate/MapPoints.cpp =================================================================== --- hugin/branches/gsoc2009_lenscalibration/src/lens_calibrate/MapPoints.cpp 2009-07-15 17:34:59 UTC (rev 4042) +++ hugin/branches/gsoc2009_lenscalibration/src/lens_calibrate/MapPoints.cpp 2009-07-16 10:20:23 UTC (rev 4043) @@ -58,14 +58,17 @@ // Map points to 3D and fill the above array with XYZPoints for(unsigned int i = 0; i < n; i++){ - double x_point = invert_size_factor * lines[current_line][n]->x; - double y_point = invert_size_factor * lines[current_line][n]->y; + double x_point = invert_size_factor * lines[current_line][i]->x; + double y_point = invert_size_factor * lines[current_line][i]->y; // Move coordinates so 0,0 is in the centre of the image x_point += original_width/2; y_point *= -1; y_point += original_height/2; + cout << "(x,y)\t(" << x_point << "," << y_point << ")" << endl; + + // r - distance of a point from the center of projection, in pixels double r = PointPointDist(x_point,y_point,p[1],p[2]); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |