Commit 147f6635 authored by Andrey Filippov's avatar Andrey Filippov

Added temporal unsharp mask

parent e3bbc197
......@@ -707,6 +707,9 @@ min_str_neib_fpn 0.35
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_offset = 20; // offset between motion detection pairs
public int cuas_temporal_um = 100; // temporal "unsharp mask" - subtract running
public double cuas_tum_threshold = 5.0; // if >0, remove outliers frim the running average and recalculate RA
public int cuas_precorr_ra = 10; // rolling average before correlation
public int cuas_corr_step = 5; // correlation step when using rolling average
......@@ -2210,6 +2213,10 @@ min_str_neib_fpn 0.35
"The number of correlation pairs to accumulate.");
gd.addNumericField("Pairs offset", this.cuas_corr_offset, 0,3,"scenes",
"Offset between the correlation pairs");
gd.addNumericField("Temporal unsharp mask length", this.cuas_temporal_um, 0,3,"scenes",
"Subtract running average this long.");
gd.addNumericField("Temporal UM threshold", this.cuas_tum_threshold, 5,8,"",
"Remove outlier pixels that differ from the running average by more than this (to later re-calculate running average excluding those pixels.");
gd.addNumericField("Pre-correlation running average", this.cuas_precorr_ra, 0,3,"scenes",
"Smoothing input data by running average before correlation for motion vectors calculations. Target extraction wil still use individual scenes.");
......@@ -3323,6 +3330,9 @@ min_str_neib_fpn 0.35
this.cuas_corr_pairs = (int) gd.getNextNumber();
this.cuas_corr_offset = (int) gd.getNextNumber();
this.cuas_temporal_um = (int) gd.getNextNumber();
this.cuas_tum_threshold = gd.getNextNumber();
this.cuas_precorr_ra = (int) gd.getNextNumber();
this.cuas_corr_step = (int) gd.getNextNumber();
......@@ -4285,6 +4295,8 @@ min_str_neib_fpn 0.35
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_offset", this.cuas_corr_offset+""); // 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_precorr_ra", this.cuas_precorr_ra+""); // int
properties.setProperty(prefix+"cuas_corr_step", this.cuas_corr_step+""); // int
......@@ -5215,6 +5227,8 @@ min_str_neib_fpn 0.35
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_offset")!=null) this.cuas_corr_offset=Integer.parseInt(properties.getProperty(prefix+"cuas_corr_offset"));
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_tum_threshold")!=null) this.cuas_tum_threshold=Double.parseDouble(properties.getProperty(prefix+"cuas_tum_threshold"));
if (properties.getProperty(prefix+"cuas_precorr_ra")!=null) this.cuas_precorr_ra=Integer.parseInt(properties.getProperty(prefix+"cuas_precorr_ra"));
if (properties.getProperty(prefix+"cuas_corr_step")!=null) this.cuas_corr_step=Integer.parseInt(properties.getProperty(prefix+"cuas_corr_step"));
......@@ -6148,6 +6162,9 @@ min_str_neib_fpn 0.35
imp.cuas_smooth = this.cuas_smooth;
imp.cuas_corr_pairs = this.cuas_corr_pairs;
imp.cuas_corr_offset = this.cuas_corr_offset;
imp.cuas_temporal_um = this.cuas_temporal_um;
imp.cuas_tum_threshold = this.cuas_tum_threshold;
imp.cuas_precorr_ra = this.cuas_precorr_ra;
imp.cuas_corr_step = this.cuas_corr_step;
imp.cuas_half_step = this.cuas_half_step;
......
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