Commit 3494b1d7 authored by Andrey Filippov's avatar Andrey Filippov

Debugged rendering sequence for center virtual view

parent 844fe76d
......@@ -169,12 +169,9 @@ import ij.process.ImageProcessor;
int num_slices = pixels[0].length;
double [][] dpixels = new double [num_frames*num_slices][];
// System.out.println("pixels.length="+pixels.length+" pixels[0].length="+pixels[0].length);
for (int f = 0; f < num_frames; f++) {
// System.out.println("f="+f);
for (int s = 0; s < num_slices; s ++) {
int indx = s + f * num_slices;
// System.out.println("f="+f+" s="+s+" indx="+indx);
dpixels[indx] = pixels[f][s];
}
}
......
......@@ -2019,6 +2019,7 @@ public class Interscene {
null, // final Rectangle full_woi_in, // show larger than sensor WOI (or null)
clt_parameters, // CLTParameters clt_parameters,
mb_ref_disparity, // double [] disparity_ref,
null, // double [][] ref_pXpYD, // alternative to disparity_ref when reference is not uniform
// motion blur compensation
mb_tau, // double mb_tau, // 0.008; // time constant, sec
mb_max_gain, // double mb_max_gain, // 5.0; // motion blur maximal gain (if more - move second point more than a pixel
......@@ -2040,6 +2041,7 @@ public class Interscene {
null, // final Rectangle full_woi_in, // show larger than sensor WOI (or null)
clt_parameters, // CLTParameters clt_parameters,
mb_ref_disparity, // double [] disparity_ref,
null, // double [][] ref_pXpYD, // alternative to disparity_ref when reference is not uniform
// motion blur compensation
mb_tau, // double mb_tau, // 0.008; // time constant, sec
mb_max_gain, // double mb_max_gain, // 5.0; // motion blur maximal gain (if more - move second point more than a pixel
......
......@@ -876,6 +876,8 @@ public class QuadCLT extends QuadCLTCPU {
null, // final Rectangle full_woi_in, // show larger than sensor WOI in tiles (or null)
clt_parameters, // CLTParameters clt_parameters,
disparity_ref, // double [] disparity_ref,
null, // double [][] ref_pXpYD, // alternative to disparity_ref when reference is not uniform
OpticalFlow.ZERO3, // final double [] scene_xyz, // camera center in world coordinates
OpticalFlow.ZERO3, // final double [] scene_atr, // camera orientation relative to world frame
ref_scene, // final QuadCLT scene,
......@@ -1254,6 +1256,7 @@ public class QuadCLT extends QuadCLTCPU {
final Rectangle full_woi_in, // show larger than sensor WOI in tiles (or null)
CLTParameters clt_parameters,
double [] disparity_ref,
double [][] ref_pXpYD, // alternative to disparity_ref when reference is not uniform
final double [] scene_xyz, // camera center in world coordinates
final double [] scene_atr, // camera orientation relative to world frame
final QuadCLT scene,
......@@ -1269,6 +1272,7 @@ public class QuadCLT extends QuadCLTCPU {
full_woi_in, // show larger than sensor WOI in tiles (or null)
clt_parameters,
disparity_ref,
ref_pXpYD, // double [][] ref_pXpYD, // alternative to disparity_ref when reference is not uniform
// motion blur compensation
0.0, // double mb_tau, // 0.008; // time constant, sec
0.0, // mb_max_gain, // 5.0; // motion blur maximal gain (if more - move second point more than a pixel
......@@ -1313,6 +1317,7 @@ public class QuadCLT extends QuadCLTCPU {
final Rectangle full_woi_in, // show larger than sensor WOI in tiles (or null)
CLTParameters clt_parameters,
double [] disparity_ref,
double [][] ref_pXpYD, // alternative to disparity_ref when reference is not uniform
// motion blur compensation
double mb_tau, // 0.008; // time constant, sec
double mb_max_gain, // 5.0; // motion blur maximal gain (if more - move second point more than a pixel
......@@ -1328,6 +1333,17 @@ public class QuadCLT extends QuadCLTCPU {
int threadsMax,
final int debugLevel){
double [][] pXpYD;
if (ref_pXpYD != null) { // cuas mode, ref_pXpYD defines offset reference scene
pXpYD=OpticalFlow.transformToScenePxPyD(
ref_pXpYD, // final double [][] reference_pXpYD, // invalid tiles - NaN in disparity. Should be no nulls, no NaN disparity
scene_xyz, // final double [] scene_xyz, // camera center in world (reference) coordinates
scene_atr, // final double [] scene_atr, // camera orientation relative to world (reference) frame
ref_scene, // final QuadCLT reference_QuadClt)
scene); // final QuadCLT scene_QuadClt)
scene.getErsCorrection().setupERS(); // NEW - did not help
// ref_scene.getErsCorrection().setupERS(); // just in case - setup using instance parameters - inside
} else {
if ((scene_xyz == null) || (scene_atr == null)) {
scene_xyz = new double[3];
scene_atr = new double[3];
......@@ -1349,6 +1365,7 @@ public class QuadCLT extends QuadCLTCPU {
ref_scene, // final QuadCLT reference_QuadClt, // now - may be null - for testing if scene is rotated ref
threadsMax); // int threadsMax)
}
}
int rendered_width = scene.getErsCorrection().getSensorWH()[0];
if (full_woi_in != null) {
rendered_width = full_woi_in.width * GPUTileProcessor.DTT_SIZE;
......
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