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
18261553
Commit
18261553
authored
May 20, 2017
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trying another way to resolve conflicts/ improve supertile connections
parent
1ca1c6d0
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
812 additions
and
109 deletions
+812
-109
ConnectionCosts.java
src/main/java/ConnectionCosts.java
+3
-4
EyesisCorrectionParameters.java
src/main/java/EyesisCorrectionParameters.java
+22
-1
SuperTiles.java
src/main/java/SuperTiles.java
+412
-99
TileProcessor.java
src/main/java/TileProcessor.java
+13
-5
TwoLayerNeighbors.java
src/main/java/TwoLayerNeighbors.java
+362
-0
No files found.
src/main/java/ConnectionCosts.java
View file @
18261553
import
java.awt.Point
;
import
java.util.HashMap
;
import
java.util.HashSet
;
/**
/**
**
**
** ConnectionCosts - calculate and incrementally update cost of supertile connections
** ConnectionCosts - calculate and incrementally update cost of supertile connections
...
@@ -25,6 +21,9 @@ import java.util.HashSet;
...
@@ -25,6 +21,9 @@ import java.util.HashSet;
** -----------------------------------------------------------------------------**
** -----------------------------------------------------------------------------**
**
**
*/
*/
import
java.awt.Point
;
import
java.util.HashMap
;
import
java.util.HashSet
;
public
class
ConnectionCosts
{
public
class
ConnectionCosts
{
TilePlanes
.
PlaneData
[][]
planes
=
null
;
TilePlanes
.
PlaneData
[][]
planes
=
null
;
...
...
src/main/java/EyesisCorrectionParameters.java
View file @
18261553
...
@@ -2175,7 +2175,12 @@ public class EyesisCorrectionParameters {
...
@@ -2175,7 +2175,12 @@ public class EyesisCorrectionParameters {
public
double
plMaxWorldSin2
=
0.1
;
// Maximal sine squared of the world angle between planes to merge. Set to >= 1.0 to disable
public
double
plMaxWorldSin2
=
0.1
;
// Maximal sine squared of the world angle between planes to merge. Set to >= 1.0 to disable
public
double
plWeakWorsening
=
1.0
;
// Relax merge requirements for weaker planes
public
double
plWeakWorsening
=
1.0
;
// Relax merge requirements for weaker planes
public
int
plStarSteps
=
1
;
// How far to look around when calculationg connection cost
public
boolean
plConflDualTri
=
false
;
// Resolve dual triangles conflict (odoodo)
public
boolean
plConflMulti
=
false
;
// Resolve multiple odo triangles conflicts
public
boolean
plConflDiag
=
false
;
// Resolve diagonal (ood) conflicts
public
boolean
plConflStar
=
true
;
// Resolve all conflicts around a supertile
public
int
plStarSteps
=
2
;
// How far to look around when calculationg connection cost
public
double
plStarOrtho
=
0.5
;
// When calculating cost for the connections scale 4 ortho neighbors
public
double
plStarOrtho
=
0.5
;
// When calculating cost for the connections scale 4 ortho neighbors
public
double
plStarDiag
=
0.25
;
// When calculating cost for the connections scale 4 diagonal neighbors
public
double
plStarDiag
=
0.25
;
// When calculating cost for the connections scale 4 diagonal neighbors
public
double
plStarPwr
=
0.5
;
// Divide cost by number of connections to this power
public
double
plStarPwr
=
0.5
;
// Divide cost by number of connections to this power
...
@@ -2529,6 +2534,10 @@ public class EyesisCorrectionParameters {
...
@@ -2529,6 +2534,10 @@ public class EyesisCorrectionParameters {
properties
.
setProperty
(
prefix
+
"plMaxWorldSin2"
,
this
.
plMaxWorldSin2
+
""
);
properties
.
setProperty
(
prefix
+
"plMaxWorldSin2"
,
this
.
plMaxWorldSin2
+
""
);
properties
.
setProperty
(
prefix
+
"plWeakWorsening"
,
this
.
plWeakWorsening
+
""
);
properties
.
setProperty
(
prefix
+
"plWeakWorsening"
,
this
.
plWeakWorsening
+
""
);
properties
.
setProperty
(
prefix
+
"plConflDualTri"
,
this
.
plConflDualTri
+
""
);
properties
.
setProperty
(
prefix
+
"plConflMulti"
,
this
.
plConflMulti
+
""
);
properties
.
setProperty
(
prefix
+
"plConflDiag"
,
this
.
plConflDiag
+
""
);
properties
.
setProperty
(
prefix
+
"plConflStar"
,
this
.
plConflStar
+
""
);
properties
.
setProperty
(
prefix
+
"plStarSteps"
,
this
.
plStarSteps
+
""
);
properties
.
setProperty
(
prefix
+
"plStarSteps"
,
this
.
plStarSteps
+
""
);
properties
.
setProperty
(
prefix
+
"plStarOrtho"
,
this
.
plStarOrtho
+
""
);
properties
.
setProperty
(
prefix
+
"plStarOrtho"
,
this
.
plStarOrtho
+
""
);
properties
.
setProperty
(
prefix
+
"plStarDiag"
,
this
.
plStarDiag
+
""
);
properties
.
setProperty
(
prefix
+
"plStarDiag"
,
this
.
plStarDiag
+
""
);
...
@@ -2863,6 +2872,10 @@ public class EyesisCorrectionParameters {
...
@@ -2863,6 +2872,10 @@ public class EyesisCorrectionParameters {
if
(
properties
.
getProperty
(
prefix
+
"plMaxWorldSin2"
)!=
null
)
this
.
plMaxWorldSin2
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"plMaxWorldSin2"
));
if
(
properties
.
getProperty
(
prefix
+
"plMaxWorldSin2"
)!=
null
)
this
.
plMaxWorldSin2
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"plMaxWorldSin2"
));
if
(
properties
.
getProperty
(
prefix
+
"plWeakWorsening"
)!=
null
)
this
.
plWeakWorsening
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"plWeakWorsening"
));
if
(
properties
.
getProperty
(
prefix
+
"plWeakWorsening"
)!=
null
)
this
.
plWeakWorsening
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"plWeakWorsening"
));
if
(
properties
.
getProperty
(
prefix
+
"plConflDualTri"
)!=
null
)
this
.
plConflDualTri
=
Boolean
.
parseBoolean
(
properties
.
getProperty
(
prefix
+
"plConflDualTri"
));
if
(
properties
.
getProperty
(
prefix
+
"plConflMulti"
)!=
null
)
this
.
plConflMulti
=
Boolean
.
parseBoolean
(
properties
.
getProperty
(
prefix
+
"plConflMulti"
));
if
(
properties
.
getProperty
(
prefix
+
"plConflDiag"
)!=
null
)
this
.
plConflDiag
=
Boolean
.
parseBoolean
(
properties
.
getProperty
(
prefix
+
"plConflDiag"
));
if
(
properties
.
getProperty
(
prefix
+
"plConflStar"
)!=
null
)
this
.
plConflStar
=
Boolean
.
parseBoolean
(
properties
.
getProperty
(
prefix
+
"plConflStar"
));
if
(
properties
.
getProperty
(
prefix
+
"plStarSteps"
)!=
null
)
this
.
plStarSteps
=
Integer
.
parseInt
(
properties
.
getProperty
(
prefix
+
"plStarSteps"
));
if
(
properties
.
getProperty
(
prefix
+
"plStarSteps"
)!=
null
)
this
.
plStarSteps
=
Integer
.
parseInt
(
properties
.
getProperty
(
prefix
+
"plStarSteps"
));
if
(
properties
.
getProperty
(
prefix
+
"plStarOrtho"
)!=
null
)
this
.
plStarOrtho
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"plStarOrtho"
));
if
(
properties
.
getProperty
(
prefix
+
"plStarOrtho"
)!=
null
)
this
.
plStarOrtho
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"plStarOrtho"
));
if
(
properties
.
getProperty
(
prefix
+
"plStarDiag"
)!=
null
)
this
.
plStarDiag
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"plStarDiag"
));
if
(
properties
.
getProperty
(
prefix
+
"plStarDiag"
)!=
null
)
this
.
plStarDiag
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"plStarDiag"
));
...
@@ -3225,6 +3238,10 @@ public class EyesisCorrectionParameters {
...
@@ -3225,6 +3238,10 @@ public class EyesisCorrectionParameters {
gd
.
addNumericField
(
"Maximal sine squared of the world angle between planes to merge. Set to >= 1.0 to disable"
,
this
.
plMaxWorldSin2
,
6
);
gd
.
addNumericField
(
"Maximal sine squared of the world angle between planes to merge. Set to >= 1.0 to disable"
,
this
.
plMaxWorldSin2
,
6
);
gd
.
addNumericField
(
"Relax merge requirements for weaker planes"
,
this
.
plWeakWorsening
,
6
);
gd
.
addNumericField
(
"Relax merge requirements for weaker planes"
,
this
.
plWeakWorsening
,
6
);
gd
.
addCheckbox
(
"Resolve dual triangles conflict (odoodo)"
,
this
.
plConflDualTri
);
gd
.
addCheckbox
(
"Resolve multiple odo triangles conflicts"
,
this
.
plConflMulti
);
gd
.
addCheckbox
(
"Resolve diagonal (ood) conflicts"
,
this
.
plConflDiag
);
gd
.
addCheckbox
(
"Resolve all conflicts around a supertile"
,
this
.
plConflStar
);
gd
.
addNumericField
(
"How far to look around when calculationg connection cost"
,
this
.
plStarSteps
,
0
);
gd
.
addNumericField
(
"How far to look around when calculationg connection cost"
,
this
.
plStarSteps
,
0
);
gd
.
addNumericField
(
"When calculating cost for the connections scale 4 ortho neighbors"
,
this
.
plStarOrtho
,
6
);
gd
.
addNumericField
(
"When calculating cost for the connections scale 4 ortho neighbors"
,
this
.
plStarOrtho
,
6
);
gd
.
addNumericField
(
"When calculating cost for the connections scale 4 diagonal neighbors"
,
this
.
plStarDiag
,
6
);
gd
.
addNumericField
(
"When calculating cost for the connections scale 4 diagonal neighbors"
,
this
.
plStarDiag
,
6
);
...
@@ -3572,6 +3589,10 @@ public class EyesisCorrectionParameters {
...
@@ -3572,6 +3589,10 @@ public class EyesisCorrectionParameters {
this
.
plMaxWorldSin2
=
gd
.
getNextNumber
();
this
.
plMaxWorldSin2
=
gd
.
getNextNumber
();
this
.
plWeakWorsening
=
gd
.
getNextNumber
();
this
.
plWeakWorsening
=
gd
.
getNextNumber
();
this
.
plConflDualTri
=
gd
.
getNextBoolean
();
this
.
plConflMulti
=
gd
.
getNextBoolean
();
this
.
plConflDiag
=
gd
.
getNextBoolean
();
this
.
plConflStar
=
gd
.
getNextBoolean
();
this
.
plStarSteps
=
(
int
)
gd
.
getNextNumber
();
this
.
plStarSteps
=
(
int
)
gd
.
getNextNumber
();
this
.
plStarOrtho
=
gd
.
getNextNumber
();
this
.
plStarOrtho
=
gd
.
getNextNumber
();
this
.
plStarDiag
=
gd
.
getNextNumber
();
this
.
plStarDiag
=
gd
.
getNextNumber
();
...
...
src/main/java/SuperTiles.java
View file @
18261553
This diff is collapsed.
Click to expand it.
src/main/java/TileProcessor.java
View file @
18261553
...
@@ -3431,6 +3431,10 @@ public class TileProcessor {
...
@@ -3431,6 +3431,10 @@ public class TileProcessor {
st
.
resolveConflicts
(
st
.
resolveConflicts
(
clt_parameters
.
plMaxEigen
,
clt_parameters
.
plMaxEigen
,
clt_parameters
.
plConflDualTri
,
// boolean conflDualTri, // Resolve dual triangles conflict (odoodo)
clt_parameters
.
plConflMulti
,
// boolean conflMulti, // Resolve multiple odo triangles conflicts
clt_parameters
.
plConflDiag
,
// boolean conflDiag, // Resolve diagonal (ood) conflicts
clt_parameters
.
plConflStar
,
// boolean conflStar, // Resolve all conflicts around a supertile
clt_parameters
.
plStarSteps
,
// int starSteps, // How far to look around when calculationg connection cost
clt_parameters
.
plStarSteps
,
// int starSteps, // How far to look around when calculationg connection cost
clt_parameters
.
plStarOrtho
,
// double orthoWeight,
clt_parameters
.
plStarOrtho
,
// double orthoWeight,
clt_parameters
.
plStarDiag
,
// double diagonalWeight,
clt_parameters
.
plStarDiag
,
// double diagonalWeight,
...
@@ -3533,6 +3537,10 @@ public class TileProcessor {
...
@@ -3533,6 +3537,10 @@ public class TileProcessor {
st
.
resolveConflicts
(
st
.
resolveConflicts
(
clt_parameters
.
plMaxEigen
,
clt_parameters
.
plMaxEigen
,
clt_parameters
.
plConflDualTri
,
// boolean conflDualTri, // Resolve dual triangles conflict (odoodo)
clt_parameters
.
plConflMulti
,
// boolean conflMulti, // Resolve multiple odo triangles conflicts
clt_parameters
.
plConflDiag
,
// boolean conflDiag, // Resolve diagonal (ood) conflicts
clt_parameters
.
plConflStar
,
// boolean conflStar, // Resolve all conflicts around a supertile
clt_parameters
.
plStarSteps
,
// int starSteps, // How far to look around when calculationg connection cost
clt_parameters
.
plStarSteps
,
// int starSteps, // How far to look around when calculationg connection cost
clt_parameters
.
plStarOrtho
,
// double orthoWeight,
clt_parameters
.
plStarOrtho
,
// double orthoWeight,
clt_parameters
.
plStarDiag
,
// double diagonalWeight,
clt_parameters
.
plStarDiag
,
// double diagonalWeight,
...
...
src/main/java/TwoLayerNeighbors.java
0 → 100644
View file @
18261553
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