// sb.append("\t"+IJ.d2s(fittingStrategy.distortionCalibrationData.pars[imgNum][parNumber],3+extraDecimals)); // TODO: make an array of decimals per parameter
imp.setProperty("comment_arrays","Array corrections from acquired image to radially distorted, in pixels");
...
...
@@ -5984,17 +5988,28 @@ List calibration
imp.setProperty("px0",""+subCam.px0);
imp.setProperty("py0",""+subCam.py0);
imp.setProperty("comment_azimuth","lens center azimuth, CW from top, degrees");
imp.setProperty("height",""+subCam.height);
imp.setProperty("comment_elevation","lens elevation from horizontal, positive - above horizon, degrees");
imp.setProperty("elevation",""+subCam.theta);
imp.setProperty("comment_roll","lens rotation around the lens axis. Positive - CW looking to the target, degrees");
imp.setProperty("roll",""+subCam.psi);
imp.setProperty("comment_cartesian","Use cartesian coordinates for the sensor in the camera CS (forward, right,aheading), instead of (radius, azimuth, heading)");
imp.setProperty("cartesian",""+subCam.cartesian);
// cartesian parameters
imp.setProperty("comment_forward","lens forward (towards target) displacement in the camera CS");
imp.setProperty("forward",""+subCam.forward);
imp.setProperty("comment_right","lens right (looking towards target) displacement in the camera CS");
imp.setProperty("right",""+subCam.right);
imp.setProperty("comment_aheading","lens axis horizontal direction, degrees. Positive - CW from the target (looking from top)");
imp.setProperty("aheading",""+subCam.heading);
// cylindrical parameters
imp.setProperty("azimuth",""+subCam.azimuth);
imp.setProperty("comment_radius","lens center distance from the camera vertical axis, mm");
imp.setProperty("radius",""+subCam.radius);
imp.setProperty("comment_height","lens center vertical position from the head center, mm");
imp.setProperty("height",""+subCam.height);
imp.setProperty("comment_heading","lens heading - added to azimuth");
imp.setProperty("heading",""+subCam.phi);
imp.setProperty("comment_elevation","lens elevation from horizontal, positive - above horizon, degrees");
imp.setProperty("elevation",""+subCam.theta);
imp.setProperty("comment_roll","lens rotation around the lens axis. Positive - CW looking to the target, degrees");
imp.setProperty("roll",""+subCam.psi);
imp.setProperty("comment_channel","number of the sensor (channel) in the camera");
// public double azimuth; // azimuth of the lens entrance pupil center, degrees, clockwise looking from top
// public double radius; // mm, distance from the rotation axis
// public double height; // mm, up - from the origin point
// public double phi; // degrees, optical axis from azimuth/r vector, clockwise heading
// public double theta; // degrees, optical axis from the eyesis horizon, positive - up elevation
// public double psi; // degrees, rotation (of the sensor) around the optical axis. Positive if camera is rotated clockwise looking to the target roll
publicdoublefocalLength=4.5;
publicdoublepixelSize=2.2;//um
publicdoubledistortionRadius=2.8512;// mm - half width of the sensor
publicdoubledistortionA8=0.0;//r^8 (normalized to focal length or to sensor half width?)
publicdoubledistortionA7=0.0;//r^7 (normalized to focal length or to sensor half width?)
publicdoubledistortionA6=0.0;//r^6 (normalized to focal length or to sensor half width?)
publicdoubledistortionA5=0.0;//r^5 (normalized to focal length or to sensor half width?)
publicdoubledistortionA=0.0;// r^4 (normalized to focal length or to sensor half width?)
publicdoubledistortionB=0.0;// r^3
publicdoubledistortionC=0.0;// r^2
publicdoublepx0=1296.0;// center of the lens on the sensor, pixels
publicdoublepy0=968.0;// center of the lens on the sensor, pixels
privatedouble[]rByRDist=null;
privatedoublestepR=0.001;
privatedoublemaxR=2.0;// calculate up to this*distortionRadius
publicvoidsetDistortion(){
// imp.setProperty("distortion_formula", "(normalized by distortionRadius in mm) Rdist/R=A8*R^7+A7*R^6+A6*R^5+A5*R^4+A*R^3+B*R^2+C*R+(1-A6-A7-A6-A5-A-B-C)");