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
bdf3d47f
Commit
bdf3d47f
authored
Apr 16, 2017
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
splitting planes into pairs
parent
41d614cb
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
237 additions
and
2 deletions
+237
-2
EyesisCorrectionParameters.java
src/main/java/EyesisCorrectionParameters.java
+22
-2
SuperTiles.java
src/main/java/SuperTiles.java
+199
-0
TilePlanes.java
src/main/java/TilePlanes.java
+5
-0
TileProcessor.java
src/main/java/TileProcessor.java
+11
-0
No files found.
src/main/java/EyesisCorrectionParameters.java
View file @
bdf3d47f
...
@@ -2162,6 +2162,10 @@ public class EyesisCorrectionParameters {
...
@@ -2162,6 +2162,10 @@ public class EyesisCorrectionParameters {
public
int
plIterations
=
10
;
// Maximal number of smoothing iterations for each step
public
int
plIterations
=
10
;
// Maximal number of smoothing iterations for each step
public
int
plPrecision
=
6
;
// Maximal step difference (1/power of 10)
public
int
plPrecision
=
6
;
// Maximal step difference (1/power of 10)
public
double
plSplitPull
=
.
5
;
// Relative weight of center plane when splitting into pairs
public
int
plSplitMinNeib
=
2
;
// Minimal number of neighbors to split plane in pairs
public
boolean
plFuse
=
true
;
// Fuse planes together (off for debug only)
public
boolean
plFuse
=
true
;
// Fuse planes together (off for debug only)
public
boolean
plKeepOrphans
=
true
;
// Keep unconnected supertiles
public
boolean
plKeepOrphans
=
true
;
// Keep unconnected supertiles
public
double
plMinOrphan
=
2.0
;
// Minimal strength unconnected supertiles to keep
public
double
plMinOrphan
=
2.0
;
// Minimal strength unconnected supertiles to keep
...
@@ -2427,7 +2431,11 @@ public class EyesisCorrectionParameters {
...
@@ -2427,7 +2431,11 @@ public class EyesisCorrectionParameters {
properties
.
setProperty
(
prefix
+
"plPull"
,
this
.
plPull
+
""
);
properties
.
setProperty
(
prefix
+
"plPull"
,
this
.
plPull
+
""
);
properties
.
setProperty
(
prefix
+
"plIterations"
,
this
.
plIterations
+
""
);
properties
.
setProperty
(
prefix
+
"plIterations"
,
this
.
plIterations
+
""
);
properties
.
setProperty
(
prefix
+
"plPrecision"
,
this
.
plPrecision
+
""
);
properties
.
setProperty
(
prefix
+
"plPrecision"
,
this
.
plPrecision
+
""
);
properties
.
setProperty
(
prefix
+
"plFuse"
,
this
.
plFuse
+
""
);
properties
.
setProperty
(
prefix
+
"plSplitPull"
,
this
.
plSplitPull
+
""
);
properties
.
setProperty
(
prefix
+
"plSplitMinNeib"
,
this
.
plSplitMinNeib
+
""
);
properties
.
setProperty
(
prefix
+
"plFuse"
,
this
.
plFuse
+
""
);
properties
.
setProperty
(
prefix
+
"plKeepOrphans"
,
this
.
plKeepOrphans
+
""
);
properties
.
setProperty
(
prefix
+
"plKeepOrphans"
,
this
.
plKeepOrphans
+
""
);
properties
.
setProperty
(
prefix
+
"plMinOrphan"
,
this
.
plMinOrphan
+
""
);
properties
.
setProperty
(
prefix
+
"plMinOrphan"
,
this
.
plMinOrphan
+
""
);
...
@@ -2680,6 +2688,10 @@ public class EyesisCorrectionParameters {
...
@@ -2680,6 +2688,10 @@ public class EyesisCorrectionParameters {
if
(
properties
.
getProperty
(
prefix
+
"plPull"
)!=
null
)
this
.
plPull
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"plPull"
));
if
(
properties
.
getProperty
(
prefix
+
"plPull"
)!=
null
)
this
.
plPull
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"plPull"
));
if
(
properties
.
getProperty
(
prefix
+
"plIterations"
)!=
null
)
this
.
plIterations
=
Integer
.
parseInt
(
properties
.
getProperty
(
prefix
+
"plIterations"
));
if
(
properties
.
getProperty
(
prefix
+
"plIterations"
)!=
null
)
this
.
plIterations
=
Integer
.
parseInt
(
properties
.
getProperty
(
prefix
+
"plIterations"
));
if
(
properties
.
getProperty
(
prefix
+
"plPrecision"
)!=
null
)
this
.
plPrecision
=
Integer
.
parseInt
(
properties
.
getProperty
(
prefix
+
"plPrecision"
));
if
(
properties
.
getProperty
(
prefix
+
"plPrecision"
)!=
null
)
this
.
plPrecision
=
Integer
.
parseInt
(
properties
.
getProperty
(
prefix
+
"plPrecision"
));
if
(
properties
.
getProperty
(
prefix
+
"plSplitPull"
)!=
null
)
this
.
plSplitPull
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"plSplitPull"
));
if
(
properties
.
getProperty
(
prefix
+
"plSplitMinNeib"
)!=
null
)
this
.
plSplitMinNeib
=
Integer
.
parseInt
(
properties
.
getProperty
(
prefix
+
"plSplitMinNeib"
));
if
(
properties
.
getProperty
(
prefix
+
"plFuse"
)!=
null
)
this
.
plFuse
=
Boolean
.
parseBoolean
(
properties
.
getProperty
(
prefix
+
"plFuse"
));
if
(
properties
.
getProperty
(
prefix
+
"plFuse"
)!=
null
)
this
.
plFuse
=
Boolean
.
parseBoolean
(
properties
.
getProperty
(
prefix
+
"plFuse"
));
if
(
properties
.
getProperty
(
prefix
+
"plKeepOrphans"
)!=
null
)
this
.
plKeepOrphans
=
Boolean
.
parseBoolean
(
properties
.
getProperty
(
prefix
+
"plKeepOrphans"
));
if
(
properties
.
getProperty
(
prefix
+
"plKeepOrphans"
)!=
null
)
this
.
plKeepOrphans
=
Boolean
.
parseBoolean
(
properties
.
getProperty
(
prefix
+
"plKeepOrphans"
));
if
(
properties
.
getProperty
(
prefix
+
"plMinOrphan"
)!=
null
)
this
.
plMinOrphan
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"plMinOrphan"
));
if
(
properties
.
getProperty
(
prefix
+
"plMinOrphan"
)!=
null
)
this
.
plMinOrphan
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"plMinOrphan"
));
...
@@ -2689,7 +2701,7 @@ public class EyesisCorrectionParameters {
...
@@ -2689,7 +2701,7 @@ public class EyesisCorrectionParameters {
if
(
properties
.
getProperty
(
prefix
+
"plSnapNegAny"
)!=
null
)
this
.
plSnapNegAny
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"plSnapNegAny"
));
if
(
properties
.
getProperty
(
prefix
+
"plSnapNegAny"
)!=
null
)
this
.
plSnapNegAny
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"plSnapNegAny"
));
if
(
properties
.
getProperty
(
prefix
+
"plSnapDispMax"
)!=
null
)
this
.
plSnapDispMax
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"plSnapDispMax"
));
if
(
properties
.
getProperty
(
prefix
+
"plSnapDispMax"
)!=
null
)
this
.
plSnapDispMax
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"plSnapDispMax"
));
if
(
properties
.
getProperty
(
prefix
+
"plSnapDispWeight"
)!=
null
)
this
.
plSnapDispWeight
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"plSnapDispWeight"
));
if
(
properties
.
getProperty
(
prefix
+
"plSnapDispWeight"
)!=
null
)
this
.
plSnapDispWeight
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"plSnapDispWeight"
));
if
(
properties
.
getProperty
(
prefix
+
"plSnapZeroMode"
)!=
null
)
this
.
plPrecision
=
Integer
.
parseInt
(
properties
.
getProperty
(
prefix
+
"plSnapZeroMode"
));
if
(
properties
.
getProperty
(
prefix
+
"plSnapZeroMode"
)!=
null
)
this
.
plPrecision
=
Integer
.
parseInt
(
properties
.
getProperty
(
prefix
+
"plSnapZeroMode"
));
if
(
properties
.
getProperty
(
prefix
+
"show_ortho_combine"
)!=
null
)
this
.
show_ortho_combine
=
Boolean
.
parseBoolean
(
properties
.
getProperty
(
prefix
+
"show_ortho_combine"
));
if
(
properties
.
getProperty
(
prefix
+
"show_ortho_combine"
)!=
null
)
this
.
show_ortho_combine
=
Boolean
.
parseBoolean
(
properties
.
getProperty
(
prefix
+
"show_ortho_combine"
));
if
(
properties
.
getProperty
(
prefix
+
"show_refine_supertiles"
)!=
null
)
this
.
show_refine_supertiles
=
Boolean
.
parseBoolean
(
properties
.
getProperty
(
prefix
+
"show_refine_supertiles"
));
if
(
properties
.
getProperty
(
prefix
+
"show_refine_supertiles"
)!=
null
)
this
.
show_refine_supertiles
=
Boolean
.
parseBoolean
(
properties
.
getProperty
(
prefix
+
"show_refine_supertiles"
));
...
@@ -2955,6 +2967,10 @@ public class EyesisCorrectionParameters {
...
@@ -2955,6 +2967,10 @@ public class EyesisCorrectionParameters {
gd
.
addNumericField
(
"Relative weight of original (measured) plane when combing with neighbors"
,
this
.
plPull
,
6
);
gd
.
addNumericField
(
"Relative weight of original (measured) plane when combing with neighbors"
,
this
.
plPull
,
6
);
gd
.
addNumericField
(
"Maximal number of smoothing iterations for each step"
,
this
.
plIterations
,
0
);
gd
.
addNumericField
(
"Maximal number of smoothing iterations for each step"
,
this
.
plIterations
,
0
);
gd
.
addNumericField
(
"Maximal step difference (1/power of 10)"
,
this
.
plPrecision
,
0
);
gd
.
addNumericField
(
"Maximal step difference (1/power of 10)"
,
this
.
plPrecision
,
0
);
gd
.
addNumericField
(
"Relative weight of center plane when splitting into pairs"
,
this
.
plSplitPull
,
6
);
gd
.
addNumericField
(
"Minimal number of neighbors to split plane in pairs"
,
this
.
plSplitMinNeib
,
0
);
gd
.
addCheckbox
(
"Fuse planes together (off for debug only)"
,
this
.
plFuse
);
gd
.
addCheckbox
(
"Fuse planes together (off for debug only)"
,
this
.
plFuse
);
gd
.
addCheckbox
(
"Keep unconnected supertiles"
,
this
.
plKeepOrphans
);
gd
.
addCheckbox
(
"Keep unconnected supertiles"
,
this
.
plKeepOrphans
);
gd
.
addNumericField
(
"Minimal strength unconnected supertiles to keep"
,
this
.
plMinOrphan
,
6
);
gd
.
addNumericField
(
"Minimal strength unconnected supertiles to keep"
,
this
.
plMinOrphan
,
6
);
...
@@ -3218,6 +3234,10 @@ public class EyesisCorrectionParameters {
...
@@ -3218,6 +3234,10 @@ public class EyesisCorrectionParameters {
this
.
plPull
=
gd
.
getNextNumber
();
this
.
plPull
=
gd
.
getNextNumber
();
this
.
plIterations
=
(
int
)
gd
.
getNextNumber
();
this
.
plIterations
=
(
int
)
gd
.
getNextNumber
();
this
.
plPrecision
=
(
int
)
gd
.
getNextNumber
();
this
.
plPrecision
=
(
int
)
gd
.
getNextNumber
();
this
.
plSplitPull
=
gd
.
getNextNumber
();
this
.
plSplitMinNeib
=
(
int
)
gd
.
getNextNumber
();
this
.
plFuse
=
gd
.
getNextBoolean
();
this
.
plFuse
=
gd
.
getNextBoolean
();
this
.
plKeepOrphans
=
gd
.
getNextBoolean
();
this
.
plKeepOrphans
=
gd
.
getNextBoolean
();
this
.
plMinOrphan
=
gd
.
getNextNumber
();
this
.
plMinOrphan
=
gd
.
getNextNumber
();
...
...
src/main/java/SuperTiles.java
View file @
bdf3d47f
This diff is collapsed.
Click to expand it.
src/main/java/TilePlanes.java
View file @
bdf3d47f
...
@@ -204,6 +204,11 @@ public class TilePlanes {
...
@@ -204,6 +204,11 @@ public class TilePlanes {
return
this
.
neib_best
[
dir
];
return
this
.
neib_best
[
dir
];
}
}
public
void
setNeibBest
(
int
[]
vals
)
{
this
.
neib_best
=
vals
;
}
public
void
setNeibBest
(
int
dir
,
int
val
)
public
void
setNeibBest
(
int
dir
,
int
val
)
{
{
this
.
neib_best
[
dir
]
=
val
;
this
.
neib_best
[
dir
]
=
val
;
...
...
src/main/java/TileProcessor.java
View file @
bdf3d47f
...
@@ -3038,6 +3038,17 @@ public class TileProcessor {
...
@@ -3038,6 +3038,17 @@ public class TileProcessor {
10.0
);
// double arrow_white)
10.0
);
// double arrow_white)
// save surfaces with SuperTiles instance. They can be used to snap to for the per-tile disparity maps.
// save surfaces with SuperTiles instance. They can be used to snap to for the per-tile disparity maps.
st
.
setSurfaces
(
surfaces
);
st
.
setSurfaces
(
surfaces
);
TilePlanes
.
PlaneData
[][][]
split_planes
=
st
.
breakPlanesToPairs
(
st
.
getPlanes
(),
// Mod(), // final TilePlanes.PlaneData[][] center_planes, // measured_planes,
st
.
getPlanes
(),
// Mod(), // final TilePlanes.PlaneData[][] neib_planes, //mod_planes,
clt_parameters
.
plSplitPull
,
// final double center_pull,
clt_parameters
.
plSplitMinNeib
,
// min_neibs, // 2
clt_parameters
.
plPreferDisparity
,
1
,
// final int debugLevel)
clt_parameters
.
tileX
,
clt_parameters
.
tileY
);
if
(
clt_parameters
.
show_planes
){
if
(
clt_parameters
.
show_planes
){
int
[]
wh
=
st
.
getShowPlanesWidthHeight
();
int
[]
wh
=
st
.
getShowPlanesWidthHeight
();
...
...
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