publicintstationNumber=0;// changes when camera/goniometer is moved to new position
...
...
@@ -448,17 +448,19 @@ import ij.text.TextWindow;
// public GridImageParameters firstImage=null; // first non-null image in the sert (update to have current parameters?)
publicdoubletimeStamp;
publicint[]motors=null;
publicdoublegoniometerAxial=Double.NaN;
publicdoublegoniometerTilt=Double.NaN;
publicdoubleinterAxisDistance;// 8 distance in mm between two goniometer axes
publicdoubleinterAxisAngle;// 9 angle in degrees between two goniometer axes minus 90. negative if "vertical" axis is rotated
publicdoublehorAxisErrPhi;//10 angle in degrees "horizontal" goniometer axis is rotated around target Y axis from target X axis (CW)
publicdoublehorAxisErrPsi;//11 angle in degrees "horizontal" goniometer axis is rotated around moving X axis (up)
publicdoubleentrancePupilForward;//12 common to all lenses - distance from the sensor to the lens entrance pupil
publicdoublecenterAboveHorizontal;//13 camera center distance along camera axis above the closest point to horizontal rotation axis (adds to height of each
publicdouble[]GXYZ=newdouble[3];//14 (12) coordinates (in mm) of the goniometer horizontal axis closest to the moving one in target system
// this.GXYZ[stationNumber][1], //15 (13) y
// this.GXYZ[stationNumber][2], //16 (14) z
publicdoublegoniometerAxial=Double.NaN;// 6
publicdoublegoniometerTilt=Double.NaN;// 7
publicdoubleinterAxisDistance;// 8 distance in mm between two goniometer axes
publicdoubleinterAxisAngle;// 9 angle in degrees between two goniometer axes minus 90. negative if "vertical" axis is rotated
publicdoublehorAxisErrPhi;//10 angle in degrees "horizontal" goniometer axis is rotated around target Y axis from target X axis (CW)
publicdoublehorAxisErrPsi;//11 angle in degrees "horizontal" goniometer axis is rotated around moving X axis (up)
publicdoubleentrancePupilForward;//12 common to all lenses - distance from the sensor to the lens entrance pupil
publicdoublecenterAboveHorizontal;//13 camera center distance along camera axis above the closest point to horizontal rotation axis (adds to height of each
publicdouble[]GXYZ=newdouble[3];//14 (12) coordinates (in mm) of the goniometer horizontal axis closest to the moving one in target system
publicdoubleneckRight;//17 angle in degrees of the camera as a whole rotated clockwise around axis to the target
publicdoubleneckBack;//18 angle in degrees of the camera as a whole rotated clockwise around axis to the target
publicdouble[]neckXZ=newdouble[2];//19,20 optical head offset in mm relative to the mount point (centerAboveHorizontal as Y)
publicbooleanorientationEstimated=true;// orientation is estimated from other stes, not adjusted by LMA
publicdoublesetWeight=0.0;// weight of this set when calculating errors
for (int j=0;j<this.gIS[i].imageSet.length;j++) if (this.gIS[i].imageSet[j]!=null) setGA(this.gIS[i].imageSet[j].imgNumber,this.gIS[i].goniometerAxial);
this.gIS[i].orientationEstimated=true;
if (this.debugLevel>1) {
System.out.print(String.format("Setting goniometerAxial for the image set #%4d (%18.6f) to ", i, this.gIS[i].timeStamp));
if (overwriteAll || Double.isNaN(this.gIS[i].goniometerTilt )){
this.gIS[i].goniometerTilt= -esp.theta;
for (int j=0;j<this.gIS[i].imageSet.length;j++) if (this.gIS[i].imageSet[j]!=null) setGH(this.gIS[i].imageSet[j].imgNumber,this.gIS[i].goniometerTilt);
this.gIS[i].orientationEstimated=true;
if (this.debugLevel>1) {
System.out.print(String.format("Setting goniometerTilt for the image set #%4d (%18.6f) to ", i, this.gIS[i].timeStamp));
2,// 4 public double pitch=0.0; // angle in degrees from perpendicular to the pattern, 0 - towards wall, positive - up
3,// 5 public double roll=0.0; // angle in degrees rotation around camera optical axis (perpendicular to pattern if yaw==0, pitch==0), positive - clockwise
7,// 6 public double focalLength=4.5;
16,// 7 public double px0=1296.0; // center of the lens on the sensor, pixels
17,// 8 public double py0=968.0; // center of the lens on the sensor, pixels
16,// 7 public double px0=1296.0; // center of the lens on the sensor, pixels
17,// 8 public double py0=968.0; // center of the lens on the sensor, pixels
// public double distortionRadius= 2.8512; // mm - half width of the sensor
9,// 9 public double distortionA5=0.0; // r^5 (normalized to focal length or to sensor half width?)
10,// 10 public double distortionA5=0.0; // r^5 (normalized to focal length or to sensor half width?)
11,// 11 public double distortionA5=0.0; // r^5 (normalized to focal length or to sensor half width?)
12,// 12 public double distortionA5=0.0; // r^5 (normalized to focal length or to sensor half width?)
13,// 13 public double distortionA=0.0; // r^4 (normalized to focal length or to sensor half width?)
14,// 14 public double distortionB=0.0; // r^3
15,// 15 public double distortionC=0.0; // r^2
9,// 9 public double distortionA8=0.0; // r^5 (normalized to focal length or to sensor half width?)
10,// 10 public double distortionA7=0.0; // r^5 (normalized to focal length or to sensor half width?)
11,// 11 public double distortionA6=0.0; // r^5 (normalized to focal length or to sensor half width?)
12,// 12 public double distortionA5=0.0; // r^5 (normalized to focal length or to sensor half width?)
13,// 13 public double distortionA=0.0; // r^4 (normalized to focal length or to sensor half width?)
14,// 14 public double distortionB=0.0; // r^3
15,// 15 public double distortionC=0.0; // r^2
18,// 16 Orthogonal elongation for r^2"
19,// 17 Diagonal elongation for r^2"
20,// 18 Distortion center shift X for r^3"
...
...
@@ -802,15 +802,15 @@ dPXmmc/dphi=
2,// 4 public double pitch=0.0; // angle in degrees from perpendicular to the pattern, 0 - towards wall, positive - up
3,// 5 public double roll=0.0; // angle in degrees rotation around camera optical axis (perpendicular to pattern if yaw==0, pitch==0), positive - clockwise
7,// 6 public double focalLength=4.5;
16,// 7 public double px0=1296.0; // center of the lens on the sensor, pixels
17,// 8 public double py0=968.0; // center of the lens on the sensor, pixels
9,// 9 public double distortionA8=0.0; // r^5 (normalized to focal length or to sensor half width?)
10,// 10 public double distortionA7=0.0; // r^5 (normalized to focal length or to sensor half width?)
11,// 11 public double distortionA6=0.0; // r^5 (normalized to focal length or to sensor half width?)
16,// 7 public double px0=1296.0; // center of the lens on the sensor, pixels
17,// 8 public double py0=968.0; // center of the lens on the sensor, pixels
9,// 9 public double distortionA8=0.0; // r^8 (normalized to focal length or to sensor half width?)
10,// 10 public double distortionA7=0.0; // r^7 (normalized to focal length or to sensor half width?)
11,// 11 public double distortionA6=0.0; // r^6 (normalized to focal length or to sensor half width?)
12,// 12 public double distortionA5=0.0; // r^5 (normalized to focal length or to sensor half width?)
13,// 13 public double distortionA=0.0; // r^4 (normalized to focal length or to sensor half width?)
14,// 14 public double distortionB=0.0; // r^3
15,// 15 public double distortionC=0.0; // r^2
13,// 13 public double distortionA=0.0; // r^4 (normalized to focal length or to sensor half width?)
publicdouble[]horAxisErrPsi;// angle in degrees "horizontal" goniometer axis is rotated around moving X axis (up)
publicdouble[]entrancePupilForward;// common to all lenses - distance from the sensor to the lens entrance pupil
publicdouble[]centerAboveHorizontal;// camera center distance along camera axis above the closest point to horizontal rotation axis (adds to height of each SFE)
publicdouble[][]GXYZ=null;// [numStations]{x,y,z} coordinates (in mm) of the goniometer horizontal axis closest to the moving one in target system
publicdouble[][]GXYZ=null;// [numStations]{x,y,z} coordinates (in mm) of the goniometer horizontal axis closest to the moving one in target system
publicdouble[]neckRight;// angle in degrees of the camera as a whole rotated clockwise around axis to the target
publicdouble[]neckBack;// angle in degrees of the camera as a whole rotated clockwise around axis to the target
publicdouble[][]neckXZ=null;// optical head offset in mm relative to the mount point (centerAboveHorizontal as Y)
// non-adjustable parameters, not parts of vector
publicintnumStations;
...
...
@@ -114,7 +118,12 @@ import ij.gui.GenericDialog;
{10.0,2.0,0.0,1.0},// 13 centerAboveHorizontal
{10.0,2.0,0.0,1.0},// 14 GXYZ0
{10.0,2.0,0.0,1.0},// 15 GXYZ1
{10.0,2.0,0.0,1.0}// 16 GXYZ2
{10.0,2.0,0.0,1.0},// 16 GXYZ2
{10.0,0.2,0.0,1.0},// 17 neckRight
{10.0,0.2,0.0,1.0},// 18 neckBack
{10.0,2.0,0.0,1.0},// 19 neckXZ0
{10.0,2.0,0.0,1.0}// 20 neckXZ0
};
publicbooleanisTripod(){
...
...
@@ -345,6 +354,10 @@ import ij.gui.GenericDialog;
doubleGXYZ_0,// coordinates (in mm) of the goniometer horizontal axis closest to the moving one in target system
doubleGXYZ_1,// coordinates (in mm) of the goniometer horizontal axis closest to the moving one in target system
doubleGXYZ_2,// coordinates (in mm) of the goniometer horizontal axis closest to the moving one in target system
doubleneck_right,
doubleneck_back,
doubleneck_x,
doubleneck_z,
intsensorWidth,
intsensorHeight,
intshrinkGridForMask,//shrink detected grids by one point for/vert this number of times before calculating masks
...
...
@@ -372,6 +385,7 @@ import ij.gui.GenericDialog;
booleaninvertUnmarkedLwirGrid
){
double[]GXYZ={GXYZ_0,GXYZ_1,GXYZ_2};
double[]neck_xz={neck_x,neck_z};
setSameEyesisCameraParameters(
numStations,
isTripod,
...
...
@@ -387,6 +401,9 @@ import ij.gui.GenericDialog;
entrancePupilForward,// common to all lenses - distance from the sensor to the lens entrance pupil
centerAboveHorizontal,// camera center distance along camera axis above the closest point to horizontal rotation axis (adds to height of each
GXYZ,// coordinates (in mm) of the goniometer horizontal axis closest to the moving one in target system
neck_right,
neck_back,
neck_xz,
sensorWidth,
sensorHeight,
shrinkGridForMask,//shrink detected grids by one point for/vert this number of times before calculating masks
...
...
@@ -429,6 +446,9 @@ import ij.gui.GenericDialog;
doubleentrancePupilForward,// common to all lenses - distance from the sensor to the lens entrance pupil
doublecenterAboveHorizontal,// camera center distance along camera axis above the closest point to horizontal rotation axis (adds to height of each
double[]GXYZ,// coordinates (in mm) of the goniometer horizontal axis closest to the moving one in target system
doubleneck_right,
doubleneck_back,
double[]neck_xz,
intsensorWidth,
intsensorHeight,
intshrinkGridForMask,//shrink detected grids by one point for/vert this number of times before calculating masks
...
...
@@ -470,6 +490,9 @@ import ij.gui.GenericDialog;
entrancePupilForward,// common to all lenses - distance from the sensor to the lens entrance pupil
centerAboveHorizontal,// camera center distance along camera axis above the closest point to horizontal rotation axis (adds to height of each
GXYZ,// coordinates (in mm) of the goniometer horizontal axis closest to the moving one in target system
neck_right,
neck_back,
neck_xz,
sensorWidth,
sensorHeight,
shrinkGridForMask,//shrink detected grids by one point for/vert this number of times before calculating masks
...
...
@@ -512,6 +535,9 @@ import ij.gui.GenericDialog;
doubleentrancePupilForward,// common to all lenses - distance from the sensor to the lens entrance pupil
doublecenterAboveHorizontal,// camera center distance along camera axis above the closest point to horizontal rotation axis (adds to height of each
double[]GXYZ,// coordinates (in mm) of the goniometer horizontal axis closest to the moving one in target system
doubleneck_right,
doubleneck_back,
double[]neck_xz,
intdefaultSensorWidth,
intdefaultSensorHeight,
intshrinkGridForMask,//shrink detected grids by one point for/vert this number of times before calculating masks
...
...
@@ -568,7 +594,10 @@ import ij.gui.GenericDialog;
this.horAxisErrPsi=newdouble[numStations];
this.entrancePupilForward=newdouble[numStations];// common to all lenses - distance from the sensor to the lens entrance pupil
this.centerAboveHorizontal=newdouble[numStations];// camera center distance along camera axis above the closest point to horizontal rotation axis (adds to height of each
this.entrancePupilForward[numStation]=entrancePupilForward;// common to all lenses - distance from the sensor to the lens entrance pupil
this.centerAboveHorizontal[numStation]=centerAboveHorizontal;// camera center distance along camera axis above the closest point to horizontal rotation axis (adds to height of each
destination.entrancePupilForward=newdouble[destination.numStations];// common to all lenses - distance from the sensor to the lens entrance pupil
destination.centerAboveHorizontal=newdouble[destination.numStations];// camera center distance along camera axis above the closest point to horizontal rotation axis (adds to height of each
destination.entrancePupilForward[numStation]=source.entrancePupilForward[srcNumStation];// common to all lenses - distance from the sensor to the lens entrance pupil
destination.centerAboveHorizontal[numStation]=source.centerAboveHorizontal[srcNumStation];// camera center distance along camera axis above the closest point to horizontal rotation axis (adds to height of each
if(update[14])this.GXYZ[stationNumber][0]=parVect[14];//14 coordinates (in mm) of the goniometer horizontal axis closest to the moving one in target system
if(update[15])this.GXYZ[stationNumber][1]=parVect[15];//15 y
if(update[16])this.GXYZ[stationNumber][2]=parVect[16];//16 z