Commit c3f2181a authored by Andrey Filippov's avatar Andrey Filippov

Before row/col

parent 8550fc6e
...@@ -1279,7 +1279,7 @@ public class GpuQuad{ // quad camera description ...@@ -1279,7 +1279,7 @@ public class GpuQuad{ // quad camera description
if (!force && this.gpuTileProcessor.bayer_set && !quadCLT.hasNewImageData()) { if (!force && this.gpuTileProcessor.bayer_set && !quadCLT.hasNewImageData()) {
return; return;
} }
double [][][] bayer_data = quadCLT.getImageData(); // resets hasNewImageData() double [][][] bayer_data = quadCLT.getResetImageData(); // resets hasNewImageData()
setBayerImages( setBayerImages(
bayer_data, bayer_data,
true); true);
......
...@@ -664,10 +664,14 @@ min_str_neib_fpn 0.35 ...@@ -664,10 +664,14 @@ min_str_neib_fpn 0.35
public double cuas_decay_average = 100.0; // Decay in seconds for cimulative CLT public double cuas_decay_average = 100.0; // Decay in seconds for cimulative CLT
public double cuas_keep_fraction = 0.9; // Filter CLT variants for tiles keeping at least this fraction of the total weight public double cuas_keep_fraction = 0.9; // Filter CLT variants for tiles keeping at least this fraction of the total weight
public boolean cuas_step = true; // recalculate template image after each fitting step public boolean cuas_step = true; // recalculate template image after each fitting step
public boolean cuas_subtract_fpn= true; // Subtract FPN
public boolean cuas_calc_fpn = false; // Recalculate+save FPN unconditionally, if false - try to read saved one
public double cuas_rot_period = 175.0; // rotation period of te gimbal mount (in scenes)
public boolean cuas_debug = false; // save debug images (and show them if not in batch mode) public boolean cuas_debug = false; // save debug images (and show them if not in batch mode)
public boolean cuas_step_debug = false; // save debug images during per-step cuas recalculation (and show them if not in batch mode) public boolean cuas_step_debug = false; // save debug images during per-step cuas recalculation (and show them if not in batch mode)
// TODO: move next parameters elsewhere - they are not the motion blur ones. // TODO: move next parameters elsewhere - they are not the motion blur ones.
public int mb_gain_index_pose = 5; // pose readjust pass to switch to full mb_max_gain from mb_max_gain_inter public int mb_gain_index_pose = 5; // pose readjust pass to switch to full mb_max_gain from mb_max_gain_inter
public int mb_gain_index_depth = 5; // depth map refine pass (SfM) to switch to full mb_max_gain from mb_max_gain_inter public int mb_gain_index_depth = 5; // depth map refine pass (SfM) to switch to full mb_max_gain from mb_max_gain_inter
...@@ -731,6 +735,7 @@ min_str_neib_fpn 0.35 ...@@ -731,6 +735,7 @@ min_str_neib_fpn 0.35
public String video_codec_combo = "vp8"; // applies when combining videos public String video_codec_combo = "vp8"; // applies when combining videos
public int video_crf_combo = 40; // lower - better, larger file size applies when combining videos public int video_crf_combo = 40; // lower - better, larger file size applies when combining videos
public boolean add_average = true; public boolean add_average = true;
public boolean calculate_average = false; // Calculate average from the slices. False - use CLT average if available.
public boolean subtract_average = false; public boolean subtract_average = false;
public int running_average = 0; public int running_average = 0;
public boolean extract_center_orientation = true; // in lock_position mode only - debug feature public boolean extract_center_orientation = true; // in lock_position mode only - debug feature
...@@ -1995,10 +2000,15 @@ min_str_neib_fpn 0.35 ...@@ -1995,10 +2000,15 @@ min_str_neib_fpn 0.35
"Filter tile CLT variants that keep fraction of the total weight."); "Filter tile CLT variants that keep fraction of the total weight.");
gd.addCheckbox ("Recalculate after each tuning step", this.cuas_step, gd.addCheckbox ("Recalculate after each tuning step", this.cuas_step,
"Recalciulate correlation pattern after each position/orientation and disparity adjustment step."); "Recalciulate correlation pattern after each position/orientation and disparity adjustment step.");
gd.addCheckbox ("Subtract FPN", this.cuas_subtract_fpn,
"Subtract FPN from the channel images.");
gd.addCheckbox ("(Re)calculate FPN", this.cuas_calc_fpn,
"Recalculate+save FPN unconditionally, if false - try to read saved one.");
gd.addNumericField("Rotation period", this.cuas_rot_period, 5,7,"scene periods",
"Used for averaging FPN for integer number of rotation periods. TODO: calculate from the actual rotation.");
gd.addMessage("=== Debug ===");
gd.addCheckbox ("Save/show debug images", this.cuas_debug, gd.addCheckbox ("Save/show debug images", this.cuas_debug,
"Save CUAS-related debug images and show them in non-batch mode."); "Save CUAS-related debug images and show them in non-batch mode.");
gd.addMessage("=== Debug ===");
gd.addCheckbox ("Save/show debug images for each tuning step",this.cuas_step_debug, gd.addCheckbox ("Save/show debug images for each tuning step",this.cuas_step_debug,
"Save CUAS-related debug images during per-step cuas recalculation and show them in non-batch mode."); "Save CUAS-related debug images during per-step cuas recalculation and show them in non-batch mode.");
...@@ -2127,8 +2137,10 @@ min_str_neib_fpn 0.35 ...@@ -2127,8 +2137,10 @@ min_str_neib_fpn 0.35
"FFMPEG video encoder, such as \"VP8\" or \"VP9\". Applies when merging segments."); "FFMPEG video encoder, such as \"VP8\" or \"VP9\". Applies when merging segments.");
gd.addNumericField("Video CRF for combining", this.video_crf_combo, 0,3,"", gd.addNumericField("Video CRF for combining", this.video_crf_combo, 0,3,"",
"Quality - the lower the better. 40 - OK. Applies when merging segments."); "Quality - the lower the better. 40 - OK. Applies when merging segments.");
gd.addCheckbox ("Average slice", this.add_average, gd.addCheckbox ("Insert average slice", this.add_average,
"Insert average slice before scene slices"); "Insert average slice before scene slices");
gd.addCheckbox ("Calculate average from slices", this.calculate_average,
"Calculate average slice from other slices. If false - try to use average CLT if available.");
gd.addCheckbox ("Subtract average", this.subtract_average, gd.addCheckbox ("Subtract average", this.subtract_average,
"Subtract average slice from all scenes"); "Subtract average slice from all scenes");
gd.addNumericField("Running average length", this.running_average, 0,3,"", gd.addNumericField("Running average length", this.running_average, 0,3,"",
...@@ -2896,6 +2908,10 @@ min_str_neib_fpn 0.35 ...@@ -2896,6 +2908,10 @@ min_str_neib_fpn 0.35
this.cuas_decay_average = gd.getNextNumber(); this.cuas_decay_average = gd.getNextNumber();
this.cuas_keep_fraction = gd.getNextNumber(); this.cuas_keep_fraction = gd.getNextNumber();
this.cuas_step = gd.getNextBoolean(); this.cuas_step = gd.getNextBoolean();
this.cuas_subtract_fpn = gd.getNextBoolean();
this.cuas_calc_fpn = gd.getNextBoolean();
this.cuas_rot_period = gd.getNextNumber();
this.cuas_debug = gd.getNextBoolean(); this.cuas_debug = gd.getNextBoolean();
this.cuas_step_debug = gd.getNextBoolean(); this.cuas_step_debug = gd.getNextBoolean();
...@@ -2961,6 +2977,7 @@ min_str_neib_fpn 0.35 ...@@ -2961,6 +2977,7 @@ min_str_neib_fpn 0.35
this.video_codec_combo= gd.getNextString(); this.video_codec_combo= gd.getNextString();
this.video_crf_combo = (int) gd.getNextNumber(); this.video_crf_combo = (int) gd.getNextNumber();
this.add_average = gd.getNextBoolean(); this.add_average = gd.getNextBoolean();
this.calculate_average = gd.getNextBoolean();
this.subtract_average = gd.getNextBoolean(); this.subtract_average = gd.getNextBoolean();
this.running_average = (int) gd.getNextNumber(); this.running_average = (int) gd.getNextNumber();
this.extract_center_orientation=gd.getNextBoolean(); this.extract_center_orientation=gd.getNextBoolean();
...@@ -3723,6 +3740,11 @@ min_str_neib_fpn 0.35 ...@@ -3723,6 +3740,11 @@ min_str_neib_fpn 0.35
properties.setProperty(prefix+"cuas_decay_average", this.cuas_decay_average+""); // double properties.setProperty(prefix+"cuas_decay_average", this.cuas_decay_average+""); // double
properties.setProperty(prefix+"cuas_keep_fraction", this.cuas_keep_fraction+""); // double properties.setProperty(prefix+"cuas_keep_fraction", this.cuas_keep_fraction+""); // double
properties.setProperty(prefix+"cuas_step", this.cuas_step+""); // boolean properties.setProperty(prefix+"cuas_step", this.cuas_step+""); // boolean
properties.setProperty(prefix+"cuas_subtract_fpn", this.cuas_subtract_fpn+""); // boolean
properties.setProperty(prefix+"cuas_calc_fpn", this.cuas_calc_fpn+""); // boolean
properties.setProperty(prefix+"cuas_rot_period", this.cuas_rot_period+""); // double
properties.setProperty(prefix+"cuas_debug", this.cuas_debug+""); // boolean properties.setProperty(prefix+"cuas_debug", this.cuas_debug+""); // boolean
properties.setProperty(prefix+"cuas_step_debug", this.cuas_step_debug+""); // boolean properties.setProperty(prefix+"cuas_step_debug", this.cuas_step_debug+""); // boolean
...@@ -3780,6 +3802,7 @@ min_str_neib_fpn 0.35 ...@@ -3780,6 +3802,7 @@ min_str_neib_fpn 0.35
properties.setProperty(prefix+"video_codec_combo", this.video_codec_combo+""); // String properties.setProperty(prefix+"video_codec_combo", this.video_codec_combo+""); // String
properties.setProperty(prefix+"video_crf_combo", this.video_crf_combo+""); // int properties.setProperty(prefix+"video_crf_combo", this.video_crf_combo+""); // int
properties.setProperty(prefix+"add_average", this.add_average+""); // boolean properties.setProperty(prefix+"add_average", this.add_average+""); // boolean
properties.setProperty(prefix+"calculate_average", this.calculate_average+""); // boolean
properties.setProperty(prefix+"subtract_average", this.subtract_average+""); // boolean properties.setProperty(prefix+"subtract_average", this.subtract_average+""); // boolean
properties.setProperty(prefix+"running_average", this.running_average+""); // int properties.setProperty(prefix+"running_average", this.running_average+""); // int
...@@ -4525,6 +4548,10 @@ min_str_neib_fpn 0.35 ...@@ -4525,6 +4548,10 @@ min_str_neib_fpn 0.35
if (properties.getProperty(prefix+"cuas_decay_average")!=null) this.cuas_decay_average=Double.parseDouble(properties.getProperty(prefix+"cuas_decay_average")); if (properties.getProperty(prefix+"cuas_decay_average")!=null) this.cuas_decay_average=Double.parseDouble(properties.getProperty(prefix+"cuas_decay_average"));
if (properties.getProperty(prefix+"cuas_keep_fraction")!=null) this.cuas_keep_fraction=Double.parseDouble(properties.getProperty(prefix+"cuas_keep_fraction")); if (properties.getProperty(prefix+"cuas_keep_fraction")!=null) this.cuas_keep_fraction=Double.parseDouble(properties.getProperty(prefix+"cuas_keep_fraction"));
if (properties.getProperty(prefix+"cuas_step")!=null) this.cuas_step=Boolean.parseBoolean(properties.getProperty(prefix+"cuas_step")); if (properties.getProperty(prefix+"cuas_step")!=null) this.cuas_step=Boolean.parseBoolean(properties.getProperty(prefix+"cuas_step"));
if (properties.getProperty(prefix+"cuas_subtract_fpn")!=null) this.cuas_subtract_fpn=Boolean.parseBoolean(properties.getProperty(prefix+"cuas_subtract_fpn"));
if (properties.getProperty(prefix+"cuas_calc_fpn")!=null) this.cuas_calc_fpn=Boolean.parseBoolean(properties.getProperty(prefix+"cuas_calc_fpn"));
if (properties.getProperty(prefix+"cuas_rot_period")!=null) this.cuas_rot_period=Double.parseDouble(properties.getProperty(prefix+"cuas_rot_period"));
if (properties.getProperty(prefix+"cuas_debug")!=null) this.cuas_debug=Boolean.parseBoolean(properties.getProperty(prefix+"cuas_debug")); if (properties.getProperty(prefix+"cuas_debug")!=null) this.cuas_debug=Boolean.parseBoolean(properties.getProperty(prefix+"cuas_debug"));
if (properties.getProperty(prefix+"cuas_step_debug")!=null) this.cuas_step_debug=Boolean.parseBoolean(properties.getProperty(prefix+"cuas_step_debug")); if (properties.getProperty(prefix+"cuas_step_debug")!=null) this.cuas_step_debug=Boolean.parseBoolean(properties.getProperty(prefix+"cuas_step_debug"));
...@@ -4583,6 +4610,8 @@ min_str_neib_fpn 0.35 ...@@ -4583,6 +4610,8 @@ min_str_neib_fpn 0.35
if (properties.getProperty(prefix+"video_codec_combo")!=null) this.video_codec_combo=(String) properties.getProperty(prefix+"video_codec_combo"); if (properties.getProperty(prefix+"video_codec_combo")!=null) this.video_codec_combo=(String) properties.getProperty(prefix+"video_codec_combo");
if (properties.getProperty(prefix+"video_crf_combo")!=null) this.video_crf_combo=Integer.parseInt(properties.getProperty(prefix+"video_crf_combo")); if (properties.getProperty(prefix+"video_crf_combo")!=null) this.video_crf_combo=Integer.parseInt(properties.getProperty(prefix+"video_crf_combo"));
if (properties.getProperty(prefix+"add_average")!=null) this.add_average=Boolean.parseBoolean(properties.getProperty(prefix+"add_average")); if (properties.getProperty(prefix+"add_average")!=null) this.add_average=Boolean.parseBoolean(properties.getProperty(prefix+"add_average"));
if (properties.getProperty(prefix+"calculate_average")!=null) this.calculate_average=Boolean.parseBoolean(properties.getProperty(prefix+"calculate_average"));
//
if (properties.getProperty(prefix+"subtract_average")!=null) this.subtract_average=Boolean.parseBoolean(properties.getProperty(prefix+"subtract_average")); if (properties.getProperty(prefix+"subtract_average")!=null) this.subtract_average=Boolean.parseBoolean(properties.getProperty(prefix+"subtract_average"));
if (properties.getProperty(prefix+"running_average")!=null) this.running_average=Integer.parseInt(properties.getProperty(prefix+"running_average")); if (properties.getProperty(prefix+"running_average")!=null) this.running_average=Integer.parseInt(properties.getProperty(prefix+"running_average"));
if (properties.getProperty(prefix+"extract_center_orientation")!=null)this.extract_center_orientation=Boolean.parseBoolean(properties.getProperty(prefix+"extract_center_orientation")); if (properties.getProperty(prefix+"extract_center_orientation")!=null)this.extract_center_orientation=Boolean.parseBoolean(properties.getProperty(prefix+"extract_center_orientation"));
...@@ -5327,6 +5356,10 @@ min_str_neib_fpn 0.35 ...@@ -5327,6 +5356,10 @@ min_str_neib_fpn 0.35
imp.cuas_decay_average = this.cuas_decay_average; imp.cuas_decay_average = this.cuas_decay_average;
imp.cuas_keep_fraction = this.cuas_keep_fraction; imp.cuas_keep_fraction = this.cuas_keep_fraction;
imp.cuas_step = this.cuas_step; imp.cuas_step = this.cuas_step;
imp.cuas_subtract_fpn = this.cuas_subtract_fpn;
imp.cuas_calc_fpn = this.cuas_calc_fpn;
imp.cuas_rot_period = this.cuas_rot_period;
imp.cuas_debug = this.cuas_debug; imp.cuas_debug = this.cuas_debug;
imp.cuas_step_debug = this.cuas_step_debug; imp.cuas_step_debug = this.cuas_step_debug;
...@@ -5386,6 +5419,7 @@ min_str_neib_fpn 0.35 ...@@ -5386,6 +5419,7 @@ min_str_neib_fpn 0.35
imp.video_codec_combo = this.video_codec_combo; imp.video_codec_combo = this.video_codec_combo;
imp.video_crf_combo = this.video_crf_combo; imp.video_crf_combo = this.video_crf_combo;
imp.add_average = this.add_average; imp.add_average = this.add_average;
imp.calculate_average = this.calculate_average;
imp.subtract_average = this.subtract_average; imp.subtract_average = this.subtract_average;
imp.running_average = this.running_average; imp.running_average = this.running_average;
imp.extract_center_orientation=this.extract_center_orientation; imp.extract_center_orientation=this.extract_center_orientation;
......
...@@ -958,7 +958,7 @@ public class MultisceneLY { ...@@ -958,7 +958,7 @@ public class MultisceneLY {
image_dtt.getCorrelation2d(); image_dtt.getCorrelation2d();
double [][][][] dcorr_td = new double[tp_tasks_scenes[nscene].length][][][]; double [][][][] dcorr_td = new double[tp_tasks_scenes[nscene].length][][][];
image_dtt.quadCorrTD( // clt_data [task][sensor][color][][]; image_dtt.quadCorrTD( // clt_data [task][sensor][color][][];
scene.getImageData(), // final double [][][] image_data, // first index - number of image in a quad scene.getResetImageData(), // final double [][][] image_data, // first index - number of image in a quad
scene_gc.getSensorWH()[0], // final int width, scene_gc.getSensorWH()[0], // final int width,
tp_tasks_scenes[nscene], // tp_tasks, // final TpTask [] tp_tasks, tp_tasks_scenes[nscene], // tp_tasks, // final TpTask [] tp_tasks,
clt_parameters.img_dtt, // final ImageDttParameters imgdtt_params, // Now just extra correlation parameters, later will include, most others clt_parameters.img_dtt, // final ImageDttParameters imgdtt_params, // Now just extra correlation parameters, later will include, most others
......
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