Commit 62655772 authored by Andrey Filippov's avatar Andrey Filippov

Added filtering, improved center DSI near margins

parent d15a47db
......@@ -5828,7 +5828,7 @@ public class OpticalFlow {
}
}
// just for verification
boolean show_clt = false;// true;
boolean show_clt = true; // false;// true;
if (show_clt) {
center_CLT.showCenterClt(
clt_parameters); // CLTParameters clt_parameters,
......@@ -15495,6 +15495,7 @@ public class OpticalFlow {
return mb_vectors;
}
// Use TileProcessor.fillNaNs
public static double[] fillGapsDouble(
double [] data,
boolean [] mask_in, // do not process if false (may be null)
......
......@@ -1689,7 +1689,8 @@ public class QuadCLT extends QuadCLTCPU {
int width=ref_scene.getTilesX()*ref_scene.getTileSize();
int height=ref_scene.getTilesY()*ref_scene.getTileSize();
// window in pixels!
final Rectangle window = (discard_border > 0)? (new Rectangle(discard_border,discard_border,width-2*discard_border,height-2*discard_border)): null;
boolean apply_window_filter = (discard_border > 0) || (max_fold > 0) || (min_in_row_col > 0);
final Rectangle window = apply_window_filter ? (new Rectangle(discard_border,discard_border,width-2*discard_border,height-2*discard_border)): null;
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
......
......@@ -932,11 +932,7 @@ public class QuadCLTCPU {
}
}
}
return new double [] {coeffs[0][1],coeffs[1][1],coeffs[2][1]};
}
public static double [] getOmegaCorrections(
......@@ -13889,7 +13885,8 @@ public class QuadCLTCPU {
tp.getTilesX(),
tp.getTilesY(),
true,
"filtered_bgnd_disp_strength",dbg_titles);
"filtered_bgnd_disp_strength",
dbg_titles);
}
int num_bg = tp.clt_3d_passes.get(bg_scan).setTileOpDisparity( // other minimal strength?
bg_sel, // bg_use, // bg_sel, // bg_use, // boolean [] selection, measure all that can be bg
......
......@@ -8835,7 +8835,7 @@ ImageDtt.startAndJoin(threads);
}
/**
* Us this one when filling full frame and prohibit is not used. Faster as it first tries lower resolution, then full
* Use this one when filling full frame and prohibit is not used. Faster as it first tries lower resolution, then full
* @param data_in input data array
* @param width_full width of the input dtata
* @param decimate_step decimation step (such as 16)
......
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