Commit 48b56791 authored by Andrey Filippov's avatar Andrey Filippov

Added overlap scaling

parent f2f461fb
......@@ -313,7 +313,9 @@ public class IntersceneMatchParameters {
public boolean lock_position = false; // camera position is not changing, only orientation (cuas mode)
public boolean cuas_rotation = false; // assumes lock_position, camera is rotating around the center
public boolean manual_correction = false; // once used for foliage to merge two sequences
public boolean overlap_sequences = false; // overlap sequences: scan down from the previous center
public boolean overlap_sequences = false; // overlap sequences: scan down from the previous center
public double overlap_scale = 1.0; // scale overlap: 1.0 step equals to half scan range
public boolean reset_photometric = true; // reset photometric calibration - once for each new series
public boolean force_ref_dsi = false; // true;
public boolean force_orientations = false;
......@@ -1784,6 +1786,9 @@ min_str_neib_fpn 0.35
"Once used for foliage to merge two sequences.");
gd.addCheckbox ("Overlap sequences", this.overlap_sequences,
"Overlap sequences by half - start (down) from the previous center.");
gd.addNumericField("Scale inter-reference steps", this.overlap_scale, 3,5,"",
"Reduce step between referencese scenes. 1.0 corresponds to the previous state where earliest scene became reference.");
gd.addCheckbox ("Reset photometric calibration", this.reset_photometric,
"Reset photometric calibration, will use basic one before re-calibrating.");
gd.addCheckbox ("Force reference scene DSI calculation", this.force_ref_dsi,
......@@ -3788,6 +3793,7 @@ min_str_neib_fpn 0.35
this.lock_position |= this.cuas_rotation;
this.manual_correction = gd.getNextBoolean();
this.overlap_sequences = gd.getNextBoolean();
this.overlap_scale = gd.getNextNumber();
this.reset_photometric = gd.getNextBoolean();
this.force_ref_dsi = gd.getNextBoolean();
this.force_orientations = gd.getNextBoolean();
......@@ -5029,6 +5035,7 @@ min_str_neib_fpn 0.35
properties.setProperty(prefix+"cuas_rotation", this.cuas_rotation + ""); // boolean
properties.setProperty(prefix+"manual_correction", this.manual_correction + ""); // boolean
properties.setProperty(prefix+"overlap_sequences", this.overlap_sequences + ""); // boolean
properties.setProperty(prefix+"overlap_scale", this.overlap_scale+""); // double
properties.setProperty(prefix+"reset_photometric", this.reset_photometric + ""); // boolean
properties.setProperty(prefix+"force_ref_dsi", this.force_ref_dsi + ""); // boolean
properties.setProperty(prefix+"force_orientations", this.force_orientations + ""); // boolean
......@@ -6211,7 +6218,8 @@ min_str_neib_fpn 0.35
if (properties.getProperty(prefix+"cuas_rotation")!=null) this.cuas_rotation=Boolean.parseBoolean(properties.getProperty(prefix+"cuas_rotation"));
this.lock_position |= this.cuas_rotation;
if (properties.getProperty(prefix+"manual_correction")!=null) this.manual_correction=Boolean.parseBoolean(properties.getProperty(prefix+"manual_correction"));
if (properties.getProperty(prefix+"overlap_sequences")!=null) this.overlap_sequences=Boolean.parseBoolean(properties.getProperty(prefix+"overlap_sequences"));
if (properties.getProperty(prefix+"overlap_sequences")!=null) this.overlap_sequences=Boolean.parseBoolean(properties.getProperty(prefix+"overlap_sequences"));
if (properties.getProperty(prefix+"overlap_scale")!=null) this.overlap_scale=Double.parseDouble(properties.getProperty(prefix+"overlap_scale"));
if (properties.getProperty(prefix+"reset_photometric")!=null) this.reset_photometric=Boolean.parseBoolean(properties.getProperty(prefix+"reset_photometric"));
if (properties.getProperty(prefix+"force_ref_dsi")!=null) this.force_ref_dsi=Boolean.parseBoolean(properties.getProperty(prefix+"force_ref_dsi"));
if (properties.getProperty(prefix+"force_orientations")!=null) this.force_orientations=Boolean.parseBoolean(properties.getProperty(prefix+"force_orientations"));
......@@ -7427,6 +7435,7 @@ min_str_neib_fpn 0.35
imp.cuas_rotation = this.cuas_rotation;
imp.manual_correction = this.manual_correction;
imp.overlap_sequences = this.overlap_sequences;
imp.overlap_scale = this.overlap_scale;
imp.reset_photometric = this.reset_photometric;
imp.force_ref_dsi = this.force_ref_dsi;
imp.force_orientations = this.force_orientations;
......
......@@ -8449,6 +8449,7 @@ if (debugLevel > -100) return true; // temporarily !
{
boolean single_series = clt_parameters.imp.single_series;
boolean overlap_sequences = clt_parameters.imp.overlap_sequences;
double overlap_scale = clt_parameters.imp.overlap_scale; // 0.5; // scale overlap: 1.0 step equals to half scan range
int stereo_gap = clt_parameters.imp.stereo_gap;
double stereo_intereye = clt_parameters.imp.stereo_intereye;
double stereo_phone_width = clt_parameters.imp.stereo_phone_width; // 0 - no padding
......@@ -8690,7 +8691,7 @@ if (debugLevel > -100) return true; // temporarily !
if (start_ref_pointers[0] >= (min_num_scenes-1)) {
System.out.println("testing half-step: start_ref_pointers[0]="+start_ref_pointers[0]+
", start_ref_pointers[1]="+start_ref_pointers[1]+", ref_index="+ref_index);
int offset = (start_ref_pointers[1] - start_ref_pointers[0])/2;
int offset = (int) overlap_scale * (start_ref_pointers[1] - start_ref_pointers[0]);
start_ref_pointers[0] += offset;
start_ref_pointers[1] += offset;
System.out.println("testing half-step: start_ref_pointers[0]="+start_ref_pointers[0]+
......
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