Commit 971025da authored by Andrey Filippov's avatar Andrey Filippov

Tested other reference (FPN mitigation) with initial orientation

parent e17a0659
......@@ -654,8 +654,8 @@ public class QuadCLTCPU {
{0.25*wh[0],0.75*wh[1]},
{0.75*wh[0],0.75*wh[1]}};
}
double s2 = 0.0;
for (double [] xy:xy_pairs) {
double s2 = 0.0, s0=0.0;
for (double [] xy:xy_pairs) if (xy != null){
double [] pXpYD = ers.getImageCoordinatesERS(
null, // QuadCLT cameraQuadCLT, // camera station that got image to be to be matched
xy[0], // double px, // pixel coordinate X in the reference view
......@@ -668,11 +668,16 @@ public class QuadCLTCPU {
xyzatr1[0], // double [] camera_xyz, // camera center in world coordinates
xyzatr1[1], // double [] camera_atr, // camera orientation relative to world frame
OpticalFlow.LINE_ERR); // double line_err); // threshold error in scan lines (1.0)
double dx = pXpYD[0]-xy[0];
double dy = pXpYD[1]-xy[1];
s2 += dx*dx+dy*dy;
if (pXpYD != null) {
double dx = pXpYD[0]-xy[0]; // null pointer
double dy = pXpYD[1]-xy[1];
s2 += dx*dx+dy*dy;
s0+=1.0;
} else {
continue;
}
}
double offs_avg = Math.sqrt(s2/xy_pairs.length);
double offs_avg = Math.sqrt(s2/s0);
return offs_avg;
}
......
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