String[]titlesDebug={"dX-derivative","dY-derivative","abs-derivative","diff-X (should be 0)","diff-Y (should be 0)","dX-delta/delta","dY-delta/delta"};
String[]titlesDebug={"dX-derivative","dY-derivative","abs-derivative","diff-X (should be 0)","diff-Y (should be 0)","dX-delta/delta","dY-delta/delta","dX-delta","dY-delta"};
GenericDialoggd=newGenericDialog("Fitting Strategy Step Configuration, step "+numSeries+" number of enabled images="+this.distortionCalibrationData.getNumEnabled());
GenericDialoggd=newGenericDialog("Fitting Strategy Step Configuration, step "+numSeries+" number of enabled images="+this.distortionCalibrationData.getNumEnabled());
gd.addCheckbox("Copy all from previous series (ignore all other fields)",false);
gd.addCheckbox("Copy all from the series below, ignore all other fields",false);
gd.addNumericField("Source series to copy from",(numSeries>0)?(numSeries-1):(numSeries+1),0,3,"");
gd.addCheckbox("Remove all (but first) images, reopen dialog",false);// remove all will be invalid, copied from the previous
gd.addCheckbox("Remove all (but first) images, reopen dialog",false);// remove all will be invalid, copied from the previous
gd.addCheckbox("Select all images, reopen dialog",false);
gd.addCheckbox("Select all images, reopen dialog",false);
if(numEstimated>0){
if(numEstimated>0){
...
@@ -1571,6 +1581,7 @@ I* - special case when the subcamera is being adjusted/replaced. How to deal wit
...
@@ -1571,6 +1581,7 @@ I* - special case when the subcamera is being adjusted/replaced. How to deal wit
gd.showDialog();
gd.showDialog();
if(gd.wasCanceled())return-2;
if(gd.wasCanceled())return-2;
booleancopyFromPrevious=gd.getNextBoolean();
booleancopyFromPrevious=gd.getNextBoolean();
intsourceStrategy=(int)gd.getNextNumber();
booleanremoveAllImages=gd.getNextBoolean();
booleanremoveAllImages=gd.getNextBoolean();
booleanselectAllImages=gd.getNextBoolean();
booleanselectAllImages=gd.getNextBoolean();
booleanselectEstimated=false;
booleanselectEstimated=false;
...
@@ -1595,7 +1606,17 @@ I* - special case when the subcamera is being adjusted/replaced. How to deal wit
...
@@ -1595,7 +1606,17 @@ I* - special case when the subcamera is being adjusted/replaced. How to deal wit
returnnumSeries;// caller will repeat with the same series
returnnumSeries;// caller will repeat with the same series
doubleki=a[i]*(rr_pow_i*rr-1.0);// scaling of distorted distance from this term's center (does not include pinhole center shift itself)
// double[] dkD=new double [12];
deltaX+=x*ki;// relative distorted distance from the center
double[]dkD=newdouble[16];
deltaY+=y*ki;
// (7) kD=(Da*(r/r0)^3+Db*(r/r0)^2+Dc*(r/r0)^1+(1-Da-Db-Dc)) correction to the actual distance from the image point to the lens axis due to distortion
// if ((debugLevel>2) && ((r_xyod[i][0]!=0.0) || (r_xyod[i][0]!=0.0))){
// (7) kD=(Da5*(r/r0)^4+(Da*(r/r0)^3+Db*(r/r0)^2+Dc*(r/r0)^1+(1-Da-Db-Dc-Da5)) correction to the actual distance from the image point to the lens axis due to distortion