Commit 1ddf4e46 authored by Andrey Filippov's avatar Andrey Filippov

Implementing FG/BG split of far tiles with small disparity difference

parent df71e1d0
......@@ -516,8 +516,8 @@ public class IntersceneMatchParameters {
"Blur weak sigma");
gd.addNumericField("Number of blur passes", this.num_blur, 0,3,"",
"Number of blur passes");
gd.addNumericField("Disparity offset (not used)", this.disparity_corr, 5,7,"",
"for setInterTasks() - currently not used ");
gd.addNumericField("*** Disparity offset (used 04/07/2023) ***", this.disparity_corr, 5,7,"",
"for setInterTasks() - used 04/07/2023.");
gd.addNumericField("Outlier N-th from extreme", this.outliers_nth_fromextrem, 0,3,"",
"0 - use min/max, 1 - use second min/max, ... second from min/max - removes dual-tile clusters max/mins");
gd.addNumericField("Outliers tolerance absolute", this.outliers_tolerance_absolute, 5,7,"pix",
......
......@@ -870,7 +870,7 @@ public class MultisceneLY {
final double gpu_sigma_corr = clt_parameters.getGpuCorrSigma(last_scene.isMonochrome());
final double gpu_sigma_rb_corr = last_scene.isMonochrome()? 1.0 : clt_parameters.gpu_sigma_rb_corr;
final double gpu_sigma_log_corr = clt_parameters.getGpuCorrLoGSigma(last_scene.isMonochrome());
double disparity_corr = 0.0;
final double disparity_corr = clt_parameters.imp.disparity_corr; // 04/07/2023 // 0.0;
int debugLevel = debug_level;
final double [][] lazy_eye_data = new double [clustersY*clustersX][];
ImageDtt image_dtt= new ImageDtt(
......@@ -1029,6 +1029,7 @@ public class MultisceneLY {
image_dtt.transform_size - 1, // final int gpu_corr_rad, // = transform_size - 1 ?
// The tp_tasks data should be decoded from GPU to get coordinates
tp_tasks_combo, // final TpTask [] tp_tasks, // data from the reference frame - will be applied to LMW for the integrated correlations
null, // final double [][][] far_fgbg, // null, or [tilesY][tilesX]{disp(fg)-disp(bg), str(fg)-str(bg)} hints for LMA FG/BG split
last_scene.getErsCorrection().getRXY(false), // final double [][] rXY, // from geometryCorrection
// next both can be nulls
null, // final double [][][][] clt_corr_out, // sparse (by the first index) [type][tilesY][tilesX][(2*transform_size-1)*(2*transform_size-1)] or null
......
......@@ -1394,7 +1394,7 @@ public class QuadCLT extends QuadCLTCPU {
mb_max_gain, // final double mb_max_gain, // 5.0; // motion blur maximal gain (if more - move second point more than a pixel
mb_vectors, //final double [][] mb_vectors, //
scene.getErsCorrection(), // final GeometryCorrection geometryCorrection,
0.0, // final double disparity_corr,
clt_parameters.imp.disparity_corr, // 04/07/2023 //0.0, // final double disparity_corr,
-1, // 0, // margin, // final int margin, // do not use tiles if their centers are closer to the edges
null, // final boolean [] valid_tiles,
threadsMax); // final int threadsMax) // maximal number of threads to launch
......@@ -1407,7 +1407,7 @@ public class QuadCLT extends QuadCLTCPU {
pXpYD, // final double [][] pXpYD, // per-tile array of pX,pY,disparity triplets (or nulls)
null, // final boolean [] selection, // may be null, if not null do not process unselected tiles
scene.getErsCorrection(), // final GeometryCorrection geometryCorrection,
0.0, // final double disparity_corr,
clt_parameters.imp.disparity_corr, // 04/07/2023 // 0.0, // final double disparity_corr,
-1, // 0, // margin, // final int margin, // do not use tiles if their centers are closer to the edges
null, // final boolean [] valid_tiles,
threadsMax); // final int threadsMax) // maximal number of threads to launch
......@@ -1589,7 +1589,7 @@ public class QuadCLT extends QuadCLTCPU {
mb_max_gain, // final double mb_max_gain, // 5.0; // motion blur maximal gain (if more - move second point more than a pixel
mb_vectors, //final double [][] mb_vectors, //
scene.getErsCorrection(), // final GeometryCorrection geometryCorrection,
0.0, // final double disparity_corr,
clt_parameters.imp.disparity_corr, // 04/07/2023 //0.0, // final double disparity_corr,
-1, // 0, // margin, // final int margin, // do not use tiles if their centers are closer to the edges
null, // final boolean [] valid_tiles,
OpticalFlow.THREADS_MAX); // final int threadsMax) // maximal number of threads to launch
......@@ -1602,7 +1602,7 @@ public class QuadCLT extends QuadCLTCPU {
pXpYD, // final double [][] pXpYD, // per-tile array of pX,pY,disparity triplets (or nulls)
null, // final boolean [] selection, // may be null, if not null do not process unselected tiles
scene.getErsCorrection(), // final GeometryCorrection geometryCorrection,
0.0, // final double disparity_corr,
clt_parameters.imp.disparity_corr, // 04/07/2023 // 0.0, // final double disparity_corr,
-1, // 0, // margin, // final int margin, // do not use tiles if their centers are closer to the edges
null, // final boolean [] valid_tiles,
OpticalFlow.THREADS_MAX); // final int threadsMax) // maximal number of threads to launch
......@@ -1879,7 +1879,7 @@ public class QuadCLT extends QuadCLTCPU {
mb_max_gain, // final double mb_max_gain, // 5.0; // motion blur maximal gain (if more - move second point more than a pixel
mb_vectors, //final double [][] mb_vectors, //
scene.getErsCorrection(), // final GeometryCorrection geometryCorrection,
0.0, // final double disparity_corr,
clt_parameters.imp.disparity_corr, // 04/07/2023 // 0.0, // final double disparity_corr,
-1, // 0, // margin, // final int margin, // do not use tiles if their centers are closer to the edges
null, // final boolean [] valid_tiles,
OpticalFlow.THREADS_MAX); // final int threadsMax) // maximal number of threads to launch
......@@ -1892,7 +1892,7 @@ public class QuadCLT extends QuadCLTCPU {
pXpYD, // final double [][] pXpYD, // per-tile array of pX,pY,disparity triplets (or nulls)
null, // final boolean [] selection, // may be null, if not null do not process unselected tiles
scene.getErsCorrection(), // final GeometryCorrection geometryCorrection,
0.0, // final double disparity_corr,
clt_parameters.imp.disparity_corr, // 04/07/2023 // 0.0, // final double disparity_corr,
-1, // 0, // margin, // final int margin, // do not use tiles if their centers are closer to the edges
null, // final boolean [] valid_tiles,
OpticalFlow.THREADS_MAX); // final int threadsMax) // maximal number of threads to launch
......
......@@ -13955,6 +13955,7 @@ public class QuadCLTCPU {
image_dtt.transform_size - 1, // final int gpu_corr_rad, // = transform_size - 1 ?
// The tp_tasks data should be decoded from GPU to get coordinates
tp_tasks, // final TpTask [] tp_tasks, // data from the reference frame - will be applied to LMW for the integrated correlations
null, // final double [][][] far_fgbg, // null, or [tilesY][tilesX]{disp(fg)-disp(bg), str(fg)-str(bg)} hints for LMA FG/BG split
geometryCorrection.getRXY(false), // final double [][] rXY, // from geometryCorrection
// next both can be nulls
clt_corr_out, // null, // final double [][][][] clt_corr_out, // sparse (by the first index) [type][tilesY][tilesX][(2*transform_size-1)*(2*transform_size-1)] or null
......
......@@ -9309,7 +9309,7 @@ if (debugLevel > -100) return true; // temporarily !
-1); // debug_level); // int debugLevel)
}
// Does not need to specify reference scene - it is always the last even if out of timestamp order
opticalFlow.intersceneExport(
OpticalFlow.intersceneExport(
clt_parameters, // CLTParameters clt_parameters,
ers_reference, // ErsCorrection ers_reference,
scenes, // QuadCLT [] scenes,
......
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