double psi=camPars.eyesisSubCameras[stationNumber][0].psi; // degrees, rotation (of the sensor) around the optical axis. Positive if camera is rotated clockwise looking to the target
double psi=camPars.eyesisSubCameras[stationNumber][0].psi; // degrees, rotation (of the sensor) around the optical axis. Positive if camera is rotated clockwise looking to the target
publicbooleansaveSeries=false;// just for the dialog
publicbooleansaveSeries=false;// just for the dialog
publicdouble[][][]pixelCorrection=null;// for each sensor: corr-X, corr-Y, mask, flat-field-Red, flat-field-Green, flat-field-Blue
publicdouble[][][]pixelCorrection=null;// for each sensor: corr-X, corr-Y, mask, flat-field-Red, flat-field-Green, flat-field-Blue
publicString[]pathNames=null;
publicString[]pathNames=null;
publicintpixelCorrectionDecimation=1;
publicintpixelCorrectionWidth=2592;
// Will have to chage for different resolution
publicintpixelCorrectionHeight=1936;
// public int [][] pixelCorrectionWHD= null; // For each sensor -width, height, decimation
// public int defaultPixelCorrectionDecimation= 1;
// public int defaultPixelCorrectionWidth= 2592;
// public int defaultPixelCorrectionHeight= 1936;
// @Deprecated
// public int pixelCorrectionDecimation= 1;
// @Deprecated
// public int pixelCorrectionWidth= 2592;
// @Deprecated
// public int pixelCorrectionHeight= 1936;
publicdoubleRMSscale=Math.sqrt(2.0);// errors for x and y are calculated separately, so actual error is larger
publicdoubleRMSscale=Math.sqrt(2.0);// errors for x and y are calculated separately, so actual error is larger
publicbooleanshowIndex=true;
publicbooleanshowIndex=true;
...
@@ -143,23 +157,27 @@ public class Distortions {
...
@@ -143,23 +157,27 @@ public class Distortions {
publicAtomicIntegerstopRequested=null;// 1 - stop now, 2 - when convenient
publicAtomicIntegerstopRequested=null;// 1 - stop now, 2 - when convenient
publicString[]status={"",""};
publicString[]status={"",""};
/*
public void showStatus (String msg, int slot){
String separator = " | ";
publicintgetSensorWidth(intsubCam){returnfittingStrategy.distortionCalibrationData.eyesisCameraParameters.getSensorWidth(subCam);}// for the future? different sensors
if ((slot<0) || (slot>=status.length)) return;
publicintgetSensorHeight(intsubCam){returnfittingStrategy.distortionCalibrationData.eyesisCameraParameters.getSensorHeight(subCam);}// for the future? different sensors
status[slot]=msg;
publicintgetDecimateMasks(intsubCam){returnfittingStrategy.distortionCalibrationData.eyesisCameraParameters.getDecimateMasks(subCam);}// for the future? different sensors
String s=status[0];
for (int i=1;i<status.length;i++) if (status[i].length()>0) s+=separator+status[i];
publicintgetSensorWidth(){returnfittingStrategy.distortionCalibrationData.eyesisCameraParameters.getSensorWidth();}// for the future? different sensors
IJ.showStatus(s);
publicintgetSensorHeight(){returnfittingStrategy.distortionCalibrationData.eyesisCameraParameters.getSensorHeight();}// for the future? different sensors
}
publicintgetDecimateMasks(){returnfittingStrategy.distortionCalibrationData.eyesisCameraParameters.getDecimateMasks();}// for the future? different sensors
imp.setProperty("comment_decimation","when decimation use integer divide to find the index, corection values are in non-decimated pixels");
imp.setProperty("comment_decimation","when decimation use integer divide to find the index, corection values are in non-decimated pixels");
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)");
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)");
gd.addNumericField("Pattern full width",this.patternWidth,1,6,"mm");// pattern full width in mm
gd.addNumericField("Pattern full width",this.patternWidth,1,6,"mm");// pattern full width in mm
gd.addNumericField("Pattern full height",this.patternHeight,1,6,"mm");// pattern full width in mm
gd.addNumericField("Pattern full height",this.patternHeight,1,6,"mm");// pattern full width in mm
gd.addNumericField("Distance between opposite sign nodes",this.patternHalfPeriod,4,8,"mm");// istance between opposite sign nodes in mm
gd.addNumericField("Distance between opposite sign nodes",this.patternHalfPeriod,4,8,"mm");// distance between opposite sign nodes in mm
gd.addNumericField("Pattern tilt (clockwise)",this.patternTilt,1,5,"degrees");// pattern tilt (degrees) - U clockwise from X-right (V clockwise from Y-down)
gd.addNumericField("Pattern tilt (clockwise)",this.patternTilt,3,8,"degrees");// pattern tilt (degrees) - U clockwise from X-right (V clockwise from Y-down)
gd.addNumericField("Average grid RED (1.0 for white)",this.averageRGB[0],3,5,"x");//
gd.addNumericField("Average grid RED (1.0 for white)",this.averageRGB[0],3,5,"x");//
gd.addNumericField("Average grid GREEN (1.0 for white)",this.averageRGB[1],3,5,"x");//
gd.addNumericField("Average grid GREEN (1.0 for white)",this.averageRGB[1],3,5,"x");//
gd.addNumericField("Average grid BLUE (1.0 for white)",this.averageRGB[2],3,5,"x");//
gd.addNumericField("Average grid BLUE (1.0 for white)",this.averageRGB[2],3,5,"x");//
gd.addNumericField("Number of sensors (>24 - two groups, 0 - do not change)",this.defaultNumberOfChannels,0);//
gd.addNumericField("Number of sensors (>24 - two groups, 0 - do not change)",this.defaultNumberOfChannels,0);//
gd.addCheckbox("Reset to standard fine pitch pattern",false);
gd.addCheckbox("Reset to standard LWIR pattern",false);
gd.addMessage("Pressing OK will recalculate grid and clear current grid calibration");
gd.addMessage("Pressing OK will recalculate grid and clear current grid calibration");