Commit 84bd8cc0 authored by Andrey Filippov's avatar Andrey Filippov

Improved flat ground detection

parent cac11d90
...@@ -6506,6 +6506,18 @@ public class OpticalFlow { ...@@ -6506,6 +6506,18 @@ public class OpticalFlow {
final double max_abs_diff = 0.05; // maximal absolute disparity difference from the plane final double max_abs_diff = 0.05; // maximal absolute disparity difference from the plane
final double max_rel_diff = 0.1; // maximal relative disparity difference from the plane final double max_rel_diff = 0.1; // maximal relative disparity difference from the plane
final double normal_damping = 0.001; // pull to horizontal if not enough data final double normal_damping = 0.001; // pull to horizontal if not enough data
final double blur_frac = 0.01; // 0.03
final double weight_frac = 0.3; // multiply weight by w= 1/(1 + (err/k_max_diff)^2)
final int mtile_size = 16;
final double min_ev_rel = 0.3;
final double max_tilt = 0.2;
final double top_percent = 0.5; // remove above 50% center intersection
final int min_macro_tiles = 3;
final boolean [] good_tiles = new boolean[ds[0].length]; final boolean [] good_tiles = new boolean[ds[0].length];
// String dbg_title =master_CLT.getImageName()+"-ground tilts"; // String dbg_title =master_CLT.getImageName()+"-ground tilts";
String dbg_title = "-ground_tilts"; String dbg_title = "-ground_tilts";
...@@ -6518,6 +6530,13 @@ public class OpticalFlow { ...@@ -6518,6 +6530,13 @@ public class OpticalFlow {
min_good1, // final int min_good1, // minimal good tiles after pass1 min_good1, // final int min_good1, // minimal good tiles after pass1
max_abs_diff, // final double max_abs_diff, // maximal absolute disparity difference from the plane max_abs_diff, // final double max_abs_diff, // maximal absolute disparity difference from the plane
max_rel_diff, // final double max_rel_diff, // maximal relative disparity difference from the plane max_rel_diff, // final double max_rel_diff, // maximal relative disparity difference from the plane
blur_frac, // final double blur_frac, // = 0.01; // 0.03
weight_frac, // final double weight_frac, // = 0.3; // multiply weight by w= 1/(1 + (err/k_max_diff)^2)
mtile_size, // final int mtile_size, // = 16;
min_ev_rel, // final double min_ev_rel, // = 0.3;
max_tilt, // final double max_tilt, // = 0.2;
top_percent, // final double top_percent, // = 0.5; // remove above 50% center intersection
min_macro_tiles, // final int min_macro_tiles, // = 3;
normal_damping, // final double normal_damping, normal_damping, // final double normal_damping,
master_CLT.getTilesX(),// final int width, master_CLT.getTilesX(),// final int width,
good_tiles, // final boolean [] good_tiles, // null or boolean[data.length] // should all be false good_tiles, // final boolean [] good_tiles, // null or boolean[data.length] // should all be false
......
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