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
3a9193c3
Commit
3a9193c3
authored
May 26, 2017
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tested refactoring
parent
3ead1b3d
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
702 additions
and
94 deletions
+702
-94
LinkPlanes.java
src/main/java/LinkPlanes.java
+613
-11
SuperTiles.java
src/main/java/SuperTiles.java
+0
-12
TileProcessor.java
src/main/java/TileProcessor.java
+89
-71
No files found.
src/main/java/LinkPlanes.java
View file @
3a9193c3
This diff is collapsed.
Click to expand it.
src/main/java/SuperTiles.java
View file @
3a9193c3
...
@@ -6835,23 +6835,11 @@ public class SuperTiles{
...
@@ -6835,23 +6835,11 @@ public class SuperTiles{
/**
/**
* Find mutual links between multi-layer planes for supertiles. requires that for each plane there are calculated smalles eigenvalues
* Find mutual links between multi-layer planes for supertiles. requires that for each plane there are calculated smalles eigenvalues
* for merging with each plane for each of 8 neighbors
* for merging with each plane for each of 8 neighbors
* @param rquality maximal degradation by merging (does not depend on the total weight)
* @param okMergeEigen if result eigenvalue of the merged planes is below, OK to bypass worst worsening
* @param maxWorldSin2 maximal square of the sine of the angle between the planes to allow merge (>= 1.0 - disable)
* @param maxEigen maximal eigenvalue of each of the merged planes
* @param minWeight minimal weight of each of the planes
* @param debugLevel debug level
* @param debugLevel debug level
* @param dbg_X debug supertile X coordinate
* @param dbg_X debug supertile X coordinate
* @param dbg_Y debug supertile Y coordinate
* @param dbg_Y debug supertile Y coordinate
*/
*/
public
void
selectNeighborPlanesMutual
(
public
void
selectNeighborPlanesMutual
(
// final double rquality,
// final double weakWorsening,
// final double okMergeEigen,
// final double maxWorldSin2,
// final double dispNorm,
// final double maxEigen, // maximal eigenvalue of planes to consider
// final double minWeight, // minimal pain weight to consider
final
double
eigenFloor
,
// Add to eigenvalues of each participating plane and result to validate connections
final
double
eigenFloor
,
// Add to eigenvalues of each participating plane and result to validate connections
final
int
debugLevel
,
final
int
debugLevel
,
final
int
dbg_X
,
final
int
dbg_X
,
...
...
src/main/java/TileProcessor.java
View file @
3a9193c3
...
@@ -3343,7 +3343,7 @@ public class TileProcessor {
...
@@ -3343,7 +3343,7 @@ public class TileProcessor {
// moved here
// moved here
if
(
clt_parameters
.
dbg_migrate
)
{
//
if (clt_parameters.dbg_migrate) {
// separate each supertile data into clusters, trying both horizontal and perpendicular to view planes
// separate each supertile data into clusters, trying both horizontal and perpendicular to view planes
double
[]
world_hor
=
{
0.0
,
1.0
,
0.0
};
double
[]
world_hor
=
{
0.0
,
1.0
,
0.0
};
st
.
processPlanes5
(
st
.
processPlanes5
(
...
@@ -3380,7 +3380,7 @@ public class TileProcessor {
...
@@ -3380,7 +3380,7 @@ public class TileProcessor {
0
,
// -1, // debugLevel, // final int debugLevel)
0
,
// -1, // debugLevel, // final int debugLevel)
clt_parameters
.
tileX
,
clt_parameters
.
tileX
,
clt_parameters
.
tileY
);
clt_parameters
.
tileY
);
}
else
{
/*
} else {
st.processPlanes4(
st.processPlanes4(
clt_parameters.stMeasSel, // = 1 //Select measurements for supertiles : +1 - combo, +2 - quad +4 - hor +8 - vert
clt_parameters.stMeasSel, // = 1 //Select measurements for supertiles : +1 - combo, +2 - quad +4 - hor +8 - vert
clt_parameters.plDispNorm, // = 2.0; // Normalize disparities to the average if above
clt_parameters.plDispNorm, // = 2.0; // Normalize disparities to the average if above
...
@@ -3406,10 +3406,44 @@ public class TileProcessor {
...
@@ -3406,10 +3406,44 @@ public class TileProcessor {
clt_parameters.tileX,
clt_parameters.tileX,
clt_parameters.tileY);
clt_parameters.tileY);
}
}
*/
showDoubleFloatArrays
sdfa_instance
=
null
;
showDoubleFloatArrays
sdfa_instance
=
null
;
if
(
debugLevel
>
-
1
)
sdfa_instance
=
new
showDoubleFloatArrays
();
// just for debugging?
if
(
debugLevel
>
-
1
)
sdfa_instance
=
new
showDoubleFloatArrays
();
// just for debugging?
if
(
clt_parameters
.
dbg_migrate
)
{
// Trying new class
LinkPlanes
lp
=
new
LinkPlanes
(
clt_parameters
,
st
);
lp
.
matchPlanes
(
st
.
planes
,
// final TilePlanes.PlaneData [][] planes,
2
,
// -1, // debugLevel, // final int debugLevel)
clt_parameters
.
tileX
,
clt_parameters
.
tileY
);
lp
.
filterNeighborPlanes
(
st
.
planes
,
// final TilePlanes.PlaneData [][] planes,
2
,
// -1, // debugLevel, // final int debugLevel)
clt_parameters
.
tileX
,
clt_parameters
.
tileY
);
int
[][][]
merge_candidates
=
lp
.
getMergeSameTileCandidates
(
st
.
planes
,
// final TilePlanes.PlaneData [][] planes,
2
,
// -1, // debugLevel, // final int debugLevel)
clt_parameters
.
tileX
,
clt_parameters
.
tileY
);
boolean
[][]
pairs_to_merge
=
lp
.
mergeSameTileEvaluate
(
st
.
planes
,
// final TilePlanes.PlaneData [][] planes,
merge_candidates
,
// final int [][][] merge_candidates,
2
,
// -1, // debugLevel, // final int debugLevel)
clt_parameters
.
tileX
,
clt_parameters
.
tileY
);
System
.
out
.
println
(
pairs_to_merge
.
length
);
lp
.
selectNeighborPlanesMutual
(
st
.
planes
,
// final TilePlanes.PlaneData [][] planes,
0
,
// final int debugLevel)
clt_parameters
.
tileX
,
clt_parameters
.
tileY
);
}
else
{
st
.
matchPlanes
(
st
.
matchPlanes
(
clt_parameters
.
plPreferDisparity
,
clt_parameters
.
plPreferDisparity
,
0
,
// debugLevel
0
,
// debugLevel
...
@@ -3431,7 +3465,6 @@ public class TileProcessor {
...
@@ -3431,7 +3465,6 @@ public class TileProcessor {
0
,
// final int debugLevel)
0
,
// final int debugLevel)
clt_parameters
.
tileX
,
clt_parameters
.
tileX
,
clt_parameters
.
tileY
);
clt_parameters
.
tileY
);
/* */
int
[][][]
merge_candidates
=
st
.
getMergeSameTileCandidates
(
int
[][][]
merge_candidates
=
st
.
getMergeSameTileCandidates
(
2
,
// final int debugLevel,
2
,
// final int debugLevel,
...
@@ -3456,28 +3489,12 @@ public class TileProcessor {
...
@@ -3456,28 +3489,12 @@ public class TileProcessor {
clt_parameters
.
tileX
,
clt_parameters
.
tileX
,
clt_parameters
.
tileY
);
clt_parameters
.
tileY
);
st
.
selectNeighborPlanesMutual
(
st
.
selectNeighborPlanesMutual
(
clt_parameters
.
plEigenFloor
,
// final double eigenFloor, // Add to eigenvalues of each participating plane and result to validate connections
clt_parameters
.
plEigenFloor
,
// final double eigenFloor, // Add to eigenvalues of each participating plane and result to validate connections
0
,
// final int debugLevel)
0
,
// final int debugLevel)
clt_parameters
.
tileX
,
clt_parameters
.
tileX
,
clt_parameters
.
tileY
);
clt_parameters
.
tileY
);
/*
}
st.selectNeighborPlanesMutual_old(
clt_parameters.plWorstWorsening, // final double worst_worsening,
clt_parameters.plWeakWorsening, // final double worst_worsening,
clt_parameters.plOKMergeEigen, // final double okMergeEigen,
clt_parameters.plMaxWorldSin2, // final double maxWorldSin2,
clt_parameters.plDispNorm,
clt_parameters.plMaxEigen,
clt_parameters.plEigenFloor, // final double eigenFloor, // Add to eigenvalues of each participating plane and result to validate connections
clt_parameters.plMinStrength,
0, // final int debugLevel)
clt_parameters.tileX,
clt_parameters.tileY);
*/
st
.
resolveConflicts
(
st
.
resolveConflicts
(
clt_parameters
.
plMaxEigen
,
clt_parameters
.
plMaxEigen
,
clt_parameters
.
plConflDualTri
,
// boolean conflDualTri, // Resolve dual triangles conflict (odoodo)
clt_parameters
.
plConflDualTri
,
// boolean conflDualTri, // Resolve dual triangles conflict (odoodo)
...
@@ -3580,7 +3597,8 @@ public class TileProcessor {
...
@@ -3580,7 +3597,8 @@ public class TileProcessor {
clt_parameters
.
plMaxOutliers
,
// final int maxOutliers, // = 20; // Maximal number of outliers to remove
clt_parameters
.
plMaxOutliers
,
// final int maxOutliers, // = 20; // Maximal number of outliers to remove
clt_parameters
.
stFloor
,
// final double strength_floor,
clt_parameters
.
stFloor
,
// final double strength_floor,
clt_parameters
.
stPow
,
// final double strength_pow,
clt_parameters
.
stPow
,
// final double strength_pow,
clt_parameters
.
dbg_migrate
&&
clt_parameters
.
stSmplMode
,
// final boolean smplMode, // = true; // Use sample mode (false - regular tile mode)
// clt_parameters.dbg_migrate && clt_parameters.stSmplMode , // final boolean smplMode, // = true; // Use sample mode (false - regular tile mode)
clt_parameters
.
stSmplMode
,
// final boolean smplMode, // = true; // Use sample mode (false - regular tile mode)
clt_parameters
.
stSmplSide
,
// final int smplSide, // = 2; // Sample size (side of a square)
clt_parameters
.
stSmplSide
,
// final int smplSide, // = 2; // Sample size (side of a square)
clt_parameters
.
stSmplNum
,
// final int smplNum, // = 3; // Number after removing worst
clt_parameters
.
stSmplNum
,
// final int smplNum, // = 3; // Number after removing worst
clt_parameters
.
stSmplRms
,
// final double smplRms, // = 0.1; // Maximal RMS of the remaining tiles in a sample
clt_parameters
.
stSmplRms
,
// final double smplRms, // = 0.1; // Maximal RMS of the remaining tiles in a sample
...
...
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