Commit a4ec6dc5 authored by Andrey Filippov's avatar Andrey Filippov

Added boost parameters

parent 8d8b4861
...@@ -792,8 +792,10 @@ min_str_neib_fpn 0.35 ...@@ -792,8 +792,10 @@ min_str_neib_fpn 0.35
public int cuas_n_recenter = 2; // when cosine window, re-center window these many times public int cuas_n_recenter = 2; // when cosine window, re-center window these many times
public double cuas_rstr = 0.01; // minimal phase correlation maximums relative to max str public double cuas_rstr = 0.01; // minimal phase correlation maximums relative to max str
public boolean cuas_smooth = true; // used cosine window when averaging correlations public boolean cuas_smooth = true; // used cosine window when averaging correlations
public int cuas_corr_pairs = 50; // number of correlation pairs to accumulate public int cuas_corr_pairs = 20; // number of correlation pairs to accumulate
public int cuas_corr_offset = 20; // offset between motion detection pairs public double cuas_boost_slow = 4.0; // if >1 and the motion vector is below tile_size/cuas_boost_slow, scale corr_pairs
public double cuas_boost_mstr = 0.007; // scale corr_pairs if motion strength is below
public int cuas_corr_offset = 5; // offset between motion detection pairs
public boolean cuas_gaussian_ra = true; // use gaussian temporal Gaussian instead of running average public boolean cuas_gaussian_ra = true; // use gaussian temporal Gaussian instead of running average
public int cuas_temporal_um = 100; // temporal "unsharp mask" - subtract running public int cuas_temporal_um = 100; // temporal "unsharp mask" - subtract running
public double cuas_tum_threshold = 5.0; // if >0, remove outliers from the running average and recalculate RA public double cuas_tum_threshold = 5.0; // if >0, remove outliers from the running average and recalculate RA
...@@ -896,7 +898,9 @@ min_str_neib_fpn 0.35 ...@@ -896,7 +898,9 @@ min_str_neib_fpn 0.35
public double cuas_slow_fast_mismatch = 1.5; // allow larger mismatch between slow and fast public double cuas_slow_fast_mismatch = 1.5; // allow larger mismatch between slow and fast
public double cuas_match_len_pwr = 0.5; // raise matching length to this power for calculating score public double cuas_match_len_pwr = 0.5; // raise matching length to this power for calculating score
public double cuas_offcenter = 0.5; // maximal off-center relative to the tile size (0.5 - how it was, +/-4 pix) public double cuas_offcenter = 0.6; // maximal off-center relative to the tile size (0.5 - how it was, +/-4 pix)
public double cuas_scale_wnd = 2.0; // When building noise map, scale search window range from original -8..+7 (2.0 -> -16..+15).
public double cuas_noisemax = 10.0; // when (max-min) of a 16-pixel tile exceeds this, do not fail on far offcenter
public boolean cuas_fail_mismatch = false; // fail high mismatch early public boolean cuas_fail_mismatch = false; // fail high mismatch early
public boolean cuas_ignore_mismatch = false; // calculate mismatch but do not remove public boolean cuas_ignore_mismatch = false; // calculate mismatch but do not remove
...@@ -2682,6 +2686,10 @@ min_str_neib_fpn 0.35 ...@@ -2682,6 +2686,10 @@ min_str_neib_fpn 0.35
"Apply cosine weights when averaging a sequence of correlation pairs."); "Apply cosine weights when averaging a sequence of correlation pairs.");
gd.addNumericField("Number of pairs", this.cuas_corr_pairs, 0,3,"", gd.addNumericField("Number of pairs", this.cuas_corr_pairs, 0,3,"",
"The number of correlation pairs to accumulate."); "The number of correlation pairs to accumulate.");
gd.addNumericField("Boost pairs for slow targets", this.cuas_boost_slow, 5,8,"",
"If >1 and the motion vector is below tile_size/cuas_boost_slow, scale corr_pairs.");
gd.addNumericField("Boost pairs for weak targets", this.cuas_boost_mstr, 5,8,"",
"Scale corr_pairs if motion strength is below.");
gd.addNumericField("Pairs offset", this.cuas_corr_offset, 0,3,"scenes", gd.addNumericField("Pairs offset", this.cuas_corr_offset, 0,3,"scenes",
"Offset between the correlation pairs"); "Offset between the correlation pairs");
gd.addCheckbox ("Gaussian instead of Running Average", this.cuas_gaussian_ra, gd.addCheckbox ("Gaussian instead of Running Average", this.cuas_gaussian_ra,
...@@ -2870,8 +2878,12 @@ min_str_neib_fpn 0.35 ...@@ -2870,8 +2878,12 @@ min_str_neib_fpn 0.35
gd.addNumericField("Matching length power", this.cuas_match_len_pwr, 5,8,"", gd.addNumericField("Matching length power", this.cuas_match_len_pwr, 5,8,"",
"Raise matching length to this power for calculating score."); "Raise matching length to this power for calculating score.");
gd.addNumericField("Maximal offset from the tile center", this.cuas_offcenter, 5,8,"", gd.addNumericField("Maximal offset from the tile center", this.cuas_offcenter, 5,8,"",
"Maximal relative offset of the maximum as a fraction of ther tile size (0.5 -> +/-4 pix)."); "Maximal relative offset of the maximum as a fraction of ther tile size (0.5 -> +/-4 pix).");
gd.addNumericField("Scale min/max search window", this.cuas_scale_wnd, 5,8,"",
"When building noise map, scale search window range from original -8..+7 (2.0 -> -16..+15).");
gd.addNumericField("\"Maximal variations for \"far\" failures.", this.cuas_noisemax, 5,8,"",
"When (max-min) of a 16-pixel tile exceeds this, do not fail on far offcenter.");
gd.addCheckbox ("Fail mismatch early", this.cuas_fail_mismatch, gd.addCheckbox ("Fail mismatch early", this.cuas_fail_mismatch,
"Fail after score calculation if there is not match both before and after."); "Fail after score calculation if there is not match both before and after.");
...@@ -4330,6 +4342,8 @@ min_str_neib_fpn 0.35 ...@@ -4330,6 +4342,8 @@ min_str_neib_fpn 0.35
this.cuas_rstr = gd.getNextNumber(); this.cuas_rstr = gd.getNextNumber();
this.cuas_smooth = gd.getNextBoolean(); this.cuas_smooth = gd.getNextBoolean();
this.cuas_corr_pairs = (int) gd.getNextNumber(); this.cuas_corr_pairs = (int) gd.getNextNumber();
this.cuas_boost_slow = gd.getNextNumber();
this.cuas_boost_mstr = gd.getNextNumber();
this.cuas_corr_offset = (int) gd.getNextNumber(); this.cuas_corr_offset = (int) gd.getNextNumber();
this.cuas_gaussian_ra = gd.getNextBoolean(); this.cuas_gaussian_ra = gd.getNextBoolean();
this.cuas_temporal_um = (int) gd.getNextNumber(); this.cuas_temporal_um = (int) gd.getNextNumber();
...@@ -4425,7 +4439,9 @@ min_str_neib_fpn 0.35 ...@@ -4425,7 +4439,9 @@ min_str_neib_fpn 0.35
this.cuas_slow_fast_mismatch = gd.getNextNumber(); this.cuas_slow_fast_mismatch = gd.getNextNumber();
this.cuas_match_len_pwr = gd.getNextNumber(); this.cuas_match_len_pwr = gd.getNextNumber();
this.cuas_offcenter = gd.getNextNumber(); this.cuas_offcenter = gd.getNextNumber();
this.cuas_scale_wnd = gd.getNextNumber();
this.cuas_noisemax = gd.getNextNumber();
this.cuas_fail_mismatch = gd.getNextBoolean(); this.cuas_fail_mismatch = gd.getNextBoolean();
this.cuas_ignore_mismatch = gd.getNextBoolean(); this.cuas_ignore_mismatch = gd.getNextBoolean();
...@@ -5624,7 +5640,9 @@ min_str_neib_fpn 0.35 ...@@ -5624,7 +5640,9 @@ min_str_neib_fpn 0.35
properties.setProperty(prefix+"cuas_rstr", this.cuas_rstr+""); // double properties.setProperty(prefix+"cuas_rstr", this.cuas_rstr+""); // double
properties.setProperty(prefix+"cuas_smooth", this.cuas_smooth+""); // boolean properties.setProperty(prefix+"cuas_smooth", this.cuas_smooth+""); // boolean
properties.setProperty(prefix+"cuas_corr_pairs", this.cuas_corr_pairs+""); // int properties.setProperty(prefix+"cuas_corr_pairs", this.cuas_corr_pairs+""); // int
properties.setProperty(prefix+"cuas_corr_offset", this.cuas_corr_offset+""); // int properties.setProperty(prefix+"cuas_boost_slow", this.cuas_boost_slow+""); // double
properties.setProperty(prefix+"cuas_boost_mstr", this.cuas_boost_mstr+""); // double
properties.setProperty(prefix+"cuas_corr_offset", this.cuas_corr_offset+""); // int
properties.setProperty(prefix+"cuas_gaussian_ra", this.cuas_gaussian_ra+""); // boolean properties.setProperty(prefix+"cuas_gaussian_ra", this.cuas_gaussian_ra+""); // boolean
properties.setProperty(prefix+"cuas_temporal_um", this.cuas_temporal_um+""); // int properties.setProperty(prefix+"cuas_temporal_um", this.cuas_temporal_um+""); // int
properties.setProperty(prefix+"cuas_tum_threshold", this.cuas_tum_threshold+""); // double properties.setProperty(prefix+"cuas_tum_threshold", this.cuas_tum_threshold+""); // double
...@@ -5716,6 +5734,8 @@ min_str_neib_fpn 0.35 ...@@ -5716,6 +5734,8 @@ min_str_neib_fpn 0.35
properties.setProperty(prefix+"cuas_slow_fast_mismatch",this.cuas_slow_fast_mismatch+"");// double properties.setProperty(prefix+"cuas_slow_fast_mismatch",this.cuas_slow_fast_mismatch+"");// double
properties.setProperty(prefix+"cuas_match_len_pwr", this.cuas_match_len_pwr+""); // double properties.setProperty(prefix+"cuas_match_len_pwr", this.cuas_match_len_pwr+""); // double
properties.setProperty(prefix+"cuas_offcenter", this.cuas_offcenter+""); // double properties.setProperty(prefix+"cuas_offcenter", this.cuas_offcenter+""); // double
properties.setProperty(prefix+"cuas_scale_wnd", this.cuas_scale_wnd+""); // double
properties.setProperty(prefix+"cuas_noisemax", this.cuas_noisemax+""); // double
properties.setProperty(prefix+"cuas_fail_mismatch", this.cuas_fail_mismatch+""); // boolean properties.setProperty(prefix+"cuas_fail_mismatch", this.cuas_fail_mismatch+""); // boolean
properties.setProperty(prefix+"cuas_ignore_mismatch", this.cuas_ignore_mismatch+"");// boolean properties.setProperty(prefix+"cuas_ignore_mismatch", this.cuas_ignore_mismatch+"");// boolean
...@@ -6853,6 +6873,8 @@ min_str_neib_fpn 0.35 ...@@ -6853,6 +6873,8 @@ min_str_neib_fpn 0.35
if (properties.getProperty(prefix+"cuas_rstr")!=null) this.cuas_rstr=Double.parseDouble(properties.getProperty(prefix+"cuas_rstr")); if (properties.getProperty(prefix+"cuas_rstr")!=null) this.cuas_rstr=Double.parseDouble(properties.getProperty(prefix+"cuas_rstr"));
if (properties.getProperty(prefix+"cuas_smooth")!=null) this.cuas_smooth=Boolean.parseBoolean(properties.getProperty(prefix+"cuas_smooth")); if (properties.getProperty(prefix+"cuas_smooth")!=null) this.cuas_smooth=Boolean.parseBoolean(properties.getProperty(prefix+"cuas_smooth"));
if (properties.getProperty(prefix+"cuas_corr_pairs")!=null) this.cuas_corr_pairs=Integer.parseInt(properties.getProperty(prefix+"cuas_corr_pairs")); if (properties.getProperty(prefix+"cuas_corr_pairs")!=null) this.cuas_corr_pairs=Integer.parseInt(properties.getProperty(prefix+"cuas_corr_pairs"));
if (properties.getProperty(prefix+"cuas_boost_slow")!=null) this.cuas_boost_slow=Double.parseDouble(properties.getProperty(prefix+"cuas_boost_slow"));
if (properties.getProperty(prefix+"cuas_boost_mstr")!=null) this.cuas_boost_mstr=Double.parseDouble(properties.getProperty(prefix+"cuas_boost_mstr"));
if (properties.getProperty(prefix+"cuas_corr_offset")!=null) this.cuas_corr_offset=Integer.parseInt(properties.getProperty(prefix+"cuas_corr_offset")); if (properties.getProperty(prefix+"cuas_corr_offset")!=null) this.cuas_corr_offset=Integer.parseInt(properties.getProperty(prefix+"cuas_corr_offset"));
if (properties.getProperty(prefix+"cuas_gaussian_ra")!=null) this.cuas_gaussian_ra=Boolean.parseBoolean(properties.getProperty(prefix+"cuas_gaussian_ra")); if (properties.getProperty(prefix+"cuas_gaussian_ra")!=null) this.cuas_gaussian_ra=Boolean.parseBoolean(properties.getProperty(prefix+"cuas_gaussian_ra"));
if (properties.getProperty(prefix+"cuas_temporal_um")!=null) this.cuas_temporal_um=Integer.parseInt(properties.getProperty(prefix+"cuas_temporal_um")); if (properties.getProperty(prefix+"cuas_temporal_um")!=null) this.cuas_temporal_um=Integer.parseInt(properties.getProperty(prefix+"cuas_temporal_um"));
...@@ -6946,6 +6968,8 @@ min_str_neib_fpn 0.35 ...@@ -6946,6 +6968,8 @@ min_str_neib_fpn 0.35
if (properties.getProperty(prefix+"cuas_slow_fast_mismatch")!=null)this.cuas_slow_fast_mismatch=Double.parseDouble(properties.getProperty(prefix+"cuas_slow_fast_mismatch")); if (properties.getProperty(prefix+"cuas_slow_fast_mismatch")!=null)this.cuas_slow_fast_mismatch=Double.parseDouble(properties.getProperty(prefix+"cuas_slow_fast_mismatch"));
if (properties.getProperty(prefix+"cuas_match_len_pwr")!=null) this.cuas_match_len_pwr=Double.parseDouble(properties.getProperty(prefix+"cuas_match_len_pwr")); if (properties.getProperty(prefix+"cuas_match_len_pwr")!=null) this.cuas_match_len_pwr=Double.parseDouble(properties.getProperty(prefix+"cuas_match_len_pwr"));
if (properties.getProperty(prefix+"cuas_offcenter")!=null) this.cuas_offcenter=Double.parseDouble(properties.getProperty(prefix+"cuas_offcenter")); if (properties.getProperty(prefix+"cuas_offcenter")!=null) this.cuas_offcenter=Double.parseDouble(properties.getProperty(prefix+"cuas_offcenter"));
if (properties.getProperty(prefix+"cuas_scale_wnd")!=null) this.cuas_scale_wnd=Double.parseDouble(properties.getProperty(prefix+"cuas_scale_wnd"));
if (properties.getProperty(prefix+"cuas_noisemax")!=null) this.cuas_noisemax=Double.parseDouble(properties.getProperty(prefix+"cuas_noisemax"));
if (properties.getProperty(prefix+"cuas_fail_mismatch")!=null) this.cuas_fail_mismatch=Boolean.parseBoolean(properties.getProperty(prefix+"cuas_fail_mismatch")); if (properties.getProperty(prefix+"cuas_fail_mismatch")!=null) this.cuas_fail_mismatch=Boolean.parseBoolean(properties.getProperty(prefix+"cuas_fail_mismatch"));
if (properties.getProperty(prefix+"cuas_ignore_mismatch")!=null) this.cuas_ignore_mismatch=Boolean.parseBoolean(properties.getProperty(prefix+"cuas_ignore_mismatch")); if (properties.getProperty(prefix+"cuas_ignore_mismatch")!=null) this.cuas_ignore_mismatch=Boolean.parseBoolean(properties.getProperty(prefix+"cuas_ignore_mismatch"));
...@@ -8099,6 +8123,8 @@ min_str_neib_fpn 0.35 ...@@ -8099,6 +8123,8 @@ min_str_neib_fpn 0.35
imp.cuas_rstr = this.cuas_rstr; imp.cuas_rstr = this.cuas_rstr;
imp.cuas_smooth = this.cuas_smooth; imp.cuas_smooth = this.cuas_smooth;
imp.cuas_corr_pairs = this.cuas_corr_pairs; imp.cuas_corr_pairs = this.cuas_corr_pairs;
imp.cuas_boost_slow = this.cuas_boost_slow;
imp.cuas_boost_mstr = this.cuas_boost_mstr;
imp.cuas_corr_offset = this.cuas_corr_offset; imp.cuas_corr_offset = this.cuas_corr_offset;
imp.cuas_gaussian_ra = this.cuas_gaussian_ra; imp.cuas_gaussian_ra = this.cuas_gaussian_ra;
imp.cuas_temporal_um = this.cuas_temporal_um; imp.cuas_temporal_um = this.cuas_temporal_um;
...@@ -8190,6 +8216,8 @@ min_str_neib_fpn 0.35 ...@@ -8190,6 +8216,8 @@ min_str_neib_fpn 0.35
imp.cuas_slow_fast_mismatch = this.cuas_slow_fast_mismatch; imp.cuas_slow_fast_mismatch = this.cuas_slow_fast_mismatch;
imp.cuas_match_len_pwr = this.cuas_match_len_pwr; imp.cuas_match_len_pwr = this.cuas_match_len_pwr;
imp.cuas_offcenter = this.cuas_offcenter; imp.cuas_offcenter = this.cuas_offcenter;
imp.cuas_scale_wnd = this.cuas_scale_wnd;
imp.cuas_noisemax = this.cuas_noisemax;
imp.cuas_fail_mismatch = this.cuas_fail_mismatch; imp.cuas_fail_mismatch = this.cuas_fail_mismatch;
imp.cuas_ignore_mismatch = this.cuas_ignore_mismatch; imp.cuas_ignore_mismatch = this.cuas_ignore_mismatch;
......
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