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
ada2ac85
Commit
ada2ac85
authored
May 17, 2017
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testing/debugging diagonal swapping
parent
5d6289e3
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
487 additions
and
483 deletions
+487
-483
Conflict.java
src/main/java/Conflict.java
+205
-147
Conflicts.java
src/main/java/Conflicts.java
+5
-12
SuperTiles.java
src/main/java/SuperTiles.java
+262
-280
TileProcessor.java
src/main/java/TileProcessor.java
+15
-44
No files found.
src/main/java/Conflict.java
View file @
ada2ac85
This diff is collapsed.
Click to expand it.
src/main/java/Conflicts.java
View file @
ada2ac85
...
@@ -96,7 +96,7 @@ public class Conflicts {
...
@@ -96,7 +96,7 @@ public class Conflicts {
{
{
for
(
int
nsTile
=
0
;
nsTile
<
conflicts
.
length
;
nsTile
++)
if
(
conflicts
[
nsTile
]
!=
null
){
for
(
int
nsTile
=
0
;
nsTile
<
conflicts
.
length
;
nsTile
++)
if
(
conflicts
[
nsTile
]
!=
null
){
for
(
int
nc
=
0
;
nc
<
conflicts
[
nsTile
].
length
;
nc
++){
for
(
int
nc
=
0
;
nc
<
conflicts
[
nsTile
].
length
;
nc
++){
Conflict
conf
=
new
Conflict
(
conflicts
[
nsTile
][
nc
]);
Conflict
conf
=
new
Conflict
(
nsTile
,
conflicts
[
nsTile
][
nc
]);
if
(
conf
.
getNumOrthoDiagOrthoConflicts
()
>
0
)
num_ortho_diag_ortho
[
conf
.
getNumOrthoDiagOrthoConflicts
()
-
1
]++;
if
(
conf
.
getNumOrthoDiagOrthoConflicts
()
>
0
)
num_ortho_diag_ortho
[
conf
.
getNumOrthoDiagOrthoConflicts
()
-
1
]++;
if
(
conf
.
getNumOrthoOrthoDiagConflicts
()
>
0
)
num_ortho_ortho_diag
[
conf
.
getNumOrthoOrthoDiagConflicts
()
-
1
]++;
if
(
conf
.
getNumOrthoOrthoDiagConflicts
()
>
0
)
num_ortho_ortho_diag
[
conf
.
getNumOrthoOrthoDiagConflicts
()
-
1
]++;
if
(
conf
.
getNumConflicts
()
>
0
)
num_all_conflicts
[
conf
.
getNumConflicts
()
-
1
]++;
if
(
conf
.
getNumConflicts
()
>
0
)
num_all_conflicts
[
conf
.
getNumConflicts
()
-
1
]++;
...
@@ -153,14 +153,7 @@ public class Conflicts {
...
@@ -153,14 +153,7 @@ public class Conflicts {
public
void
printConflict
(
String
prefix
,
Conflict
conf
)
public
void
printConflict
(
String
prefix
,
Conflict
conf
)
{
{
System
.
out
.
println
(
prefix
+
System
.
out
.
println
(
prefix
+
conf
.
toString
());
" nl1 = "
+
conf
.
getStartLayer
()+
" nl2 = "
+
conf
.
getEndLayer
()+
" all = "
+
conf
.
getNumConflicts
()
+
" ("
+
String
.
format
(
"%06x"
,
conf
.
getDirBits
())+
")"
+
" odo = "
+
conf
.
getNumOrthoDiagOrthoConflicts
()
+
" ood = "
+
conf
.
getNumOrthoOrthoDiagConflicts
()
+
" number of odo incompatible triangles = "
+
conf
.
getIncompatibleOrthoDiagOrthoConflicts
()
+
" number of odo dual triangles = "
+
conf
.
getDualTriOrthoDiagOrthoConflicts
());
}
}
public
int
numBetterWorse
(
public
int
numBetterWorse
(
...
@@ -309,7 +302,7 @@ public class Conflicts {
...
@@ -309,7 +302,7 @@ public class Conflicts {
int
dir2
=
(
dir1
+
3
)
%
8
;
int
dir2
=
(
dir1
+
3
)
%
8
;
int
np3
=
neibs2
[
dir2
];
// planes[nsTile2][np2].getNeibBest(dir2);
int
np3
=
neibs2
[
dir2
];
// planes[nsTile2][np2].getNeibBest(dir2);
if
((
np3
>=
0
)
&&
(
np3
!=
np0
)){
if
((
np3
>=
0
)
&&
(
np3
!=
np0
)){
Conflict
conflict
=
new
Conflict
(
np0
,
np3
,
dir
/
2
);
Conflict
conflict
=
new
Conflict
(
n
sTile0
,
n
p0
,
np3
,
dir
/
2
);
label_apply:
label_apply:
{
{
for
(
Conflict
conf_old:
conflicts_list
){
for
(
Conflict
conf_old:
conflicts_list
){
...
@@ -335,7 +328,7 @@ public class Conflicts {
...
@@ -335,7 +328,7 @@ public class Conflicts {
int
dir2
=
(
dir1
+
3
)
%
8
;
int
dir2
=
(
dir1
+
3
)
%
8
;
int
np3
=
neibs2
[
dir2
];
// planes[nsTile2][np2].getNeibBest(dir2);
int
np3
=
neibs2
[
dir2
];
// planes[nsTile2][np2].getNeibBest(dir2);
if
((
np3
>=
0
)
&&
(
np3
!=
np0
)){
if
((
np3
>=
0
)
&&
(
np3
!=
np0
)){
Conflict
conflict
=
new
Conflict
(
np0
,
np3
,
dir
/
2
,
true
);
// ood, right
Conflict
conflict
=
new
Conflict
(
n
sTile0
,
n
p0
,
np3
,
dir
/
2
,
true
);
// ood, right
label_apply:
label_apply:
{
{
for
(
Conflict
conf_old:
conflicts_list
){
for
(
Conflict
conf_old:
conflicts_list
){
...
@@ -361,7 +354,7 @@ public class Conflicts {
...
@@ -361,7 +354,7 @@ public class Conflicts {
int
dir2
=
(
dir1
+
5
)
%
8
;
int
dir2
=
(
dir1
+
5
)
%
8
;
int
np3
=
neibs2
[
dir2
];
// planes[nsTile2][np2].getNeibBest(dir2);
int
np3
=
neibs2
[
dir2
];
// planes[nsTile2][np2].getNeibBest(dir2);
if
((
np3
>=
0
)
&&
(
np3
!=
np0
)){
if
((
np3
>=
0
)
&&
(
np3
!=
np0
)){
Conflict
conflict
=
new
Conflict
(
n
p0
,
np3
,
dir
/
2
,
true
);
// ood, righ
t
Conflict
conflict
=
new
Conflict
(
n
sTile0
,
np0
,
np3
,
dir
/
2
,
false
);
// ood, lef
t
label_apply:
label_apply:
{
{
for
(
Conflict
conf_old:
conflicts_list
){
for
(
Conflict
conf_old:
conflicts_list
){
...
...
src/main/java/SuperTiles.java
View file @
ada2ac85
This diff is collapsed.
Click to expand it.
src/main/java/TileProcessor.java
View file @
ada2ac85
...
@@ -3477,7 +3477,6 @@ public class TileProcessor {
...
@@ -3477,7 +3477,6 @@ public class TileProcessor {
int
[]
conflict_resoultion_results
=
st
.
resolveMultiTriangularConflicts
(
int
[]
conflict_resoultion_results
=
st
.
resolveMultiTriangularConflicts
(
conflicts0
,
// int [][][] conflicts,
conflicts0
,
// int [][][] conflicts,
conflicts0_stats
,
conflicts0_stats
,
clt_parameters
.
plMaxEigen
,
clt_parameters
.
plStarOrtho
,
// double orthoWeight,
clt_parameters
.
plStarOrtho
,
// double orthoWeight,
clt_parameters
.
plStarDiag
,
// double diagonalWeight,
clt_parameters
.
plStarDiag
,
// double diagonalWeight,
clt_parameters
.
plDblTriLoss
,
// double diagonalWeight,
clt_parameters
.
plDblTriLoss
,
// double diagonalWeight,
...
@@ -3486,56 +3485,30 @@ public class TileProcessor {
...
@@ -3486,56 +3485,30 @@ public class TileProcessor {
clt_parameters
.
tileX
,
clt_parameters
.
tileX
,
clt_parameters
.
tileY
);
clt_parameters
.
tileY
);
System
.
out
.
println
(
"Pass "
+(
pass
+
1
)+
": multi_tri_results (success/failures) = "
+
conflict_resoultion_results
[
0
]+
" / "
+
conflict_resoultion_results
[
1
]);
System
.
out
.
println
(
"Pass "
+(
pass
+
1
)+
": multi_tri_results (success/failures) = "
+
conflict_resoultion_results
[
0
]+
" / "
+
conflict_resoultion_results
[
1
]);
if
((
dual_tri_results
[
0
]
==
0
)
&&(
conflict_resoultion_results
[
0
]
==
0
))
break
;
}
int
[]
diagonal_resoultion_results
=
st
.
resolveDiagonalTriangularConflicts
(
/*
int [] conflicts1_stats = st.getNumConflicts(
conflicts0,
1); // -1); // debugLevel);
st.printConflictSummary(conflicts1_stats);
*/
Conflicts
conflicts1_stats
=
new
Conflicts
(
conflicts0
,
st
,
-
1
);
// debugLevel);
conflicts1_stats
.
printConflictSummary
(
"Detected conflicts (all):"
,
true
,
false
,
false
);
conflicts1_stats
.
printConflictSummary
(
"Detected conflicts (ortho-diag-ortho):"
,
false
,
true
,
false
);
conflicts1_stats
.
printConflictSummary
(
"Detected conflicts(ortho-ortho-diag):"
,
false
,
false
,
true
);
/*
for (int pass = 0; pass < 10; pass ++) {
int [] dual_tri_results = st. resolveDualTriangularConflicts(
conflicts0
,
// int [][][] conflicts,
conflicts0
,
// int [][][] conflicts,
conflicts0_stats
,
conflicts0_stats
,
clt_parameters.plMaxEigen,
clt_parameters
.
plStarOrtho
,
// double orthoWeight,
clt_parameters.plStarOrtho, // double orthoWeight,
clt_parameters
.
plStarDiag
,
// double diagonalWeight,
clt_parameters.plStarDiag, // double diagonalWeight,
clt_parameters
.
plDblTriLoss
,
// double diagonalWeight,
clt_parameters
.
plDblTriLoss
,
// double diagonalWeight,
clt_parameters
.
plPreferDisparity
,
clt_parameters
.
plPreferDisparity
,
1
,
// final int debugLevel)
1
,
// final int debugLevel)
clt_parameters
.
tileX
,
clt_parameters
.
tileX
,
clt_parameters
.
tileY
);
clt_parameters
.
tileY
);
System.out.println("Pass "+(pass+1)+": dual_tri_results (success/failures) = "+dual_tri_results[0]+" / "+dual_tri_results[1]);
System
.
out
.
println
(
"Pass "
+(
pass
+
1
)+
": resolveDiagonalTriangularConflicts (success/failures) = "
+
diagonal_resoultion_results
[
0
]+
" / "
+
diagonal_resoultion_results
[
1
]);
if (dual_tri_results[0] == 0) break;
if
(
(
dual_tri_results
[
0
]
==
0
)
&&
(
conflict_resoultion_results
[
0
]
==
0
)
&&
(
diagonal_resoultion_results
[
0
]
==
0
))
break
;
}
}
Conflicts
conflicts1_stats
=
new
Conflicts
(
conflicts1_stats = st.getNumConflicts(
conflicts0
,
conflicts0
,
1); // -1); // debugLevel);
st
,
st.printConflictSummary(conflicts1_stats);
1
);
// -1); // debugLevel);
*/
conflicts1_stats
.
printConflictSummary
(
"Detected conflicts (all):"
,
true
,
false
,
false
);
conflicts1_stats
.
printConflictSummary
(
"Detected conflicts (ortho-diag-ortho):"
,
false
,
true
,
false
);
/*
conflicts1_stats
.
printConflictSummary
(
"Detected conflicts(ortho-ortho-diag):"
,
false
,
false
,
true
);
// re-checking conflicts (make sure update is correct)
int [][][] conflicts1r = st.detectTriangularConflicts(
1); // final int debugLevel)
int [] conflicts1r_stats = st.getNumConflicts(
conflicts1r,
-1); // debugLevel);
st.printConflictSummary(conflicts1r_stats);
*/
st
.
testResoveTriangle
(
st
.
testResoveTriangle
(
clt_parameters
.
plWorstWorsening
,
// final double worst_worsening,
clt_parameters
.
plWorstWorsening
,
// final double worst_worsening,
...
@@ -3549,8 +3522,6 @@ public class TileProcessor {
...
@@ -3549,8 +3522,6 @@ public class TileProcessor {
1
,
// final int debugLevel)
1
,
// final int debugLevel)
clt_parameters
.
tileX
,
clt_parameters
.
tileX
,
clt_parameters
.
tileY
);
clt_parameters
.
tileY
);
if
(
clt_parameters
.
plSplitApply
)
{
if
(
clt_parameters
.
plSplitApply
)
{
while
(
true
)
{
while
(
true
)
{
...
...
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