Commit 4b32667d authored by Andrey Filippov's avatar Andrey Filippov

Debugging mixing noise to evaluate different configurations (intra/inter

)
parent 200f2455
......@@ -88,6 +88,7 @@ public class CLTParameters {
public double disparity = 0.0; // nominal disparity between side of square cameras (pix)
public double z_correction = 0.0; // Inverse distance to infinity (misalignment correction)
public boolean correlate = true; // calculate correlation
public boolean correlate_lma = true; // Use LMA to find disparity from 2d phase correlations
public int corr_mask = 15; // bitmask of pairs to combine in the composite
public boolean corr_sym = false; // combine correlation with mirrored around disparity direction
public boolean corr_keep = true; // keep all partial correlations (otherwise - only combined one)
......@@ -1023,6 +1024,7 @@ public class CLTParameters {
properties.setProperty(prefix+"disparity", this.disparity +"");
properties.setProperty(prefix+"z_correction", this.z_correction +"");
properties.setProperty(prefix+"correlate", this.correlate+"");
properties.setProperty(prefix+"correlate_lma", this.correlate_lma+"");
properties.setProperty(prefix+"corr_mask", this.corr_mask+"");
properties.setProperty(prefix+"corr_sym", this.corr_sym+"");
properties.setProperty(prefix+"corr_keep", this.corr_keep+"");
......@@ -1839,6 +1841,7 @@ public class CLTParameters {
if (properties.getProperty(prefix+"disparity")!=null) this.disparity=Double.parseDouble(properties.getProperty(prefix+"disparity"));
if (properties.getProperty(prefix+"z_correction")!=null) this.z_correction=Double.parseDouble(properties.getProperty(prefix+"z_correction"));
if (properties.getProperty(prefix+"correlate")!=null) this.correlate=Boolean.parseBoolean(properties.getProperty(prefix+"correlate"));
if (properties.getProperty(prefix+"correlate_lma")!=null) this.correlate_lma=Boolean.parseBoolean(properties.getProperty(prefix+"correlate_lma"));
if (properties.getProperty(prefix+"corr_mask")!=null) this.corr_mask=Integer.parseInt(properties.getProperty(prefix+"corr_mask"));
if (properties.getProperty(prefix+"corr_sym")!=null) this.corr_sym=Boolean.parseBoolean(properties.getProperty(prefix+"corr_sym"));
if (properties.getProperty(prefix+"corr_keep")!=null) this.corr_keep=Boolean.parseBoolean(properties.getProperty(prefix+"corr_keep"));
......@@ -2674,6 +2677,7 @@ public class CLTParameters {
gd.addNumericField("Kernel step in pixels (has 1 kernel margin on each side)", this.kernel_step, 0);
gd.addNumericField("Inverse distance to infinity (misalignment correction)", this.z_correction, 6);
gd.addCheckbox ("Perform correlation", this.correlate);
gd.addCheckbox ("Run LMA on 2d correlations to extract disparity", this.correlate_lma);
gd.addNumericField("Bitmask of pairs to combine in the composite (top, bottom, left,righth)", this.corr_mask, 0);
gd.addCheckbox ("Combine correlation with mirrored around disparity direction", this.corr_sym);
gd.addCheckbox ("Keep all partial correlations (otherwise - only combined one)", this.corr_keep);
......@@ -3704,6 +3708,7 @@ public class CLTParameters {
this.kernel_step= (int) gd.getNextNumber();
this.z_correction= gd.getNextNumber();
this.correlate= gd.getNextBoolean();
this.correlate_lma= gd.getNextBoolean();
this.corr_mask= (int) gd.getNextNumber();
this.corr_sym= gd.getNextBoolean();
this.corr_keep= gd.getNextBoolean();
......
......@@ -153,6 +153,7 @@ private Panel panel1,
panelClt3,
panelClt4,
panelClt5,
panelClt5aux,
panelClt_GPU,
panelLWIR,
panelLWIR16
......@@ -496,7 +497,8 @@ private Panel panel1,
};
instance=plugInFrame;
plugInFrame.addKeyListener(IJ.getInstance());
int menuRows=4 + (ADVANCED_MODE?4:0) + (MODE_3D?3:0) + (DCT_MODE?6:0) + (GPU_MODE?1:0) +(LWIR_MODE?2:0);
// int menuRows=4 + (ADVANCED_MODE?4:0) + (MODE_3D?3:0) + (DCT_MODE?6:0) + (GPU_MODE?1:0) +(LWIR_MODE?2:0);
int menuRows=4 + (ADVANCED_MODE?4:0) + (MODE_3D?3:0) + (DCT_MODE?7:0) + (GPU_MODE?1:0) +(LWIR_MODE?2:0);
plugInFrame.setLayout(new GridLayout(menuRows, 1));
panel6 = new Panel();
panel6.setLayout(new GridLayout(1, 0, 5, 5));
......@@ -710,25 +712,42 @@ private Panel panel1,
addButton("DSI histogram", panelClt5, color_report);
addButton("ML recalc", panelClt5, color_process);
addButton("Inter Test", panelClt5, color_stop);
addButton("Aux Inter Test", panelClt5, color_stop);
// addButton("Aux Inter Test", panelClt5, color_stop);
addButton("Inter Pairs", panelClt5, color_process);
addButton("Aux Inter Pairs", panelClt5, color_process);
// addButton("Aux Inter Pairs", panelClt5, color_process);
addButton("Inter LMA", panelClt5, color_stop);
addButton("Aux Inter LMA", panelClt5, color_stop);
// addButton("Aux Inter LMA", panelClt5, color_stop);
addButton("Inter Series", panelClt5, color_process);
addButton("Aux Inter Series", panelClt5, color_process);
// addButton("Aux Inter Series", panelClt5, color_process);
addButton("Inter Accumulate", panelClt5, color_process);
addButton("Aux Inter Accumulate", panelClt5, color_process);
// addButton("Aux Inter Accumulate", panelClt5, color_process);
addButton("Inter Noise", panelClt5, color_process);
addButton("Inter Noise Aux", panelClt5, color_process);
// addButton("Inter Noise Aux", panelClt5, color_process);
addButton("Inter Debug Noise", panelClt5, color_report);
// addButton("Batch Noise Aux", panelClt5, color_report);
addButton("Noise Stats", panelClt5, color_process);
addButton("Noise Stats Aux", panelClt5, color_process);
// addButton("Noise Stats Aux", panelClt5, color_process);
addButton("Test 1D", panelClt5, color_process);
addButton("Colorize Depth", panelClt5, color_process);
plugInFrame.add(panelClt5);
}
if (DCT_MODE) {
panelClt5aux = new Panel();
panelClt5aux.setLayout(new GridLayout(1, 0, 5, 5)); // rows, columns, vgap, hgap
addButton("LIST extrinsics", panelClt5aux, color_report);
addButton("Aux Inter Test", panelClt5aux, color_stop);
addButton("Aux Inter Pairs", panelClt5aux, color_process);
addButton("Aux Inter LMA", panelClt5aux, color_stop);
addButton("Aux Inter Series", panelClt5aux, color_process);
addButton("Aux Inter Accumulate", panelClt5aux, color_process);
addButton("Inter Noise Aux", panelClt5aux, color_process);
addButton("Batch Noise Aux", panelClt5aux, color_report);
addButton("Noise Stats Aux", panelClt5aux, color_process);
addButton("Colorize Depth", panelClt5aux, color_process);
plugInFrame.add(panelClt5aux);
}
if (GPU_MODE) {
panelClt_GPU = new Panel();
panelClt_GPU.setLayout(new GridLayout(1, 0, 5, 5)); // rows, columns, vgap, hgap
......@@ -5205,14 +5224,21 @@ private Panel panel1,
DEBUG_LEVEL=MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
CLT_PARAMETERS.batch_run = true;
intersceneNoise(false, false); // boolean bayer_artifacts_debug);
intersceneNoise(false, false, false); // boolean bayer_artifacts_debug);
return;
/* ======================================================================== */
} else if (label.equals("Inter Noise Aux")) {
DEBUG_LEVEL=MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
CLT_PARAMETERS.batch_run = true;
intersceneNoise(true, false); // boolean bayer_artifacts_debug);
intersceneNoise(true, false, false); // boolean bayer_artifacts_debug);
return;
/* ======================================================================== */
} else if (label.equals("Batch Noise Aux")) {
DEBUG_LEVEL=MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
CLT_PARAMETERS.batch_run = true;
intersceneNoise(true, true, false); // boolean bayer_artifacts_debug);
return;
......@@ -5221,7 +5247,7 @@ private Panel panel1,
DEBUG_LEVEL=MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
CLT_PARAMETERS.batch_run = true;
intersceneNoise(false, true); // boolean bayer_artifacts_debug);
intersceneNoise(false, false, true); // boolean bayer_artifacts_debug);
return;
/* ======================================================================== */
......@@ -7116,6 +7142,7 @@ private Panel panel1,
public boolean intersceneNoise(
boolean use_aux,
boolean batch_noise,
boolean bayer_artifacts_debug) {
long startTime=System.nanoTime();
// load needed sensor and kernels files
......@@ -7202,6 +7229,22 @@ private Panel panel1,
ColorProcParameters colorProcParameters = use_aux ? COLOR_PROC_PARAMETERS_AUX : COLOR_PROC_PARAMETERS;
try {
if (batch_noise) {
TWO_QUAD_CLT.intersceneNoiseBatch(
quadCLT, // QuadCLT quadCLT_main,
CLT_PARAMETERS, // EyesisCorrectionParameters.DCTParameters dct_parameters,
DEBAYER_PARAMETERS, // EyesisCorrectionParameters.DebayerParameters debayerParameters,
colorProcParameters, // EyesisCorrectionParameters.ColorProcParameters colorProcParameters,
CHANNEL_GAINS_PARAMETERS, // CorrectionColorProc.ColorGainsParameters channelGainParameters,
RGB_PARAMETERS, // EyesisCorrectionParameters.RGBParameters rgbParameters,
EQUIRECTANGULAR_PARAMETERS, // EyesisCorrectionParameters.EquirectangularParameters equirectangularParameters,
PROPERTIES, // Properties properties,
bayer_artifacts_debug, // boolean bayer_artifacts_debug
THREADS_MAX, // final int threadsMax, // maximal number of threads to launch
UPDATE_STATUS, // final boolean updateStatus,
DEBUG_LEVEL);
} else {
TWO_QUAD_CLT.intersceneNoise(
quadCLT, // QuadCLT quadCLT_main,
CLT_PARAMETERS, // EyesisCorrectionParameters.DCTParameters dct_parameters,
......@@ -7215,6 +7258,7 @@ private Panel panel1,
THREADS_MAX, // final int threadsMax, // maximal number of threads to launch
UPDATE_STATUS, // final boolean updateStatus,
DEBUG_LEVEL);
}
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
......@@ -7242,34 +7286,6 @@ private Panel panel1,
if (DEBUG_LEVEL > -2){
System.out.println("++++++++++++++ Testing Interscene processing ++++++++++++++");
}
/*
if (CLT_PARAMETERS.useGPU()) { // only init GPU instances if it is used
if (GPU_TILE_PROCESSOR == null) {
try {
GPU_TILE_PROCESSOR = new GPUTileProcessor(CORRECTION_PARAMETERS.tile_processor_gpu);
} catch (Exception e) {
System.out.println("Failed to initialize GPU class");
// TODO Auto-generated catch block
e.printStackTrace();
return false;
} //final int debugLevel);
}
if (CLT_PARAMETERS.useGPU(false) && (QUAD_CLT != null) && (GPU_QUAD == null)) { // if GPU main is needed
try {
GPU_QUAD = new GpuQuad(
GPU_TILE_PROCESSOR, QUAD_CLT,
4,
3);
} catch (Exception e) {
System.out.println("Failed to initialize GpuQuad class");
// TODO Auto-generated catch block
e.printStackTrace();
return false;
} //final int debugLevel);
QUAD_CLT.setGPU(GPU_QUAD);
}
}
*/
if (CLT_PARAMETERS.useGPU()) { // only init GPU instances if it is used
if (GPU_TILE_PROCESSOR == null) {
try {
......
......@@ -675,8 +675,8 @@ public class Corr2dLMA {
if (ncam_used < 2) {
return false;
}
last_cam = (ncam_used > 1)? used_cams_rmap[ncam_used - 1] :-1;
pre_last_cam = (ncam_used > 2)? used_cams_rmap[ncam_used - 2] :-1;
last_cam = (ncam_used >= 1)? used_cams_rmap[ncam_used - 1] :-1;
pre_last_cam = (ncam_used >= 2)? used_cams_rmap[ncam_used - 2] :-1;
setOffsetMatrices();
......
......@@ -53,6 +53,54 @@ public class Correlation2d {
private final double [] corr_wndy_notch;
private final boolean monochrome;
public static int CORR_SEL_BIT_ALL = 0;
public static int CORR_SEL_BIT_DIA = 1;
public static int CORR_SEL_BIT_SQ = 2;
public static int CORR_SEL_BIT_NEIB = 3;
public static int CORR_SEL_BIT_HOR = 4;
public static int CORR_SEL_BIT_VERT = 5;
public static int CORR_SEL_BIT_LIMIT = 8;
public static int CORR_SEL_BITS_LIMIT = 3;
// Debug feature to limit selections to:
// 1: 2 sensors - horizontal diameter, sensors 4,12
// 2: 4 sensors - original quad selection, sensors 2,6,10,14
// 3: 8 sensors - 0,2,4,6,8,10,12,14
public static int corrSelEncode(
boolean sel_all,
boolean sel_dia,
boolean sel_sq,
boolean sel_neib,
boolean sel_hor,
boolean sel_vert,
int limit_sensors) {
return (sel_all ? (1 << CORR_SEL_BIT_ALL): 0) |
(sel_dia ? (1 << CORR_SEL_BIT_DIA): 0) |
(sel_sq ? (1 << CORR_SEL_BIT_SQ): 0) |
(sel_neib ? (1 << CORR_SEL_BIT_NEIB): 0) |
(sel_hor ? (1 << CORR_SEL_BIT_HOR): 0) |
(sel_vert ? (1 << CORR_SEL_BIT_VERT): 0) |
((limit_sensors & ((1 << CORR_SEL_BITS_LIMIT) - 1)) << CORR_SEL_BIT_LIMIT);
}
public static boolean isCorrAll (int sel) { return ((sel >> CORR_SEL_BIT_ALL) & 1) != 0;}
public static boolean isCorrDia (int sel) { return ((sel >> CORR_SEL_BIT_DIA) & 1) != 0;}
public static boolean isCorrSq (int sel) { return ((sel >> CORR_SEL_BIT_SQ) & 1) != 0;}
public static boolean isCorrNeib(int sel) { return ((sel >> CORR_SEL_BIT_NEIB) & 1) != 0;}
public static boolean isCorrHor (int sel) { return ((sel >> CORR_SEL_BIT_HOR) & 1) != 0;}
public static boolean isCorrVert(int sel) { return ((sel >> CORR_SEL_BIT_VERT) & 1) != 0;}
public static int getSensorsLimit(int sel){ return ((sel >> CORR_SEL_BIT_LIMIT) & ((1 << CORR_SEL_BITS_LIMIT) - 1));}
public static int corrSelEncode(ImageDttParameters img_dtt, int num_sensors) {
return corrSelEncode(
img_dtt.getMcorrAll (num_sensors), // boolean sel_all,
img_dtt.getMcorrDia (num_sensors), // boolean sel_dia,
img_dtt.getMcorrSq (num_sensors), // boolean sel_sq,
img_dtt.getMcorrNeib (num_sensors), // boolean sel_neib,
img_dtt.getMcorrHor (num_sensors), // boolean sel_hor,
img_dtt.getMcorrVert (num_sensors), // boolean sel_vert);
img_dtt.mcorr_limit_sensors); // 0 - no limit, 1 - (4,12) 2 - (2, 6, 10, 14), 3 - (0,2,4,6,8,10,12,14)
}
// configuration for 8-lens and 4-lens cameras. 8-lens has baseline = 1 for 1..4 and 1/2 for 4..7
......@@ -278,6 +326,39 @@ public class Correlation2d {
return numSensors * (numSensors-1) /2;
}
public void setCorrPairs(int mcorr_sel) {
boolean [] corr_calculate = null;
if (isCorrAll (mcorr_sel)) corr_calculate = selectAll();
if (isCorrDia (mcorr_sel)) corr_calculate = selectDiameters (corr_calculate);
if (isCorrSq (mcorr_sel)) corr_calculate = selectSquares (corr_calculate);
if (isCorrNeib (mcorr_sel)) corr_calculate = selectNeibs (corr_calculate);
if (isCorrHor (mcorr_sel)) corr_calculate = selectHorizontal (corr_calculate);
if (isCorrVert (mcorr_sel)) corr_calculate = selectVertical (corr_calculate);
int sensors_limit = getSensorsLimit(mcorr_sel);
if ((sensors_limit != 0) && (numSensors == 16)) { // so far only for 16 sensors
boolean [] sel_sensors = new boolean [numSensors];
int [][] indices = {
{4,12}, // binocular,
{2,6,10,14}, // quad
{0,2,4,6,8,10,12,14}}; // octal
for (int i = 0; i < indices[sensors_limit-1].length; i++) {
sel_sensors[indices[sensors_limit-1][i]] = true;
}
// boolean [] pair_sel = getCorrPairs();
for (int i = 0; i < corr_calculate.length; i++) if (corr_calculate[i]){
int [] se = getPair(i);
if (!sel_sensors[se[0]] || !sel_sensors[se[1]]) {
corr_calculate[i] = false;
}
}
// setCorrPairs(pair_sel);
//*********************************** limit pairs
}
setCorrPairs(corr_calculate);
}
public void setCorrPairs(boolean [] sel) { // these pairs will be correlated
corr_pairs = sel.clone();
}
......
......@@ -319,54 +319,6 @@ public class ImageDttCPU {
static int TCORR_COMBO_VERT = 3; // combined correlation from 2 vertical pairs (0,1). Used to detect horizontal features
static String [] TCORR_TITLES = {"combo","sum","hor","vert"};
static int CORR_SEL_BIT_ALL = 0;
static int CORR_SEL_BIT_DIA = 1;
static int CORR_SEL_BIT_SQ = 2;
static int CORR_SEL_BIT_NEIB = 3;
static int CORR_SEL_BIT_HOR = 4;
static int CORR_SEL_BIT_VERT = 5;
public static int corrSelEncode(
boolean sel_all,
boolean sel_dia,
boolean sel_sq,
boolean sel_neib,
boolean sel_hor,
boolean sel_vert) {
return (sel_all ? (1 << CORR_SEL_BIT_ALL): 0) |
(sel_dia ? (1 << CORR_SEL_BIT_DIA): 0) |
(sel_sq ? (1 << CORR_SEL_BIT_SQ): 0) |
(sel_neib ? (1 << CORR_SEL_BIT_NEIB): 0) |
(sel_hor ? (1 << CORR_SEL_BIT_HOR): 0) |
(sel_vert ? (1 << CORR_SEL_BIT_VERT): 0);
}
public static int corrSelEncode(ImageDttParameters img_dtt, int num_sensors) {
return corrSelEncode(
img_dtt.getMcorrAll (num_sensors), // boolean sel_all,
img_dtt.getMcorrDia (num_sensors), // boolean sel_dia,
img_dtt.getMcorrSq (num_sensors), // boolean sel_sq,
img_dtt.getMcorrNeib (num_sensors), // boolean sel_neib,
img_dtt.getMcorrHor (num_sensors), // boolean sel_hor,
img_dtt.getMcorrVert (num_sensors)); // boolean sel_vert);
}
/*
int mcorr_sel = ImageDtt. corrSelEncode( // maybe update?
clt_parameters.img_dtt.getMcorrAll (getNumSensors()), // boolean sel_all,
clt_parameters.img_dtt.getMcorrDia (getNumSensors()), // boolean sel_dia,
clt_parameters.img_dtt.getMcorrSq (getNumSensors()), // boolean sel_sq,
clt_parameters.img_dtt.getMcorrNeib (getNumSensors()), // boolean sel_neib,
clt_parameters.img_dtt.getMcorrHor (getNumSensors()), // boolean sel_hor,
clt_parameters.img_dtt.getMcorrVert (getNumSensors())); // boolean sel_vert);
*/
public static boolean isCorrAll (int sel) { return ((sel >> CORR_SEL_BIT_ALL) & 1) != 0;}
public static boolean isCorrDia (int sel) { return ((sel >> CORR_SEL_BIT_DIA) & 1) != 0;}
public static boolean isCorrSq (int sel) { return ((sel >> CORR_SEL_BIT_SQ) & 1) != 0;}
public static boolean isCorrNeib(int sel) { return ((sel >> CORR_SEL_BIT_NEIB) & 1) != 0;}
public static boolean isCorrHor (int sel) { return ((sel >> CORR_SEL_BIT_HOR) & 1) != 0;}
public static boolean isCorrVert(int sel) { return ((sel >> CORR_SEL_BIT_VERT) & 1) != 0;}
private final boolean monochrome;
private final boolean lwir; // means that no sqrt correction
......@@ -1761,13 +1713,7 @@ public class ImageDttCPU {
// this.correlation2d should be non-null
boolean [] corr_calculate = null;
{
if (isCorrAll (mcorr_sel)) corr_calculate = correlation2d.selectAll();
if (isCorrDia (mcorr_sel)) corr_calculate = correlation2d.selectDiameters (corr_calculate);
if (isCorrSq (mcorr_sel)) corr_calculate = correlation2d.selectSquares (corr_calculate);
if (isCorrNeib (mcorr_sel)) corr_calculate = correlation2d.selectNeibs (corr_calculate);
if (isCorrHor (mcorr_sel)) corr_calculate = correlation2d.selectHorizontal (corr_calculate);
if (isCorrVert (mcorr_sel)) corr_calculate = correlation2d.selectVertical (corr_calculate);
correlation2d.setCorrPairs(corr_calculate); // will limit correlation pairs calculation
correlation2d.setCorrPairs(mcorr_sel); // will limit correlation pairs calculation
correlation2d.generateResample( // should be called before
mcorr_comb_width, // combined correlation tile width
mcorr_comb_height, // combined correlation tile full height
......@@ -2653,14 +2599,7 @@ public class ImageDttCPU {
boolean [][] pcombo_sels = null;
if (correlation2d != null){
// Initialize correlation pairs selection to be used by all threads
boolean [] corr_calculate = null;
if (isCorrAll (mcorr_sel)) corr_calculate = correlation2d.selectAll();
if (isCorrDia (mcorr_sel)) corr_calculate = correlation2d.selectDiameters (corr_calculate);
if (isCorrSq (mcorr_sel)) corr_calculate = correlation2d.selectSquares (corr_calculate);
if (isCorrNeib (mcorr_sel)) corr_calculate = correlation2d.selectNeibs (corr_calculate);
if (isCorrHor (mcorr_sel)) corr_calculate = correlation2d.selectHorizontal (corr_calculate);
if (isCorrVert (mcorr_sel)) corr_calculate = correlation2d.selectVertical (corr_calculate);
correlation2d.setCorrPairs(corr_calculate); // will limit correlation pairs calculation
correlation2d.setCorrPairs(mcorr_sel); // will limit correlation pairs calculation
correlation2d.generateResample( // should be called before
mcorr_comb_width, // combined correlation tile width
mcorr_comb_height, // combined correlation tile full height
......@@ -3501,14 +3440,7 @@ public class ImageDttCPU {
throw new IllegalArgumentException ("clt_aberrations_quad_corr_multi(): disparity_map == null!");
}
// Initialize correlation pairs selection to be used by all threads
boolean [] corr_calculate = null;
if (isCorrAll (mcorr_sel)) corr_calculate = correlation2d.selectAll();
if (isCorrDia (mcorr_sel)) corr_calculate = correlation2d.selectDiameters (corr_calculate);
if (isCorrSq (mcorr_sel)) corr_calculate = correlation2d.selectSquares (corr_calculate);
if (isCorrNeib (mcorr_sel)) corr_calculate = correlation2d.selectNeibs (corr_calculate);
if (isCorrHor (mcorr_sel)) corr_calculate = correlation2d.selectHorizontal (corr_calculate);
if (isCorrVert (mcorr_sel)) corr_calculate = correlation2d.selectVertical (corr_calculate);
correlation2d.setCorrPairs(corr_calculate); // will limit correlation pairs calculation
correlation2d.setCorrPairs(mcorr_sel); // will limit correlation pairs calculation
correlation2d.generateResample( // should be called before
mcorr_comb_width, // combined correlation tile width
mcorr_comb_height, // combined correlation tile full height
......@@ -4495,14 +4427,7 @@ public class ImageDttCPU {
throw new IllegalArgumentException ("clt_aberrations_quad_corr_multi(): disparity_map == null!");
}
// Initialize correlation pairs selection to be used by all threads
boolean [] corr_calculate = null;
if (isCorrAll (mcorr_sel)) corr_calculate = correlation2d.selectAll();
if (isCorrDia (mcorr_sel)) corr_calculate = correlation2d.selectDiameters (corr_calculate);
if (isCorrSq (mcorr_sel)) corr_calculate = correlation2d.selectSquares (corr_calculate);
if (isCorrNeib (mcorr_sel)) corr_calculate = correlation2d.selectNeibs (corr_calculate);
if (isCorrHor (mcorr_sel)) corr_calculate = correlation2d.selectHorizontal (corr_calculate);
if (isCorrVert (mcorr_sel)) corr_calculate = correlation2d.selectVertical (corr_calculate);
correlation2d.setCorrPairs(corr_calculate); // will limit correlation pairs calculation
correlation2d.setCorrPairs(mcorr_sel); // will limit correlation pairs calculation
correlation2d.generateResample( // should be called before
mcorr_comb_width, // combined correlation tile width
mcorr_comb_height, // combined correlation tile full height
......@@ -15648,15 +15573,7 @@ public class ImageDttCPU {
// }
// Initialize correlation pairs selection to be used by all threads
if (correlation2d != null){
boolean [] corr_calculate = null;
if (isCorrAll (mcorr_sel)) corr_calculate = correlation2d.selectAll();
if (isCorrDia (mcorr_sel)) corr_calculate = correlation2d.selectDiameters (corr_calculate);
if (isCorrSq (mcorr_sel)) corr_calculate = correlation2d.selectSquares (corr_calculate);
if (isCorrNeib (mcorr_sel)) corr_calculate = correlation2d.selectNeibs (corr_calculate);
if (isCorrHor (mcorr_sel)) corr_calculate = correlation2d.selectHorizontal (corr_calculate);
if (isCorrVert (mcorr_sel)) corr_calculate = correlation2d.selectVertical (corr_calculate);
correlation2d.setCorrPairs(corr_calculate); // will limit correlation pairs calculation
correlation2d.setCorrPairs(mcorr_sel); // will limit correlation pairs calculation
boolean [] calc_corr_pairs = correlation2d.getCorrPairs();
for (int i = 0; i < calc_corr_pairs.length; i++) if (calc_corr_pairs[i]){
dcorr_td[i] = new double[tilesY][tilesX][][];
......@@ -15810,14 +15727,7 @@ public class ImageDttCPU {
{
// Initialize correlation pairs selection to be used by all threads
if (correlation2d != null){
boolean [] corr_calculate = null;
if (isCorrAll (mcorr_sel)) corr_calculate = correlation2d.selectAll();
if (isCorrDia (mcorr_sel)) corr_calculate = correlation2d.selectDiameters (corr_calculate);
if (isCorrSq (mcorr_sel)) corr_calculate = correlation2d.selectSquares (corr_calculate);
if (isCorrNeib (mcorr_sel)) corr_calculate = correlation2d.selectNeibs (corr_calculate);
if (isCorrHor (mcorr_sel)) corr_calculate = correlation2d.selectHorizontal (corr_calculate);
if (isCorrVert (mcorr_sel)) corr_calculate = correlation2d.selectVertical (corr_calculate);
correlation2d.setCorrPairs(corr_calculate); // will limit correlation pairs calculation
correlation2d.setCorrPairs(mcorr_sel); // will limit correlation pairs calculation
}
// final int numcol = isMonochrome()?1:3;
final int numcol = 3; // number of colors // keep the same, just do not use [0] and [1], [2] - green
......
......@@ -101,6 +101,9 @@ public class ImageDttParameters {
public boolean mcorr_hor_multi = true; // all horizontal
public boolean mcorr_vert = true; // all vertical (2 pairs for quad, 8 - for lwir16)
public boolean mcorr_vert_multi = true; // all vertical
public int mcorr_limit_sensors = 0; // 0 - no limit, 1: binocular (12,4), 3 - quad (2,6,10,14), 4 -octal (0,2,4,6,8,10,12,14)
//final int corr_sel, // +1 - all, +2 - dia, +4 - sq, +8 - neibs, +16 - hor + 32 - vert
public int mcorr_sel_ly = 1; // +1 - all, +2 - dia, +4 - sq, +8 - neibs, +16 - hor + 32 - vert
public int mcorr_sel_ly_multi = 2+4+8; // +1 - all, +2 - dia, +4 - sq, +8 - neibs, +16 - hor + 32 - vert
......@@ -113,6 +116,11 @@ public class ImageDttParameters {
public boolean mcorr_cons_hor = true; // consolidate all horizontal pairs
public boolean mcorr_cons_vert = true; // consolidate all vertical pairs
public double [] mcorr_weights = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 16.0}; // static weights of pairs of length 1...8
public boolean mcorr_static_weights = true; // when mixing , apply static weights to pairs depending on their lengths
public double mcorr_weights_power = 1.0; // divide pair by horizontal (disparity) width after rotation/scaling (skip negative when measuring width)
public boolean mcorr_dynamic_weights = true; // Apply weights to pairs dependent on the width in disparity direction
/// these are just for testing, actual will be generated specifically for different applications (LY will use closest pairs)
public int mcorr_comb_width = 15;
public int mcorr_comb_height = 15;
......@@ -441,6 +449,10 @@ public class ImageDttParameters {
"All vertical pairs. N: 2 for quad, 8 for lwir16");
gd.addCheckbox ("Calculate vertical pairs for multi cameras", this.mcorr_vert_multi,
"All vertical pairs. N: 2 for quad, 8 for lwir16");
gd.addNumericField ("Limit sensors: (0 - all, 1 - binocular, 2 - quad, 3 - octal)",this.mcorr_limit_sensors, 0, 3, "",
"Limit correlations to subset of the sensors for performance comparison: 1 - (4,12), 2 - (2,6,10,14), 3 - (0,2,4,6,8,10,12,14)");
gd.addNumericField ("Select correlation pairs for LY for small cameras", this.mcorr_sel_ly, 0, 3, "",
" +1 - all, +2 - dia, +4 - sq, +8 - neibs, +16 - hor + 32 - vert");
gd.addNumericField ("Select correlation pairs for LY for multi cameras", this.mcorr_sel_ly_multi, 0, 3, "",
......@@ -458,6 +470,17 @@ public class ImageDttParameters {
"Combine all calculated horizontal pairs regardless of length");
gd.addCheckbox ("Combine vertical pairs", this.mcorr_cons_vert,
"Combine all calculated vertical pairs regardless of length");
gd.addMessage("Weights for mixing correlation pairs");
for (int i = 0; i < mcorr_weights.length; i++) {
gd.addNumericField("Weight of correlation pair "+(i+1)+" long", this.mcorr_weights[i], 3,6,"",
"Relative weight of pairs, length - number of sensors intervals (1 - neighbors,..., 8 - diameters)");
}
gd.addCheckbox ("Apply static weights defined above", this.mcorr_static_weights,
"Apply length-dependent weights for rotated/scaled pairs");
gd.addNumericField("Divide correlation pair weight by its width to this power", this.mcorr_weights_power, 3,6,"pix",
"Increase weight of pairs with linear features perpendicular to the base direction and long base pairs");
gd.addCheckbox ("Apply dynaminc (feature-dependent) weights defined above", this.mcorr_dynamic_weights,
"Calculate each pairs's width (in the disparity direction) after rotation/scaling and apply");
gd.addMessage("Generating grid for combining visualization, actual will be provided programmatically");
gd.addNumericField("Width of a combined correlation tile", this.mcorr_comb_width, 0, 3, "pix",
......@@ -783,6 +806,7 @@ public class ImageDttParameters {
this.mcorr_hor_multi = gd.getNextBoolean();
this.mcorr_vert = gd.getNextBoolean();
this.mcorr_vert_multi = gd.getNextBoolean();
this.mcorr_limit_sensors=(int)gd.getNextNumber();
this.mcorr_sel_ly= (int) gd.getNextNumber();
this.mcorr_sel_ly_multi=(int)gd.getNextNumber();
......@@ -794,6 +818,13 @@ public class ImageDttParameters {
this.mcorr_cons_hor = gd.getNextBoolean();
this.mcorr_cons_vert = gd.getNextBoolean();
for (int i = 0; i < mcorr_weights.length; i++) {
this.mcorr_weights[i] = gd.getNextNumber();
}
this.mcorr_static_weights = gd.getNextBoolean();
this.mcorr_weights_power= gd.getNextNumber();
this.mcorr_dynamic_weights = gd.getNextBoolean();
this.mcorr_comb_width= (int) gd.getNextNumber();
this.mcorr_comb_height=(int) gd.getNextNumber();
this.mcorr_comb_offset=(int) gd.getNextNumber();
......@@ -983,6 +1014,7 @@ public class ImageDttParameters {
properties.setProperty(prefix+"mcorr_hor_multi", this.mcorr_hor_multi +"");
properties.setProperty(prefix+"mcorr_vert", this.mcorr_vert +"");
properties.setProperty(prefix+"mcorr_vert_multi", this.mcorr_vert_multi +"");
properties.setProperty(prefix+"mcorr_limit_sensors", this.mcorr_limit_sensors +"");
properties.setProperty(prefix+"mcorr_sel_ly", this.mcorr_sel_ly +"");
properties.setProperty(prefix+"mcorr_sel_ly_multi", this.mcorr_sel_ly_multi +"");
......@@ -994,6 +1026,13 @@ public class ImageDttParameters {
properties.setProperty(prefix+"mcorr_cons_hor", this.mcorr_cons_hor +"");
properties.setProperty(prefix+"mcorr_cons_vert", this.mcorr_cons_vert +"");
for (int i = 0; i < mcorr_weights.length; i++) {
properties.setProperty(prefix+"mcorr_weights_"+(i+1), this.mcorr_weights[i] +"");
}
properties.setProperty(prefix+"mcorr_static_weights", this.mcorr_static_weights +"");
properties.setProperty(prefix+"mcorr_weights_power", this.mcorr_weights_power +"");
properties.setProperty(prefix+"mcorr_dynamic_weights",this.mcorr_dynamic_weights +"");
properties.setProperty(prefix+"mcorr_comb_width", this.mcorr_comb_width +"");
properties.setProperty(prefix+"mcorr_comb_height", this.mcorr_comb_height +"");
properties.setProperty(prefix+"mcorr_comb_offset", this.mcorr_comb_offset +"");
......@@ -1187,6 +1226,8 @@ public class ImageDttParameters {
if (properties.getProperty(prefix+"mcorr_hor_multi")!=null) this.mcorr_hor_multi=Boolean.parseBoolean(properties.getProperty(prefix+"mcorr_hor_multi"));
if (properties.getProperty(prefix+"mcorr_vert")!=null) this.mcorr_vert=Boolean.parseBoolean(properties.getProperty(prefix+"mcorr_vert"));
if (properties.getProperty(prefix+"mcorr_vert_multi")!=null) this.mcorr_vert_multi=Boolean.parseBoolean(properties.getProperty(prefix+"mcorr_vert_multi"));
if (properties.getProperty(prefix+"mcorr_limit_sensors")!=null) this.mcorr_limit_sensors=Integer.parseInt(properties.getProperty(prefix+"mcorr_limit_sensors"));
if (properties.getProperty(prefix+"mcorr_sel_ly")!=null) this.mcorr_sel_ly=Integer.parseInt(properties.getProperty(prefix+"mcorr_sel_ly"));
if (properties.getProperty(prefix+"mcorr_sel_ly_multi")!=null) this.mcorr_sel_ly_multi=Integer.parseInt(properties.getProperty(prefix+"mcorr_sel_ly_multi"));
......@@ -1197,6 +1238,13 @@ public class ImageDttParameters {
if (properties.getProperty(prefix+"mcorr_cons_hor")!=null) this.mcorr_cons_hor=Boolean.parseBoolean(properties.getProperty(prefix+"mcorr_cons_hor"));
if (properties.getProperty(prefix+"mcorr_cons_vert")!=null) this.mcorr_cons_vert=Boolean.parseBoolean(properties.getProperty(prefix+"mcorr_cons_vert"));
for (int i = 0; i < mcorr_weights.length; i++) if (properties.getProperty(prefix+"mcorr_weights_"+(i+1))!=null) {
this.mcorr_weights[i] = Double.parseDouble(properties.getProperty(prefix+"mcorr_weights_"+(i+1)));
}
if (properties.getProperty(prefix+"mcorr_static_weights")!=null) this.mcorr_static_weights=Boolean.parseBoolean(properties.getProperty(prefix+"mcorr_static_weights"));
if (properties.getProperty(prefix+"mcorr_weights_power")!=null) this.mcorr_weights_power=Double.parseDouble(properties.getProperty(prefix+"mcorr_weights_power"));
if (properties.getProperty(prefix+"mcorr_dynamic_weights")!=null)this.mcorr_dynamic_weights=Boolean.parseBoolean(properties.getProperty(prefix+"mcorr_dynamic_weights"));
if (properties.getProperty(prefix+"mcorr_comb_width")!=null) this.mcorr_comb_width=Integer.parseInt(properties.getProperty(prefix+"mcorr_comb_width"));
if (properties.getProperty(prefix+"mcorr_comb_height")!=null) this.mcorr_comb_height=Integer.parseInt(properties.getProperty(prefix+"mcorr_comb_height"));
if (properties.getProperty(prefix+"mcorr_comb_offset")!=null) this.mcorr_comb_offset=Integer.parseInt(properties.getProperty(prefix+"mcorr_comb_offset"));
......@@ -1409,6 +1457,8 @@ public class ImageDttParameters {
idp.mcorr_vert= this.mcorr_vert;
idp.mcorr_vert_multi= this.mcorr_vert_multi;
idp.mcorr_limit_sensors= this.mcorr_limit_sensors;
idp.mcorr_sel_ly= this.mcorr_sel_ly;
idp.mcorr_sel_ly_multi= this.mcorr_sel_ly_multi;
......@@ -1419,6 +1469,11 @@ public class ImageDttParameters {
idp.mcorr_cons_hor= this.mcorr_cons_hor;
idp.mcorr_cons_vert= this.mcorr_cons_vert;
idp.mcorr_weights= this.mcorr_weights.clone();
idp.mcorr_static_weights= this.mcorr_static_weights;
idp.mcorr_weights_power= this.mcorr_weights_power;
idp.mcorr_dynamic_weights= this.mcorr_dynamic_weights;
idp.mcorr_comb_width= this.mcorr_comb_width;
idp.mcorr_comb_height= this.mcorr_comb_height;
idp.mcorr_comb_offset= this.mcorr_comb_offset;
......
......@@ -3554,7 +3554,8 @@ public class OpticalFlow {
"-fpn_"+ noise_sigma_level.scale_fpn+
"-sigma_"+ noise_sigma_level.sigma+ // [1]+
"-offset"+ noise_sigma_level.initial_offset+ // [2];
"-sensors"+ noise_sigma_level.used_sensors;
"-sensors"+ noise_sigma_level.used_sensors +
(clt_parameters.correlate_lma?"-lma":"-nolma");
if (ref_only) {
rslt_suffix +="-nointer";
......@@ -3640,9 +3641,22 @@ public class OpticalFlow {
}
// String [] combo_dsn_titles = {"disp", "strength", "num_valid","change"};
String [] combo_dsn_titles = {"disp", "strength","disp_lma","num_valid","change"};
int combo_dsn_indx_disp = 0; // cumulative disparity (from CM or POLY)
int combo_dsn_indx_strength = 1;
int combo_dsn_indx_lma = 2; // masked copy from 0 - cumulative disparity
int combo_dsn_indx_valid = 3; // initial only
int combo_dsn_indx_change = 4; // increment
boolean read_nonoise_lma =clt_parameters.correlate_lma || true; // read always
// final String [] iter_titles = {"disp", "diff", "strength","disp_lma"};
final int [] iter_indices = {0,1,2,4}; // which to save for each iteration: {"disp", "strength","disp_lma","change"};
final int [] initial_indices = {0,1,3}; // initial: "disp", "strength","num_valid"
final int [] iter_indices = {
combo_dsn_indx_disp,
combo_dsn_indx_strength,
combo_dsn_indx_lma,
combo_dsn_indx_change}; // which to save for each iteration: {"disp", "strength","disp_lma","change"};
final int [] initial_indices = {
combo_dsn_indx_disp,
combo_dsn_indx_strength,
combo_dsn_indx_valid}; // initial: "disp", "strength","num_valid"
double [][] combo_dsn = null;
if (noise_sigma_level == null) {
double[][] combo_dsn0 = prepareInitialComboDS( // 3
......@@ -3657,7 +3671,7 @@ public class OpticalFlow {
} else {
combo_dsn = ref_scene. readDoubleArrayFromModelDirectory( //"disp", "strength","disp_lma","num_valid"
"-results-nonoise", // String suffix,
"-results-nonoise" + (read_nonoise_lma?"-lma":"-nolma"), // String suffix,
combo_dsn_titles.length - 1, // 4
null); // int [] wh);
......@@ -3672,7 +3686,7 @@ public class OpticalFlow {
}
if (noise_sigma_level != null) { // add initial offset to the expected disparity
for (int i = 0; i < combo_dsn_change[0].length; i++) {
combo_dsn_change[0][i] += noise_sigma_level.initial_offset; // [2];
combo_dsn_change[combo_dsn_indx_disp][i] += noise_sigma_level.initial_offset; //initial offset
}
}
// combo_dsn_change[combo_dsn_change.length - 1] = new double [tilesX*tilesY];
......@@ -3741,27 +3755,31 @@ public class OpticalFlow {
);
}
// update disparities
final int disparity_index = ImageDtt.DISPARITY_INDEX_CM; // 2
final int strength_index = ImageDtt.DISPARITY_STRENGTH_INDEX; // 10
double [] map_disparity = disparity_map[ImageDtt.DISPARITY_INDEX_CM]; // 2
double [] map_strength = disparity_map[ImageDtt.DISPARITY_STRENGTH_INDEX]; // 10
double [] map_disparity_lma = disparity_map[ImageDtt.DISPARITY_INDEX_POLY]; // 8
for (int nTile =0; nTile < combo_dsn_change[0].length; nTile++) {
if (!Double.isNaN(combo_dsn_change[0][nTile]) && !Double.isNaN(disparity_map[disparity_index][nTile])) {
combo_dsn_change[0][nTile] += disparity_map[disparity_index][nTile];
combo_dsn_change[1][nTile] = disparity_map[strength_index][nTile];
if (!Double.isNaN(combo_dsn_change[0][nTile])) {
if ((map_disparity_lma != null) && !Double.isNaN(map_disparity_lma[nTile])) {
combo_dsn_change[combo_dsn_indx_change][nTile] = map_disparity_lma[nTile];
} else if (!Double.isNaN(map_disparity[nTile])) {
combo_dsn_change[combo_dsn_indx_change][nTile] = map_disparity[nTile] / clt_parameters.ofp.magic_scale;
}
if (!Double.isNaN(combo_dsn_change[combo_dsn_indx_change][nTile])) {
combo_dsn_change[combo_dsn_indx_disp][nTile] += combo_dsn_change[combo_dsn_indx_change][nTile];
combo_dsn_change[combo_dsn_indx_strength][nTile] = map_strength[nTile]; // combine CM/LMA
}
System.arraycopy(combo_dsn_change[0], 0, combo_dsn_change[2], 0, combo_dsn_change[0].length); // lma
// combo_dsn_change[2] = combo_dsn_change[0].clone(); // lma
double [] disp_lma = disparity_map[ImageDtt.DISPARITY_INDEX_POLY];
if (disp_lma != null) {
for (int i = 0; i < disp_lma.length; i++) {
if (Double.isNaN(disp_lma[i])) {
combo_dsn_change[2][i] = Double.NaN;
}
}
// Copy disparity to sisparity_lma and just mask out tiles with no DMA data (keep all if LMA did not run at all)
System.arraycopy(combo_dsn_change[combo_dsn_indx_disp], 0, combo_dsn_change[combo_dsn_indx_lma], 0, combo_dsn_change[combo_dsn_indx_disp].length); // lma
if (map_disparity_lma != null) {
for (int i = 0; i < map_disparity_lma.length; i++) {
if (Double.isNaN(map_disparity_lma[i])) {
combo_dsn_change[combo_dsn_indx_lma][i] = Double.NaN;
}
}
}
// combo_dsn_change[combo_dsn_change.length -1] = disparity_map[disparity_index];
System.arraycopy(disparity_map[disparity_index], 0, combo_dsn_change[combo_dsn_change.length -1], 0, combo_dsn_change[0].length); // lma
for (int i = 0; i < iter_indices.length; i++) {
refine_results[last_initial_slices + (i * max_refines) + nrefine] = combo_dsn_change[iter_indices[i]].clone();
......@@ -3797,6 +3815,7 @@ public class OpticalFlow {
"-sigma_"+ noise_sigma_level.sigma+ // [1]+
"-offset"+ noise_sigma_level.initial_offset+ // [2];
"-sensors"+ noise_sigma_level.used_sensors;
if (ref_only) {
rslt_suffix +="-nointer";
} else {
......@@ -3804,6 +3823,7 @@ public class OpticalFlow {
}
//rslt_suffix +="-mask"+clt_parameters.img_dtt.dbg_pair_mask;
}
rslt_suffix += (clt_parameters.correlate_lma?"-lma":"-nolma");
ref_scene.saveDoubleArrayInModelDirectory(
rslt_suffix, // String suffix,
refine_titles, // null, // String [] labels, // or null
......@@ -5052,7 +5072,7 @@ public double[][] correlateIntersceneDebug( // only uses GPU and quad
debug_level);
} else { // CPU version
Correlation2d correlation2d = image_dtt.getCorrelation2d();
int mcorr_sel = ImageDtt.corrSelEncode(clt_parameters.img_dtt,scenes[nscene].getNumSensors());
int mcorr_sel = Correlation2d.corrSelEncode(clt_parameters.img_dtt,scenes[nscene].getNumSensors());
double [][][][][] dcorr_td = new double[correlation2d.getCorrTitles().length][][][][]; // [pair][tilesY][tilesX][4][64] sparse transform domain representation of corr pairs
image_dtt.quadCorrTD(
scenes[nscene].getImageData(), // final double [][][] image_data, // first index - number of image in a quad
......@@ -5669,7 +5689,7 @@ public double[][] correlateIntersceneDebug( // only uses GPU and quad
} else { // CPU version
//Correlation2d correlation2d =
image_dtt.getCorrelation2d();
int mcorr_sel = ImageDtt.corrSelEncode(clt_parameters.img_dtt,scenes[nscene].getNumSensors());
int mcorr_sel = Correlation2d.corrSelEncode(clt_parameters.img_dtt,scenes[nscene].getNumSensors());
double [][][][] dcorr_td = new double[tp_tasks.length][][][]; // [tile][pair][4][64] sparse by pair transform domain representation of corr pairs
image_dtt.quadCorrTD(
scenes[nscene].getImageData(), // final double [][][] image_data, // first index - number of image in a quad
......@@ -5715,7 +5735,7 @@ public double[][] correlateIntersceneDebug( // only uses GPU and quad
// When clt_mismatch is non-zero, no far objects extraction will be attempted
//optional, may be null
disparity_map, // final double [][] disparity_map, // [8][tilesY][tilesX], only [6][] is needed on input or null - do not calculate
true, // final boolean run_lma, // calculate LMA, false - CM only
clt_parameters.correlate_lma, // final boolean run_lma, // calculate LMA, false - CM only
// last 2 - contrast, avg/ "geometric average)
clt_parameters.getGpuFatZero(ref_scene.isMonochrome()), // clt_parameters.getGpuFatZero(ref_scene.isMonochrome()), // final double afat_zero2, // gpu_fat_zero ==30? clt_parameters.getGpuFatZero(is_mono); absolute fat zero, same units as components squared values
clt_parameters.gpu_sigma_m, // final double corr_sigma, //
......@@ -5844,7 +5864,7 @@ public double[][] correlateIntersceneDebug( // only uses GPU and quad
// When clt_mismatch is non-zero, no far objects extraction will be attempted
//optional, may be null
disparity_map, // final double [][] disparity_map, // [8][tilesY][tilesX], only [6][] is needed on input or null - do not calculate
true, // final boolean run_lma, // calculate LMA, false - CM only
clt_parameters.correlate_lma, // true, // final boolean run_lma, // calculate LMA, false - CM only
// last 2 - contrast, avg/ "geometric average)
clt_parameters.getGpuFatZero(ref_scene.isMonochrome()), // clt_parameters.getGpuFatZero(ref_scene.isMonochrome()), // final double afat_zero2, // gpu_fat_zero ==30? clt_parameters.getGpuFatZero(is_mono); absolute fat zero, same units as components squared values
clt_parameters.gpu_sigma_m, // final double corr_sigma, //
......
......@@ -5456,7 +5456,7 @@ public class QuadCLTCPU {
}
//getNumSensors()
int mcorr_sel = ImageDtt.corrSelEncode(clt_parameters.img_dtt, getNumSensors());
int mcorr_sel = Correlation2d.corrSelEncode(clt_parameters.img_dtt, getNumSensors());
// if (debugLevel > 1000) texture_tiles = null; // FIXME: until texture generation for multi-cam is fixed
double [][][][][][] clt_data = image_dtt.clt_aberrations_quad_corr(
......@@ -11947,7 +11947,7 @@ public class QuadCLTCPU {
}
}
int mcorr_sel = ImageDtt.corrSelEncode(clt_parameters.img_dtt, getNumSensors());
int mcorr_sel = Correlation2d.corrSelEncode(clt_parameters.img_dtt, getNumSensors());
image_dtt.clt_aberrations_quad_corr(
clt_parameters.img_dtt, // final ImageDttParameters imgdtt_params, // Now just extra correlation parameters, later will include, most others
......@@ -12237,7 +12237,7 @@ public class QuadCLTCPU {
}
}
double [][][] fine_corr = (clt_parameters.fcorr_ignore? null: this.fine_corr);
int mcorr_sel = ImageDtt.corrSelEncode(clt_parameters.img_dtt, getNumSensors());
int mcorr_sel = Correlation2d.corrSelEncode(clt_parameters.img_dtt, getNumSensors());
if (clust_radius > 0) {
if (use_tilted) {
image_dtt.clt_aberrations_quad_corr_tilted(
......@@ -12506,7 +12506,7 @@ public class QuadCLTCPU {
}
}
int mcorr_sel = ImageDtt.corrSelEncode(clt_parameters.img_dtt, getNumSensors());
int mcorr_sel = Correlation2d.corrSelEncode(clt_parameters.img_dtt, getNumSensors());
image_dtt.clt_aberrations_quad_corr(
clt_parameters.img_dtt, // final ImageDttParameters imgdtt_params, // Now just extra correlation parameters, later will include, most others
1, // final int macro_scale, // to correlate tile data instead of the pixel data: 1 - pixels, 8 - tiles
......@@ -12583,7 +12583,7 @@ public class QuadCLTCPU {
final int debugLevel)
{
CLTPass3d scan = tp.clt_3d_passes.get(scanIndex);
boolean run_lma = true;
boolean run_lma = clt_parameters.correlate_lma;
boolean need_diffs = true; //
CLTMeas( // perform single pass according to prepared tiles operations and disparity
clt_parameters, // EyesisCorrectionParameters.CLTParameters clt_parameters,
......@@ -12644,7 +12644,7 @@ public class QuadCLTCPU {
z_correction +=clt_parameters.z_corr_map.get(image_name);
}
final double disparity_corr = (z_correction == 0) ? 0.0 : geometryCorrection.getDisparityFromZ(1.0/z_correction);
int mcorr_sel = ImageDtt.corrSelEncode(clt_parameters.img_dtt, getNumSensors());
int mcorr_sel = Correlation2d.corrSelEncode(clt_parameters.img_dtt, getNumSensors());
TpTask[] tp_tasks = GpuQuad.setTasks(
num_sensors, // final int num_cams,
image_dtt.getTransformSize(), // final int transform_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