if(indx<(IMU_INDEX+2))returnvector[indx]*(inPix?(1000.0*geometryCorrection.focalLength/geometryCorrection.pixelSize):1.0);// omega_tilt and omega_azimuth
if(indx<(getIMUIndex()+2))returnvector[indx]*(inPix?(1000.0*geometryCorrection.focalLength/geometryCorrection.pixelSize):1.0);// omega_tilt and omega_azimuth
if(indx<(IMU_INDEX+2))returnsym_vect[indx]*(inPix?(1000.0*geometryCorrection.focalLength/geometryCorrection.pixelSize):1.0);// omega_tilt and omega_azimuth
if(indx<(getIMUIndex()+2))returnsym_vect[indx]*(inPix?(1000.0*geometryCorrection.focalLength/geometryCorrection.pixelSize):1.0);// omega_tilt and omega_azimuth
v[i]=vector[i]*1000.0;// *distortionRadius/pixelSize; // movement mm/s
v[i]=vector[i]*1000.0;// *distortionRadius/pixelSize; // movement mm/s
sv[i]=sym_vect[i]*1000.0;// *distortionRadius/pixelSize; // movement mm/s
sv[i]=sym_vect[i]*1000.0;// *distortionRadius/pixelSize; // movement mm/s
}
}
// ← → ↑ ↓ ⇖ ⇗ ⇘ ⇙ ↔ ↕
double[]tilts=newdouble[getNumSensors()];
s=String.format("tilt (up): %8.5fpx %8.5fpx %8.5fpx %8.5fpx (shift of the image center)\n",v[0],v[1],v[2],-(v[0]+v[1]+v[2]));
double[]azimuths=newdouble[getNumSensors()];
s+=String.format("azimuth (right): %8.5fpx %8.5fpx %8.5fpx %8.5fpx (shift of the image center)\n",v[3],v[4],v[5],-(v[3]+v[4]+v[5]));
double[]rolls=newdouble[getNumSensors()];
s+=String.format("roll (CW): %8.5fpx %8.5fpx %8.5fpx %8.5fpx (shift at the image half-width from the center)\n",v[6],v[7],v[8],v[9]);
double[]zooms=newdouble[getNumSensors()];
s+=String.format("diff zoom (in): %8.5fpx %8.5fpx %8.5fpx %8.5fpx (shift at the image half-width from the center)\n",v[10],v[11],v[12],-(v[10]+v[11]+v[12]));
intn=getNumSensors();
for(inti=0;i<getNumSensors();i++){
rolls[i]=v[getRollIndex()+i];
if(i<(n-1)){
tilts[i]=v[getTiltIndex()+i];
tilts[n-1]-=tilts[i];
azimuths[i]=v[getAzimuthIndex()+i];
azimuths[n-1]-=azimuths[i];
zooms[i]=v[getZoomIndex()+i];
zooms[n-1]-=zooms[i];
}
}
s="";
s+="tilt (up): ";for(inti=0;i<n;i++)s+=String.format(" %8.5fpx",tilts[i]);s+=" (shift of the image center)\n";
s+="azimuth (right):";for(inti=0;i<n;i++)s+=String.format(" %8.5fpx",azimuths[i]);s+=" (shift of the image center)\n";
s+="roll (CW): ";for(inti=0;i<n;i++)s+=String.format(" %8.5fpx",rolls[i]);s+=" (shift at the image half-width from the center)\n";
s+="diff zoom (in): ";for(inti=0;i<n;i++)s+=String.format(" %8.5fpx",zooms[i]);s+=" (shift at the image half-width from the center)\n";
@@ -660,129 +784,87 @@ public class CorrVector{ // TODO: Update to non-quad (extract to a file first)?
...
@@ -660,129 +784,87 @@ public class CorrVector{ // TODO: Update to non-quad (extract to a file first)?
for(Strings:lines){
for(Strings:lines){
gd.addMessage(s);
gd.addMessage(s);
}
}
if(use_tabs)gd.addTab("Tilts","Vertical (around horizontal axis perpendicular to te camera view direction) rotations in pixels for current camera parameters");
double[][][][][][]clt_kernels=null;// can be used to determine monochrome too?
double[][][][][][]clt_kernels=null;// can be used to determine monochrome too?
publicGeometryCorrectiongeometryCorrection=null;
publicGeometryCorrectiongeometryCorrection=null;
double[]extrinsic_vect=newdouble[GeometryCorrection.CORR_NAMES.length];// extrinsic corrections (needed from properties, before geometryCorrection
double[]extrinsic_vect;// = new double [GeometryCorrection.CORR_NAMES.length]; // extrinsic corrections (needed from properties, before geometryCorrection
publicintextra_items=8;// number of extra items saved with kernels (center offset (partial, full, derivatives)
publicintextra_items=8;// number of extra items saved with kernels (center offset (partial, full, derivatives)
publicImagePluseyesisKernelImage=null;
publicImagePluseyesisKernelImage=null;
publiclongstartTime;// start of batch processing
publiclongstartTime;// start of batch processing
...
@@ -666,10 +666,13 @@ public class QuadCLTCPU {
...
@@ -666,10 +666,13 @@ public class QuadCLTCPU {
if(gc==null){// if it was not yet created
if(gc==null){// if it was not yet created
gc=newGeometryCorrection(this.extrinsic_vect);// not used in lwir
gc=newGeometryCorrection(this.extrinsic_vect);// not used in lwir
}
}
gc.setPropertiesExtrinsic(prefix,properties);
/*
for (int i = 0; i < GeometryCorrection.CORR_NAMES.length; i++){
for (int i = 0; i < GeometryCorrection.CORR_NAMES.length; i++){
String name = prefix+"extrinsic_corr_"+GeometryCorrection.CORR_NAMES[i];
String name = prefix+"extrinsic_corr_"+GeometryCorrection.CORR_NAMES[i];