Commit 53042eb0 authored by Andrey Filippov's avatar Andrey Filippov

debugging expansion

parent 41b267b4
......@@ -2,3 +2,6 @@
/.project
/.settings/
/target/
*.backup
NC393I
attic
\ No newline at end of file
This diff is collapsed.
......@@ -4698,6 +4698,8 @@ public class QuadCLT {
final boolean updateStatus,
final int debugLevel)
{
final boolean show_init_refine = true;
final boolean show_expand = true;
String name = (String) imp_quad[0].getProperty("name");
double [][][] image_data = new double [imp_quad.length][][];
......@@ -4754,7 +4756,15 @@ public class QuadCLT {
// refine first measurement
int bg_pass = tp.clt_3d_passes.size() - 1; // 0
int refine_pass = tp.clt_3d_passes.size(); // 1
for (int nnn = 0; nnn < 4; nnn ++){
// final boolean show_init_refine = true;
// final boolean show_expand = true;
if (show_init_refine) tp.showScan(
tp.clt_3d_passes.get(bg_pass), // CLTPass3d scan,
"after_bg-"+tp.clt_3d_passes.size());
for (int nnn = 0; nnn < 2; nnn ++){
refine_pass = tp.clt_3d_passes.size(); // 1
tp.refinePassSetup( // prepare tile tasks for the refine pass (re-measure disparities)
// final double [][][] image_data, // first index - number of image in a quad
......@@ -4771,7 +4781,10 @@ public class QuadCLT {
geometryCorrection,
threadsMax, // maximal number of threads to launch
updateStatus,
debugLevel);
2); // debugLevel);
tp.showScan(
tp.clt_3d_passes.get(refine_pass), // CLTPass3d scan,
"before_makeUnique-"+refine_pass);
int [] numLeftRemoved = tp.makeUnique(
tp.clt_3d_passes, // final ArrayList <CLTPass3d> passes,
0, // final int firstPass,
......@@ -4782,7 +4795,9 @@ public class QuadCLT {
if (debugLevel > -1){
System.out.println("cycle makeUnique("+refine_pass+") -> left: "+numLeftRemoved[0]+", removed:" + numLeftRemoved[1]);
}
if (show_init_refine) tp.showScan(
tp.clt_3d_passes.get(refine_pass), // CLTPass3d scan,
"after_refinePassSetup-"+tp.clt_3d_passes.size());
CLTMeasure( // perform single pass according to prepared tiles operations and disparity
image_data, // first index - number of image in a quad
......@@ -4794,8 +4809,11 @@ public class QuadCLT {
if (debugLevel > -1){
System.out.println("CLTMeasure("+refine_pass+")");
}
if (show_init_refine) tp.showScan(
tp.clt_3d_passes.get(refine_pass), // CLTPass3d scan,
"after_measure-"+tp.clt_3d_passes.size());
if (clt_parameters.combine_refine){
// if (clt_parameters.combine_refine){
TileProcessor.CLTPass3d combo_pass = tp.compositeScan(
tp.clt_3d_passes, // final ArrayList <CLTPass3d> passes,
bg_pass, // final int firstPass,
......@@ -4808,24 +4826,30 @@ public class QuadCLT {
clt_parameters.combine_min_vert, // final double minStrengthVert,
false, // final boolean use_last, //
// TODO: when useCombo - pay attention to borders (disregard)
false); // final boolean usePoly) // use polynomial method to find max), valid if useCombo == false
false, // final boolean usePoly) // use polynomial method to find max), valid if useCombo == false
true); // final boolean copyDebug)
tp.showScan(
if (show_init_refine) tp.showScan(
combo_pass, // CLTPass3d scan,
"after_compositeScan-"+tp.clt_3d_passes.size());
tp.clt_3d_passes.add(combo_pass);
// refine_pass = tp.clt_3d_passes.size();
// }
}
// TEMPORARY EXIT
if (tp.clt_3d_passes.size() > 0) return null; // just to fool compiler
// refine_pass = tp.clt_3d_passes.size();
}
}
// above - multiple refinements (reduce, make conditional?)
int num_extended = -1;
int [] numLeftRemoved;
// process once more to try combining of processed
for (int num_expand = 0; (num_expand < 2) && (num_extended != 0); num_expand++) {
// for (int num_expand = 0; (num_expand < 4) && (num_extended != 0); num_expand++) {
for (int num_expand = 0; (num_expand < 1) && (num_extended != 0); num_expand++) {
refine_pass = tp.clt_3d_passes.size(); // 1
tp.refinePassSetup( // prepare tile tasks for the refine pass (re-measure disparities)
// final double [][][] image_data, // first index - number of image in a quad
......@@ -4844,7 +4868,7 @@ public class QuadCLT {
updateStatus,
debugLevel);
tp.showScan(
if (show_expand) tp.showScan(
tp.clt_3d_passes.get(refine_pass), // CLTPass3d scan,
"after_refine-"+refine_pass);
tp.calcMaxTried(
......@@ -4865,12 +4889,10 @@ public class QuadCLT {
clt_parameters.combine_min_vert, // final double minStrengthVert,
true, // false, // final boolean use_last, //
// TODO: when useCombo - pay attention to borders (disregard)
false); // final boolean usePoly) // use polynomial method to find max), valid if useCombo == false
false, // final boolean usePoly) // use polynomial method to find max), valid if useCombo == false
true); // final boolean copyDebug)
tp.showScan(
if (show_expand) tp.showScan(
tp.clt_3d_passes.get(refine_pass), // CLTPass3d scan,
"after_refine-combine-"+(tp.clt_3d_passes.size() - 1));
......@@ -4903,7 +4925,7 @@ public class QuadCLT {
tp.clt_3d_passes.get(refine_pass), // final CLTPass3d new_scan,
clt_parameters.unique_tolerance, // final double unique_tolerance,
clt_parameters.show_unique); // final boolean show_unique)
tp.showScan(
if (show_expand) tp.showScan(
tp.clt_3d_passes.get(refine_pass), // CLTPass3d scan,
"before_measure-"+refine_pass); //String title)
......@@ -4922,7 +4944,7 @@ public class QuadCLT {
updateStatus,
debugLevel);
tp.showScan(
if (show_expand) tp.showScan(
tp.clt_3d_passes.get(refine_pass), // CLTPass3d scan,
"after_measure-"+refine_pass); //String title)
......@@ -4943,16 +4965,23 @@ public class QuadCLT {
clt_parameters.combine_min_vert, // final double minStrengthVert,
false, // final boolean use_last, //
// TODO: when useCombo - pay attention to borders (disregard)
false); // final boolean usePoly) // use polynomial method to find max), valid if useCombo == false
false, // final boolean usePoly) // use polynomial method to find max), valid if useCombo == false
true); // final boolean copyDebug)
tp.clt_3d_passes.add(combo_pass);
// refine_pass = tp.clt_3d_passes.size();
// }
tp.showScan(
if (show_expand) tp.showScan(
tp.clt_3d_passes.get(refine_pass), // CLTPass3d scan,
"after_combo_pass-"+(tp.clt_3d_passes.size()-1)); //String title)
}
// TEMPORARY EXIT
if (tp.clt_3d_passes.size() > 0) return null; // just to fool compiler
refine_pass = tp.clt_3d_passes.size(); // 1
// Refine after extension
......@@ -5561,6 +5590,10 @@ public class QuadCLT {
scan_rslt.tile_op = tile_op;
scan_rslt.disparity_map = disparity_map;
scan_rslt.texture_tiles = texture_tiles;
scan_rslt.is_measured = true;
scan_rslt.is_combo = false;
scan_rslt.resetProcessed();
return scan_rslt;
}
......@@ -5646,6 +5679,9 @@ public class QuadCLT {
scan.disparity_map = disparity_map;
scan.texture_tiles = texture_tiles;
scan.is_measured = true;
scan.is_combo = false;
scan.resetProcessed();
return scan;
}
......
This diff is collapsed.
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