Commit e54061b3 authored by Andrey Filippov's avatar Andrey Filippov

using 'interAxisAngle' to compensate for non-axial 'rotation' of the camera

parent adea6f41
......@@ -8,19 +8,19 @@
<parent>
<groupId>org.scijava</groupId>
<artifactId>pom-scijava</artifactId>
<version>1.135</version>
<relativePath />
</parent>
<!--
<version>3.1</version>
<relativePath/>
</parent>
<properties>
<imagej.app.directory>/data/ImageJ/ImageJ</imagej.app.directory>
<imagej.app.directory>/home/foxel/Desktop/Fiji.app</imagej.app.directory>
</properties>
-->
<groupId>com.elphel</groupId>
<artifactId>imagej-elphel</artifactId>
<!-- <artifactId>Aberration_Calibration</artifactId> -->
<version>1.0.0</version>
<version>1.0.0-SNAPSHOT</version>
<name>plugins/imagej_elphel.jar</name>
<!-- <name>plugins/Aberration_Calibration.jar</name> -->
......@@ -29,10 +29,11 @@
<dependencies>
<dependency>
<groupId>net.imagej</groupId>
<artifactId>ij</artifactId>
<version>${imagej1.version}</version>
</dependency>
<groupId>net.imagej</groupId>
<artifactId>ij</artifactId>
<version>1.49m</version>
</dependency>
<dependency>
<groupId>commons-configuration</groupId>
<artifactId>commons-configuration</artifactId>
......@@ -73,29 +74,31 @@
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<configuration>
<!-- see http://jira.codehaus.org/browse/MNG-5346 -->
<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
</configuration>
<executions>
<execution>
<id>mojo-descriptor</id>
<goals>
<goal>descriptor</goal>
</goals>
</execution>
</executions>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<configuration>
<!-- see http://jira.codehaus.org/browse/MNG-5346 -->
<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
</configuration>
<executions>
<execution>
<id>mojo-descriptor</id>
<goals>
<goal>descriptor</goal>
</goals>
</execution>
</executions>
</plugin>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.3.2</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>java</goal>
</goals>
......@@ -106,7 +109,28 @@
<mainClass>Eyesis_Correction</mainClass>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>1.3</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>create</goal>
</goals>
</execution>
</executions>
<configuration>
<doCheck>true</doCheck>
<doUpdate>true</doUpdate>
<format>Build {0,date,yyyy-MM-dd} {0,time,HH:MM:SS} on host {1}</format>
<items>
<item>timestamp</item>
<item>foxel-MRHM7AP</item>
</items>
</configuration>
</plugin>
</plugins>
</build>
......@@ -142,10 +166,22 @@
<scm>
<connection>scm:git:git://github.com/Elphel/imagej-elphel</connection>
<developerConnection>sscm:git:https://github.com/Elphel/imagej-elphel</developerConnection>
<developerConnection>scm:git:https://github.com/Elphel/imagej-elphel</developerConnection>
<tag>HEAD</tag>
<url>https://github.com/Elphel/imagej-elphel</url>
</scm>
<packaging>maven-plugin</packaging>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.14</version>
<configuration>
<configLocation>config/sun_checks.xml</configLocation>
</configuration>
</plugin>
</plugins>
</reporting>
</project>
......@@ -6662,8 +6662,9 @@ if (MORE_BUTTONS) {
gd.addNumericField("Station number (0.."+(LENS_DISTORTIONS.fittingStrategy.distortionCalibrationData.eyesisCameraParameters.numStations-1), stationNumber, 0);
}
gd.addNumericField("Number of sub-camera (starting with 0)", 0, 0);
gd.addNumericField("Camera tilt (0 - vertical, >0 looking above horizon on the target", 0.0, 1,6,"degrees");
gd.addNumericField("Camera axial (0 - subcamera 0 looking to the target, >0 - rotated clockwise", 0.0, 1,6,"degrees");
gd.addNumericField("Camera tilt (0 - vertical, >0 looking above horizon on the target)", 0.0, 1,6,"degrees");
gd.addNumericField("Camera axial (0 - subcamera 0 looking to the target, >0 - rotated clockwise)", 0.0, 1,6,"degrees");
gd.addNumericField("Inter-axis angle (from 90)", 0.0, 1,6,"degrees");
gd.showDialog();
if (gd.wasCanceled()) return;
if (LENS_DISTORTIONS.fittingStrategy.distortionCalibrationData.eyesisCameraParameters.numStations>1){
......@@ -6672,11 +6673,13 @@ if (MORE_BUTTONS) {
int channelNumber= (int) gd.getNextNumber();
double tilt= gd.getNextNumber();
double axial= gd.getNextNumber();
double inter= gd.getNextNumber();
ImagePlus imp_simulatePatternOnSensor=LENS_DISTORTIONS.simulatePatternOnSensor(
stationNumber,
channelNumber,
tilt,
axial,
inter,
SIMUL,
THREADS_MAX, //int threadsMax,
UPDATE_STATUS, // boolean updateStatus,
......@@ -765,7 +765,8 @@ import org.apache.commons.configuration.XMLConfiguration;
}
String header="#\ttimestamp";
if (this.eyesisCameraParameters.numStations>1) header+="\tStation";
header+="\tAxial\tTilt\thorPhi\thorPsi\tX\tY\tZ\tMotor2\tMotor3";
// header+="\tAxial\tTilt\thorPhi\thorPsi\tX\tY\tZ\tMotor2\tMotor3";
header+="\tAxial\tTilt\tdTilt\tInter\tMotor2\tMotor3";
if (numPoints!=null) header+="\tNumPoints";
header+="\tEnabled\tMatched";
if (setRMS!=null) header+="\tRMS\tWeight";
......@@ -773,51 +774,67 @@ import org.apache.commons.configuration.XMLConfiguration;
StringBuffer sb = new StringBuffer();
for (int i=0;i<this.gIS.length;i++){
double firstHorAxisErrPhi=Double.NaN;
double firstHorAxisErrPsi=Double.NaN;
double firstGXYZ0= Double.NaN;
double firstGXYZ1= Double.NaN;
double firstGXYZ2= Double.NaN;
// int index=-1;
// for (int ni=0;ni<this.gIS[i].imageSet.length;ni++) if (this.gIS[i].imageSet[ni]!=null){
// index=this.gIS[i].imageSet[ni].imgNumber;
// break;
// }
// int horAxisErrPhiIndex=getParameterIndexByName("horAxisErrPhi");
// int horAxisErrPsiIndex=getParameterIndexByName("horAxisErrPsi");
// if ((index>=0) && (horAxisErrPhiIndex>=0)) {
// firstHorAxisErrPhi=this.pars[index][horAxisErrPhiIndex];
firstHorAxisErrPhi=this.gIS[i].horAxisErrPhi;
// }
// if ((index>=0) && (horAxisErrPsiIndex>=0)) {
// firstHorAxisErrPsi=this.pars[index][horAxisErrPsiIndex];
firstHorAxisErrPsi=this.gIS[i].horAxisErrPsi;
// }
// int GXYZ0Index=getParameterIndexByName("GXYZ0");
// if ((index>=0) && (GXYZ0Index>=0)) {
// firstGXYZ0=this.pars[index][GXYZ0Index];
firstGXYZ0=this.gIS[i].GXYZ[0];
// }
// int GXYZ1Index=getParameterIndexByName("GXYZ1");
// if ((index>=0) && (GXYZ1Index>=0)) {
// firstGXYZ1=this.pars[index][GXYZ1Index];
firstGXYZ1=this.gIS[i].GXYZ[1];
// }
// int GXYZ2Index=getParameterIndexByName("GXYZ2");
// if ((index>=0) && (GXYZ2Index>=0)) {
// firstGXYZ2=this.pars[index][GXYZ2Index];
firstGXYZ2=this.gIS[i].GXYZ[2];
// }
double axial_corr_sign=this.gIS[i].goniometerAxial; // correct sign of rotation beyond +/-180 according to motor steps
if (this.gIS[i].motors != null) {
if (this.gIS[i].motors[1] > 0){
if (axial_corr_sign < -90.0) {
axial_corr_sign += 360.0;
}
} else {
if (axial_corr_sign > 90.0) {
axial_corr_sign -= 360.0;
}
}
}
// calculate average tilt for this tilt motor and difference of the current tilt from average
double dTilt=Double.NaN;
if (!Double.isNaN(this.gIS[i].goniometerTilt) && (this.gIS[i].motors != null)){
int i_low,i_high;
for (i_low=i-1;i_low>=0;i_low--){
if ((this.gIS[i_low].motors != null) && (this.gIS[i_low].motors[2] != this.gIS[i].motors[2])) break;
}
i_low++;
for (i_high=i+1;i_high < this.gIS.length;i_high++){
if ((this.gIS[i_high].motors != null) && (this.gIS[i_high].motors[2] != this.gIS[i].motors[2])) break;
}
int num_avg=0;
double sum_avg=0.0;
for (int i_avg=i_low;i_avg < i_high; i_avg++){
if (!Double.isNaN(this.gIS[i_avg].goniometerTilt)){
num_avg++;
sum_avg += this.gIS[i_avg].goniometerTilt;
}
}
if (num_avg>0) dTilt = this.gIS[i].goniometerTilt - (sum_avg/num_avg);
}
// double firstHorAxisErrPhi=Double.NaN;
// double firstHorAxisErrPsi=Double.NaN;
// double firstGXYZ0= Double.NaN;
// double firstGXYZ1= Double.NaN;
// double firstGXYZ2= Double.NaN;
double firstInterAxisAngle=Double.NaN;
// firstHorAxisErrPhi=this.gIS[i].horAxisErrPhi;
// firstHorAxisErrPsi=this.gIS[i].horAxisErrPsi;
// firstGXYZ0=this.gIS[i].GXYZ[0];
// firstGXYZ1=this.gIS[i].GXYZ[1];
// firstGXYZ2=this.gIS[i].GXYZ[2];
firstInterAxisAngle = this.gIS[i].interAxisAngle;
sb.append(i+"\t"+IJ.d2s(this.gIS[i].timeStamp,6));
if (this.eyesisCameraParameters.numStations>1) sb.append(i+"\t"+ this.gIS[i].getStationNumber());
sb.append("\t"+(Double.isNaN(this.gIS[i].goniometerAxial)?"---":((this.gIS[i].orientationEstimated?"(":"")+IJ.d2s(this.gIS[i].goniometerAxial,3)+(this.gIS[i].orientationEstimated?")":""))));
sb.append("\t"+(Double.isNaN(this.gIS[i].goniometerAxial)?"---":((this.gIS[i].orientationEstimated?"(":"")+IJ.d2s(axial_corr_sign,3)+(this.gIS[i].orientationEstimated?")":""))));
sb.append("\t"+(Double.isNaN(this.gIS[i].goniometerTilt)?"---":((this.gIS[i].orientationEstimated?"(":"")+IJ.d2s(this.gIS[i].goniometerTilt,3)+(this.gIS[i].orientationEstimated?")":""))));
sb.append("\t"+(Double.isNaN(firstHorAxisErrPhi)?"---":IJ.d2s(firstHorAxisErrPhi,3)));
sb.append("\t"+(Double.isNaN(firstHorAxisErrPsi)?"---":IJ.d2s(firstHorAxisErrPsi,3)));
// sb.append("\t"+(Double.isNaN(firstHorAxisErrPhi)?"---":IJ.d2s(firstHorAxisErrPhi,3)));
// sb.append("\t"+(Double.isNaN(firstHorAxisErrPsi)?"---":IJ.d2s(firstHorAxisErrPsi,3)));
// sb.append("\t"+(Double.isNaN(firstGXYZ0)?"---":IJ.d2s(firstGXYZ0,3)));
// sb.append("\t"+(Double.isNaN(firstGXYZ1)?"---":IJ.d2s(firstGXYZ1,3)));
// sb.append("\t"+(Double.isNaN(firstGXYZ2)?"---":IJ.d2s(firstGXYZ2,3)));
sb.append("\t"+(Double.isNaN(firstGXYZ0)?"---":IJ.d2s(firstGXYZ0,3)));
sb.append("\t"+(Double.isNaN(firstGXYZ1)?"---":IJ.d2s(firstGXYZ1,3)));
sb.append("\t"+(Double.isNaN(firstGXYZ2)?"---":IJ.d2s(firstGXYZ2,3)));
sb.append("\t"+(Double.isNaN(dTilt)?"---":IJ.d2s(dTilt,3)));
sb.append("\t"+(Double.isNaN(firstInterAxisAngle)?"---":IJ.d2s(firstInterAxisAngle,3)));
if (this.gIS[i].motors==null) {
sb.append("\t"+"bug"+"\t"+"bug");
......@@ -1361,6 +1378,7 @@ import org.apache.commons.configuration.XMLConfiguration;
* updateSetOrientation() should be called after LMA or other updates to camera parameters
* @param timeStamp - double timestamp identifying imageset (image does not need to be a part of selected grid files)
* @return null if no images set has the specified timestamp, may contain Double.NaN if the orientation was not set.
* Now 3-rd term - interAxisAngle - with goniometerTilt it is used for correction of non-pure axial movement of the camera.
*/
public double [] getImagesetTiltAxial(double timeStamp){
int mAxial=1; // m2
......@@ -1372,7 +1390,7 @@ import org.apache.commons.configuration.XMLConfiguration;
for (int i=0;i<this.gIS.length;i++)
if (this.gIS[i].timeStamp==timeStamp) {
int iBest=i;
if (Double.isNaN(this.gIS[i].goniometerTilt) || Double.isNaN(this.gIS[i].goniometerAxial)) {
if (Double.isNaN(this.gIS[i].goniometerTilt) || Double.isNaN(this.gIS[i].goniometerAxial) || Double.isNaN(this.gIS[i].interAxisAngle)) {
// find the closest one (by motors)
if (this.gIS[i].motors==null) {
if (this.debugLevel>0) System.out.println("getImagesetTiltAxial("+timeStamp+"): No motor data");
......@@ -1396,7 +1414,8 @@ import org.apache.commons.configuration.XMLConfiguration;
(this.gIS[j].getStationNumber()==stationNumber) &&
(this.gIS[j].motors[mHorizontal]==thisMotorHorizontal) &&
!Double.isNaN(this.gIS[j].goniometerTilt) &&
!Double.isNaN(this.gIS[j].goniometerAxial)){
!Double.isNaN(this.gIS[j].goniometerAxial) &&
!Double.isNaN(this.gIS[j].interAxisAngle)){
setList.add(new Integer(j));
}
}
......@@ -1436,12 +1455,16 @@ import org.apache.commons.configuration.XMLConfiguration;
// now linear interpolate axail between theses two sets: indexClosest and indexSecond. (resolve/ guess crossing 360
double axialClosest=this.gIS[indexClosest].goniometerAxial;
double axialSecond= this.gIS[indexSecond].goniometerAxial;
double interClosest=this.gIS[indexClosest].interAxisAngle;
double interSecond= this.gIS[indexSecond].interAxisAngle;
axialClosest-=360.0*Math.floor((axialClosest+180.0)/360.0);
axialSecond-= 360.0*Math.floor((axialSecond+ 180.0)/360.0);
if (this.debugLevel>2) System.out.println("getImagesetTiltAxial("+timeStamp+"):"+
" same tilt - "+setList.size()+
" axialClosest="+axialClosest+
" axialSecond="+axialSecond+
" interClosest="+interClosest+
" interSecond="+interSecond+
" motor closest="+this.gIS[indexClosest].motors[mAxial]+
" motor second="+this.gIS[indexSecond].motors[mAxial]);
// axial motor has the same sign/direction as the axial angle
......@@ -1455,6 +1478,11 @@ import org.apache.commons.configuration.XMLConfiguration;
(axialSecond-axialClosest)*
(thisMotorAxial-this.gIS[indexClosest].motors[mAxial])/
(this.gIS[indexSecond].motors[mAxial]-this.gIS[indexClosest].motors[mAxial]);
this.gIS[i].interAxisAngle=
interClosest+
(interSecond-interClosest)*
(thisMotorAxial-this.gIS[indexClosest].motors[mAxial])/
(this.gIS[indexSecond].motors[mAxial]-this.gIS[indexClosest].motors[mAxial]);
this.gIS[i].goniometerTilt=
this.gIS[indexClosest].goniometerTilt+
(this.gIS[indexSecond].goniometerTilt-this.gIS[indexClosest].goniometerTilt)*
......@@ -1464,7 +1492,7 @@ import org.apache.commons.configuration.XMLConfiguration;
} else { // old way
double d2Min=-1;
for (int j=0;j<this.gIS.length;j++) if ((j!=i) && (this.gIS[j].motors!=null) &&
!Double.isNaN(this.gIS[j].goniometerTilt) && !Double.isNaN(this.gIS[j].goniometerAxial)) {
!Double.isNaN(this.gIS[j].goniometerTilt) && !Double.isNaN(this.gIS[j].goniometerAxial ) && !Double.isNaN(this.gIS[j].interAxisAngle)) {
double d2=0;
for (int k=0;k<this.gIS[j].motors.length;k++){
d2+=1.0*(this.gIS[j].motors[k]-this.gIS[i].motors[k])*
......@@ -1479,7 +1507,8 @@ import org.apache.commons.configuration.XMLConfiguration;
}
double [] result = {
this.gIS[iBest].goniometerTilt,
this.gIS[iBest].goniometerAxial
this.gIS[iBest].goniometerAxial,
this.gIS[iBest].interAxisAngle
};
if (iBest!=i){
if (this.debugLevel>0) System.out.println("Orientation for set # "+i+" timestamp "+IJ.d2s(this.gIS[i].timeStamp,6)+
......@@ -1487,6 +1516,7 @@ import org.apache.commons.configuration.XMLConfiguration;
this.gIS[i].orientationEstimated=true;
this.gIS[i].goniometerTilt= this.gIS[iBest].goniometerTilt;
this.gIS[i].goniometerAxial=this.gIS[iBest].goniometerAxial;
this.gIS[i].interAxisAngle=this.gIS[iBest].interAxisAngle;
}
return result; // may have Double.NaN
}
......
......@@ -716,10 +716,11 @@ public class Distortions {
if (this.debugLevel>2){
System.out.println("listImageSets() 1: ");
for (int is=0;is<this.fittingStrategy.distortionCalibrationData.gIS.length;is++){
System.out.println("listImageSets() 1: "+is+": tilt="+
this.fittingStrategy.distortionCalibrationData.gIS[is].goniometerTilt+" axial="+
this.fittingStrategy.distortionCalibrationData.gIS[is].goniometerAxial+" estimated="+
this.fittingStrategy.distortionCalibrationData.gIS[is].orientationEstimated);
System.out.println("listImageSets() 1: "+is+
": tilt="+ this.fittingStrategy.distortionCalibrationData.gIS[is].goniometerTilt+
" axial="+ this.fittingStrategy.distortionCalibrationData.gIS[is].goniometerAxial+
" interAxis="+this.fittingStrategy.distortionCalibrationData.gIS[is].interAxisAngle+
" estimated="+this.fittingStrategy.distortionCalibrationData.gIS[is].orientationEstimated);
}
}
}
......@@ -731,10 +732,11 @@ public class Distortions {
if (this.debugLevel>2){
System.out.println("listImageSets() 2: ");
for (int is=0;is<this.fittingStrategy.distortionCalibrationData.gIS.length;is++){
System.out.println("listImageSets() 2: "+is+": tilt="+
this.fittingStrategy.distortionCalibrationData.gIS[is].goniometerTilt+" axial="+
this.fittingStrategy.distortionCalibrationData.gIS[is].goniometerAxial+" estimated="+
this.fittingStrategy.distortionCalibrationData.gIS[is].orientationEstimated);
System.out.println("listImageSets() 2: "+is+
": tilt="+ this.fittingStrategy.distortionCalibrationData.gIS[is].goniometerTilt+
" axial="+ this.fittingStrategy.distortionCalibrationData.gIS[is].goniometerAxial+
" interAxis="+this.fittingStrategy.distortionCalibrationData.gIS[is].interAxisAngle+
" estimated="+this.fittingStrategy.distortionCalibrationData.gIS[is].orientationEstimated);
}
}
}
......@@ -2462,6 +2464,7 @@ For each point in the image
int subCam,
double goniometerTilt,
double goniometerAxial,
double goniometerInterAxis,
SimulationPattern.SimulParameters simulParametersDefault,
int threadsMax,
boolean updateStatus,
......@@ -2481,6 +2484,7 @@ For each point in the image
subCam,
goniometerTilt, // Tilt, goniometerHorizontal
goniometerAxial, // Axial,goniometerAxial
goniometerInterAxis, // inter-axis angle
-1, // use camera parameters, not imageSet
true // filter border
);
......@@ -2662,6 +2666,7 @@ For each point in the image
dcd.gIP[numGridImage].channel,
goniometerTiltAxial[0], // Tilt, goniometerHorizontal
goniometerTiltAxial[1], // Axial,goniometerAxial
goniometerTiltAxial[2], // inter-axis angle
setNumber, // -1 or specific image set
true // filter border
);
......@@ -2902,19 +2907,22 @@ For each point in the image
GenericDialog gd=new GenericDialog("Specify camera orientation (channel"+fittingStrategy.distortionCalibrationData.gIP[numGridImage].channel+")");
gd.addMessage("No goniometer orientation is available for image # "+numGridImage+" - "+fittingStrategy.distortionCalibrationData.gIP[numGridImage].path+
", please specify orientation manually");
gd.addNumericField("Camera tilt (0 - vertical, >0 looking above horizon on the target", 0.0, 1,6,"degrees");
gd.addNumericField("Camera axial (0 - subcamera 0 looking to the target, >0 - rotated clockwise", 0.0, 1,6,"degrees");
gd.addNumericField("Camera tilt (0 - vertical, >0 looking above horizon on the target)", 0.0, 1,6,"degrees");
gd.addNumericField("Camera axial (0 - subcamera 0 looking to the target, >0 - rotated clockwise)", 0.0, 1,6,"degrees");
gd.addNumericField("Camera inter-axis angle (from 90) ", 0.0, 1,6,"degrees");
gd.showDialog();
if (gd.wasCanceled()) return;
goniometerTiltAxial=new double[2];
goniometerTiltAxial[0]= gd.getNextNumber();
goniometerTiltAxial=new double[3];
goniometerTiltAxial[0]= gd.getNextNumber();
goniometerTiltAxial[1]= gd.getNextNumber();
goniometerTiltAxial[2]= gd.getNextNumber();
}
double [][][] hintGrid=estimateGridOnSensor(
fittingStrategy.distortionCalibrationData.getImageStation(numGridImage), // station number
fittingStrategy.distortionCalibrationData.gIP[numGridImage].channel,
goniometerTiltAxial[0], // Tilt, goniometerHorizontal
goniometerTiltAxial[1], // Axial,goniometerAxial
goniometerTiltAxial[2], // inter-axis angle
(useSetData?fittingStrategy.distortionCalibrationData.gIP[numGridImage].getSetNumber():-1),
true // filter border
);
......@@ -3107,6 +3115,7 @@ For each point in the image
int subCamera,
double goniometerHorizontal, // Tilt
double goniometerAxial, // Axial
double goniometerInterAxis, // interAxisAngle
int imageSet,
boolean filterBorder){
double maxRelativeRadius=this.hintedMaxRelativeRadius; // make adjustable
......@@ -3126,6 +3135,11 @@ For each point in the image
int goniometerAxialIndex=fittingStrategy.distortionCalibrationData.eyesisCameraParameters.getGoniometerAxialIndex();
parVector[goniometerAxialIndex]= goniometerAxial;
}
if (!Double.isNaN(goniometerInterAxis)) {
int goniometerInterAxisAngleIndex=fittingStrategy.distortionCalibrationData.eyesisCameraParameters.getInterAxisAngleIndex();
parVector[goniometerInterAxisAngleIndex]= goniometerInterAxis;
}
// /interAxis
int sensorWidth=fittingStrategy.distortionCalibrationData.eyesisCameraParameters.getSensorWidth(subCamera);
int sensorHeight=fittingStrategy.distortionCalibrationData.eyesisCameraParameters.getSensorHeight(subCamera);
System.out.println("estimateGridOnSensor(): subCamera="+subCamera+", goniometerHorizontal="+goniometerHorizontal+", goniometerAxial="+goniometerAxial);
......@@ -9842,7 +9856,7 @@ M * V = B
distortionCalibrationData.gIS[numSet].goniometerAxial=Double.NaN;
distortionCalibrationData.gIS[numSet].goniometerTilt= Double.NaN;
// re-estimate orientation
double [] ta=distortionCalibrationData.getImagesetTiltAxial(distortionCalibrationData.gIS[numSet].timeStamp); // updates tilt/axial
double [] ta=distortionCalibrationData.getImagesetTiltAxial(distortionCalibrationData.gIS[numSet].timeStamp); // updates tilt/axial (now interAxis too!)
if ((ta==null) || Double.isNaN(ta[0]) || Double.isNaN(ta[1])) return false;
return true;
}
......
......@@ -1254,6 +1254,7 @@ public class EyesisAberrations {
distortions.fittingStrategy.distortionCalibrationData.gIP[numGridImage].channel, // subCamera,
Double.NaN, // goniometerHorizontal, - not used
Double.NaN, // goniometerAxial, - not used
Double.NaN, // inter-axis angle, - not used ?
distortions.fittingStrategy.distortionCalibrationData.gIP[numGridImage].getSetNumber(), //imageSet,
true); //filterBorder)
hintTolerance=5.0; // TODO:set from configurable parameter
......
......@@ -1136,6 +1136,7 @@ import org.apache.commons.configuration.XMLConfiguration;
// public int getNumSubCameras (){return (this.eyesisSubCameras==null)?0:this.eyesisSubCameras.length;}
public int getGoniometerHorizontalIndex(){return 6;}
public int getGoniometerAxialIndex(){return 7;}
public int getInterAxisAngleIndex(){return 9;}
public int getSensorWidth() { return this.sensorWidth;}
public int getSensorHeight() { return this.sensorHeight;}
public int getSensorWidth(int subCam) { return this.sensorWidth;} // for the future? different sensors
......
......@@ -598,6 +598,7 @@ horizontal axis:
subCam,
goniometerTiltAxial[0], // Tilt, goniometerHorizontal
goniometerTiltAxial[1], // Axial,goniometerAxial
goniometerTiltAxial[2], // inter-axis angle
-1, // use camera parameters, not imageSet
true // filter border
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment