Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
imagej-elphel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Elphel
imagej-elphel
Commits
53042eb0
Commit
53042eb0
authored
Mar 27, 2017
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debugging expansion
parent
41b267b4
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1751 additions
and
93 deletions
+1751
-93
.gitignore
.gitignore
+3
-0
DisparityProcessor.java
src/main/java/DisparityProcessor.java
+1443
-0
QuadCLT.java
src/main/java/QuadCLT.java
+114
-78
TileProcessor.java
src/main/java/TileProcessor.java
+191
-15
No files found.
.gitignore
View file @
53042eb0
...
...
@@ -2,3 +2,6 @@
/.project
/.settings/
/target/
*.backup
NC393I
attic
\ No newline at end of file
src/main/java/DisparityProcessor.java
0 → 100644
View file @
53042eb0
This diff is collapsed.
Click to expand it.
src/main/java/QuadCLT.java
View file @
53042eb0
...
...
@@ -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
;
}
...
...
src/main/java/TileProcessor.java
View file @
53042eb0
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment