Commit 00746159 authored by Andrey Filippov's avatar Andrey Filippov

Fixed -ground_tilts-result.tiff image generation (ground disparity and

Z)
parent bf5c07b5
......@@ -545,6 +545,12 @@ public class GroundPlane {
double [][] ground_xyzatr = ErsCorrection.invertXYZATR(to_ground_xyzatr); // straight down from the camera, then rotated
double [][] virtual_camera_from_ground_xyz = ErsCorrection.invertXYZATR(new double [][] {ground_xyzatr[0],new double[3]});
double [][] virtual_camera_from_camera = ErsCorrection.combineXYZATR(ground_xyzatr, virtual_camera_from_ground_xyz);
// FIXME: Next is correct (at least approximately, "-"/invert, order,), find out why
System.out.println("FIXME: Inverted X, Y, kept Z, and ATR. Find out why.");
double [][] vcfs_test = {
{-virtual_camera_from_camera[0][0], -virtual_camera_from_camera[0][1], virtual_camera_from_camera[0][2]},
{ virtual_camera_from_camera[1][0], virtual_camera_from_camera[1][1], virtual_camera_from_camera[1][2]}};
if ((dbg_title != null) || (gnd_disp != null)) {
// expand macrotiles results to match tiles
......@@ -552,9 +558,9 @@ public class GroundPlane {
double [][] pXpYD_ground = OpticalFlow.transformToScenePxPyD(
null, // final Rectangle full_woi_in, // show larger than sensor WOI (or null) IN TILES
ref_disparity, // final double [] disparity_ref, // invalid tiles - NaN in disparity
virtual_camera_from_camera,// final double [][] scene_xyzatr, // camera center in world coordinates, camera orientation relative to world frame
vcfs_test, // virtual_camera_from_camera,// final double [][] scene_xyzatr, // camera center in world coordinates, camera orientation relative to world frame
ref_Clt); // final QuadCLT scene_QuadClt)
double [] gnd_disparity = (gnd_disp != null) ? gnd_disp : new double [ref_disparity.length];
double [] gnd_disparity = (gnd_disp != null) ? gnd_disp.clone() : new double [ref_disparity.length];
Arrays.fill(gnd_disparity, Double.NaN);
for (int i = 0; i <ref_disparity.length; i++) {
double [] xyd = pXpYD_ground[i];
......
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