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
c44613be
Commit
c44613be
authored
Jun 15, 2017
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changing connection costs calculation
parent
67228555
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
1123 additions
and
175 deletions
+1123
-175
EyesisCorrectionParameters.java
src/main/java/EyesisCorrectionParameters.java
+14
-4
Eyesis_Correction.java
src/main/java/Eyesis_Correction.java
+1
-1
LinkPlanes.java
src/main/java/LinkPlanes.java
+256
-69
QuadCLT.java
src/main/java/QuadCLT.java
+1
-3
SuperTiles.java
src/main/java/SuperTiles.java
+216
-18
TileNeibs.java
src/main/java/TileNeibs.java
+13
-0
TilePlanes.java
src/main/java/TilePlanes.java
+297
-33
TileProcessor.java
src/main/java/TileProcessor.java
+319
-45
TileSurface.java
src/main/java/TileSurface.java
+6
-2
No files found.
src/main/java/EyesisCorrectionParameters.java
View file @
c44613be
...
@@ -2022,7 +2022,7 @@ public class EyesisCorrectionParameters {
...
@@ -2022,7 +2022,7 @@ public class EyesisCorrectionParameters {
public
double
bgnd_sure
=
0.18
;
// minimal strength to be considered definitely background
public
double
bgnd_sure
=
0.18
;
// minimal strength to be considered definitely background
public
double
bgnd_maybe
=
0.1
;
// maximal strength to ignore as non-background
public
double
bgnd_maybe
=
0.1
;
// maximal strength to ignore as non-background
// public double bgnd_2diff = 0.005; // maximal strength to ignore as non-background
// public double bgnd_2diff = 0.005; // maximal strength to ignore as non-background
public
int
min_clstr_seed
=
2
;
// number of tiles in a cluster to seed (just background?)
public
int
min_clstr_seed
=
4
;
//
2; // number of tiles in a cluster to seed (just background?)
public
int
min_clstr_lone
=
4
;
// number of tiles in a cluster not close to other clusters (more than 2 tiles apart)
public
int
min_clstr_lone
=
4
;
// number of tiles in a cluster not close to other clusters (more than 2 tiles apart)
public
double
min_clstr_weight
=
0.0
;
// Minimal total strength of the cluster
public
double
min_clstr_weight
=
0.0
;
// Minimal total strength of the cluster
public
double
min_clstr_max
=
0.25
;
// Minimal maximal strength of the cluster
public
double
min_clstr_max
=
0.25
;
// Minimal maximal strength of the cluster
...
@@ -2149,7 +2149,7 @@ public class EyesisCorrectionParameters {
...
@@ -2149,7 +2149,7 @@ public class EyesisCorrectionParameters {
// Multi-pass growing disparity
// Multi-pass growing disparity
public
int
grow_sweep
=
8
;
// Try these number of tiles around known ones
public
int
grow_sweep
=
8
;
// Try these number of tiles around known ones
public
double
grow_disp_max
=
5
0.0
;
// Maximal disparity to try
public
double
grow_disp_max
=
10
0.0
;
// Maximal disparity to try
public
double
grow_disp_trust
=
4.0
;
// Trust measured disparity within +/- this value
public
double
grow_disp_trust
=
4.0
;
// Trust measured disparity within +/- this value
public
double
grow_disp_step
=
6.0
;
// Increase disparity (from maximal tried) if nothing found in that tile // TODO: handle enclosed dips?
public
double
grow_disp_step
=
6.0
;
// Increase disparity (from maximal tried) if nothing found in that tile // TODO: handle enclosed dips?
public
double
grow_min_diff
=
0.5
;
// Grow more only if at least one channel has higher variance from others for the tile
public
double
grow_min_diff
=
0.5
;
// Grow more only if at least one channel has higher variance from others for the tile
...
@@ -2170,6 +2170,8 @@ public class EyesisCorrectionParameters {
...
@@ -2170,6 +2170,8 @@ public class EyesisCorrectionParameters {
public
double
plMinStrength
=
0.01
;
// Minimal total strength of a plane
public
double
plMinStrength
=
0.01
;
// Minimal total strength of a plane
public
double
plMaxEigen
=
0.06
;
// Maximal eigenvalue of a plane
public
double
plMaxEigen
=
0.06
;
// Maximal eigenvalue of a plane
public
double
plEigenFloor
=
0.005
;
// Add to eigenvalues of each participating plane and result to validate connections
public
double
plEigenFloor
=
0.005
;
// Add to eigenvalues of each participating plane and result to validate connections
public
double
plEigenStick
=
25.0
;
// Consider plane to be a "stick" if second eigenvalue is below
public
double
plBadPlate
=
0.2
;
// Not a plate if sin^2 between normals from disparity and world exceeds this
public
boolean
plDbgMerge
=
true
;
// Combine 'other' plane with current
public
boolean
plDbgMerge
=
true
;
// Combine 'other' plane with current
public
double
plWorstWorsening
=
2.0
;
// Worst case worsening after merge
public
double
plWorstWorsening
=
2.0
;
// Worst case worsening after merge
public
double
plWorstWorsening2
=
5.0
;
// Worst case worsening for thin planes
public
double
plWorstWorsening2
=
5.0
;
// Worst case worsening for thin planes
...
@@ -2583,6 +2585,8 @@ public class EyesisCorrectionParameters {
...
@@ -2583,6 +2585,8 @@ public class EyesisCorrectionParameters {
properties
.
setProperty
(
prefix
+
"plMinStrength"
,
this
.
plMinStrength
+
""
);
properties
.
setProperty
(
prefix
+
"plMinStrength"
,
this
.
plMinStrength
+
""
);
properties
.
setProperty
(
prefix
+
"plMaxEigen"
,
this
.
plMaxEigen
+
""
);
properties
.
setProperty
(
prefix
+
"plMaxEigen"
,
this
.
plMaxEigen
+
""
);
properties
.
setProperty
(
prefix
+
"plEigenFloor"
,
this
.
plEigenFloor
+
""
);
properties
.
setProperty
(
prefix
+
"plEigenFloor"
,
this
.
plEigenFloor
+
""
);
properties
.
setProperty
(
prefix
+
"plEigenStick"
,
this
.
plEigenStick
+
""
);
properties
.
setProperty
(
prefix
+
"plBadPlate"
,
this
.
plBadPlate
+
""
);
properties
.
setProperty
(
prefix
+
"plDbgMerge"
,
this
.
plDbgMerge
+
""
);
properties
.
setProperty
(
prefix
+
"plDbgMerge"
,
this
.
plDbgMerge
+
""
);
properties
.
setProperty
(
prefix
+
"plWorstWorsening"
,
this
.
plWorstWorsening
+
""
);
properties
.
setProperty
(
prefix
+
"plWorstWorsening"
,
this
.
plWorstWorsening
+
""
);
properties
.
setProperty
(
prefix
+
"plWorstWorsening2"
,
this
.
plWorstWorsening2
+
""
);
properties
.
setProperty
(
prefix
+
"plWorstWorsening2"
,
this
.
plWorstWorsening2
+
""
);
...
@@ -2971,6 +2975,8 @@ public class EyesisCorrectionParameters {
...
@@ -2971,6 +2975,8 @@ public class EyesisCorrectionParameters {
if
(
properties
.
getProperty
(
prefix
+
"plMinStrength"
)!=
null
)
this
.
plMinStrength
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"plMinStrength"
));
if
(
properties
.
getProperty
(
prefix
+
"plMinStrength"
)!=
null
)
this
.
plMinStrength
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"plMinStrength"
));
if
(
properties
.
getProperty
(
prefix
+
"plMaxEigen"
)!=
null
)
this
.
plMaxEigen
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"plMaxEigen"
));
if
(
properties
.
getProperty
(
prefix
+
"plMaxEigen"
)!=
null
)
this
.
plMaxEigen
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"plMaxEigen"
));
if
(
properties
.
getProperty
(
prefix
+
"plEigenFloor"
)!=
null
)
this
.
plEigenFloor
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"plEigenFloor"
));
if
(
properties
.
getProperty
(
prefix
+
"plEigenFloor"
)!=
null
)
this
.
plEigenFloor
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"plEigenFloor"
));
if
(
properties
.
getProperty
(
prefix
+
"plEigenStick"
)!=
null
)
this
.
plEigenStick
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"plEigenStick"
));
if
(
properties
.
getProperty
(
prefix
+
"plBadPlate"
)!=
null
)
this
.
plBadPlate
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"plBadPlate"
));
if
(
properties
.
getProperty
(
prefix
+
"plDbgMerge"
)!=
null
)
this
.
plDbgMerge
=
Boolean
.
parseBoolean
(
properties
.
getProperty
(
prefix
+
"plDbgMerge"
));
if
(
properties
.
getProperty
(
prefix
+
"plDbgMerge"
)!=
null
)
this
.
plDbgMerge
=
Boolean
.
parseBoolean
(
properties
.
getProperty
(
prefix
+
"plDbgMerge"
));
if
(
properties
.
getProperty
(
prefix
+
"plWorstWorsening"
)!=
null
)
this
.
plWorstWorsening
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"plWorstWorsening"
));
if
(
properties
.
getProperty
(
prefix
+
"plWorstWorsening"
)!=
null
)
this
.
plWorstWorsening
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"plWorstWorsening"
));
if
(
properties
.
getProperty
(
prefix
+
"plWorstWorsening2"
)!=
null
)
this
.
plWorstWorsening2
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"plWorstWorsening2"
));
if
(
properties
.
getProperty
(
prefix
+
"plWorstWorsening2"
)!=
null
)
this
.
plWorstWorsening2
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"plWorstWorsening2"
));
...
@@ -3157,7 +3163,7 @@ public class EyesisCorrectionParameters {
...
@@ -3157,7 +3163,7 @@ public class EyesisCorrectionParameters {
gd
.
addNumericField
(
"Do not try to correct vignetting smaller than this fraction of max"
,
this
.
vignetting_range
,
3
);
gd
.
addNumericField
(
"Do not try to correct vignetting smaller than this fraction of max"
,
this
.
vignetting_range
,
3
);
gd
.
addNumericField
(
"Kernel step in pixels (has 1 kernel margin on each side)"
,
this
.
kernel_step
,
0
);
gd
.
addNumericField
(
"Kernel step in pixels (has 1 kernel margin on each side)"
,
this
.
kernel_step
,
0
);
gd
.
addNumericField
(
"Nominal (rectilinear) disparity between side of square cameras (pix)"
,
this
.
disparity
,
3
);
gd
.
addNumericField
(
"Nominal (rectilinear) disparity between side of square cameras (pix)"
,
this
.
disparity
,
3
);
gd
.
addCheckbox
(
"Perf
corm coorrelation"
,
this
.
correlate
);
gd
.
addCheckbox
(
"Perf
orm correlation"
,
this
.
correlate
);
gd
.
addNumericField
(
"itmask of pairs to combine in the composite (top, bottom, left,righth)"
,
this
.
corr_mask
,
0
);
gd
.
addNumericField
(
"itmask of pairs to combine in the composite (top, bottom, left,righth)"
,
this
.
corr_mask
,
0
);
gd
.
addCheckbox
(
"Combine correlation with mirrored around disparity direction"
,
this
.
corr_sym
);
gd
.
addCheckbox
(
"Combine correlation with mirrored around disparity direction"
,
this
.
corr_sym
);
gd
.
addCheckbox
(
"Keep all partial correlations (otherwise - only combined one)"
,
this
.
corr_keep
);
gd
.
addCheckbox
(
"Keep all partial correlations (otherwise - only combined one)"
,
this
.
corr_keep
);
...
@@ -3387,6 +3393,8 @@ public class EyesisCorrectionParameters {
...
@@ -3387,6 +3393,8 @@ public class EyesisCorrectionParameters {
gd
.
addNumericField
(
"Minimal total strength of a plane"
,
this
.
plMinStrength
,
6
);
gd
.
addNumericField
(
"Minimal total strength of a plane"
,
this
.
plMinStrength
,
6
);
gd
.
addNumericField
(
"Maximal eigenvalue of a plane"
,
this
.
plMaxEigen
,
6
);
gd
.
addNumericField
(
"Maximal eigenvalue of a plane"
,
this
.
plMaxEigen
,
6
);
gd
.
addNumericField
(
"Add to eigenvalues of each participating plane and result to validate connections"
,
this
.
plEigenFloor
,
6
);
gd
.
addNumericField
(
"Add to eigenvalues of each participating plane and result to validate connections"
,
this
.
plEigenFloor
,
6
);
gd
.
addNumericField
(
"Consider plane to be a \"stick\" if second eigenvalue is below"
,
this
.
plEigenStick
,
6
);
gd
.
addNumericField
(
"Not a plate if sin^2 between normals from disparity and world exceeds this"
,
this
.
plBadPlate
,
6
);
gd
.
addCheckbox
(
"Combine 'other' plane with the current (unused)"
,
this
.
plDbgMerge
);
gd
.
addCheckbox
(
"Combine 'other' plane with the current (unused)"
,
this
.
plDbgMerge
);
gd
.
addNumericField
(
"Worst case worsening after merge"
,
this
.
plWorstWorsening
,
6
);
gd
.
addNumericField
(
"Worst case worsening after merge"
,
this
.
plWorstWorsening
,
6
);
gd
.
addNumericField
(
"Worst case worsening for thin planes"
,
this
.
plWorstWorsening2
,
6
);
gd
.
addNumericField
(
"Worst case worsening for thin planes"
,
this
.
plWorstWorsening2
,
6
);
...
@@ -3792,6 +3800,8 @@ public class EyesisCorrectionParameters {
...
@@ -3792,6 +3800,8 @@ public class EyesisCorrectionParameters {
this
.
plMinStrength
=
gd
.
getNextNumber
();
this
.
plMinStrength
=
gd
.
getNextNumber
();
this
.
plMaxEigen
=
gd
.
getNextNumber
();
this
.
plMaxEigen
=
gd
.
getNextNumber
();
this
.
plEigenFloor
=
gd
.
getNextNumber
();
this
.
plEigenFloor
=
gd
.
getNextNumber
();
this
.
plEigenStick
=
gd
.
getNextNumber
();
this
.
plBadPlate
=
gd
.
getNextNumber
();
this
.
plDbgMerge
=
gd
.
getNextBoolean
();
this
.
plDbgMerge
=
gd
.
getNextBoolean
();
this
.
plWorstWorsening
=
gd
.
getNextNumber
();
this
.
plWorstWorsening
=
gd
.
getNextNumber
();
this
.
plWorstWorsening2
=
gd
.
getNextNumber
();
this
.
plWorstWorsening2
=
gd
.
getNextNumber
();
...
@@ -4484,7 +4494,7 @@ public class EyesisCorrectionParameters {
...
@@ -4484,7 +4494,7 @@ public class EyesisCorrectionParameters {
public
double
projectionYaw
=
0.0
;
public
double
projectionYaw
=
0.0
;
public
double
projectionRoll
=
0.0
;
public
double
projectionRoll
=
0.0
;
public
boolean
matchPixelSize
=
true
;
// disregard next value, calculate projectionPixelSize from t
eh
equirectangular map
public
boolean
matchPixelSize
=
true
;
// disregard next value, calculate projectionPixelSize from t
he
equirectangular map
public
double
projectionPixelSize
=
0.00044036902
;
public
double
projectionPixelSize
=
0.00044036902
;
public
int
projectionWidth
=
2920
;
public
int
projectionWidth
=
2920
;
public
int
projectionHeight
=
2220
;
public
int
projectionHeight
=
2220
;
...
...
src/main/java/Eyesis_Correction.java
View file @
c44613be
...
@@ -499,7 +499,7 @@ private Panel panel1,
...
@@ -499,7 +499,7 @@ private Panel panel1,
addButton
(
"CLT process files"
,
panelClt1
,
color_process
);
addButton
(
"CLT process files"
,
panelClt1
,
color_process
);
addButton
(
"CLT process sets"
,
panelClt1
,
color_process
);
addButton
(
"CLT process sets"
,
panelClt1
,
color_process
);
addButton
(
"CLT process quads"
,
panelClt1
,
color_process
);
addButton
(
"CLT process quads"
,
panelClt1
,
color_process
);
addButton
(
"CLT process corr"
,
panelClt1
,
color_process
);
addButton
(
"CLT process corr"
,
panelClt1
,
color_
conf_
process
);
addButton
(
"CLT disparity scan"
,
panelClt1
,
color_conf_process
);
addButton
(
"CLT disparity scan"
,
panelClt1
,
color_conf_process
);
addButton
(
"CLT reset fine corr"
,
panelClt1
,
color_stop
);
addButton
(
"CLT reset fine corr"
,
panelClt1
,
color_stop
);
addButton
(
"CLT show fine corr"
,
panelClt1
,
color_configure
);
addButton
(
"CLT show fine corr"
,
panelClt1
,
color_configure
);
...
...
src/main/java/LinkPlanes.java
View file @
c44613be
This diff is collapsed.
Click to expand it.
src/main/java/QuadCLT.java
View file @
c44613be
...
@@ -5526,7 +5526,7 @@ public class QuadCLT {
...
@@ -5526,7 +5526,7 @@ public class QuadCLT {
clt_parameters
.
min_clstr_block
,
// number of tiles in a cluster to block (just non-background?)
clt_parameters
.
min_clstr_block
,
// number of tiles in a cluster to block (just non-background?)
disparity_index
,
// index of disparity value in disparity_map == 2 (0,2 or 4)
disparity_index
,
// index of disparity value in disparity_map == 2 (0,2 or 4)
clt_parameters
.
show_bgnd_nonbgnd
,
clt_parameters
.
show_bgnd_nonbgnd
,
(
clt_parameters
.
debug_filters
?
debugLevel
:
-
1
));
(
clt_parameters
.
debug_filters
?
(
debugLevel
)
:
-
1
));
boolean
[]
bgnd_strict
=
bgnd_tiles
.
clone
();
// only these have non 0 alpha
boolean
[]
bgnd_strict
=
bgnd_tiles
.
clone
();
// only these have non 0 alpha
tp
.
growTiles
(
tp
.
growTiles
(
clt_parameters
.
bgnd_grow
,
// grow tile selection by 1 over non-background tiles 1: 4 directions, 2 - 8 directions, 3 - 8 by 1, 4 by 1 more
clt_parameters
.
bgnd_grow
,
// grow tile selection by 1 over non-background tiles 1: 4 directions, 2 - 8 directions, 3 - 8 by 1, 4 by 1 more
...
@@ -5568,8 +5568,6 @@ public class QuadCLT {
...
@@ -5568,8 +5568,6 @@ public class QuadCLT {
texture_tiles_bgnd
[
tileY
][
tileX
]=
texture_tiles
[
tileY
][
tileX
].
clone
();
texture_tiles_bgnd
[
tileY
][
tileX
]=
texture_tiles
[
tileY
][
tileX
].
clone
();
texture_tiles_bgnd
[
tileY
][
tileX
][
alpha_index
]
=
alpha_zero
;
texture_tiles_bgnd
[
tileY
][
tileX
][
alpha_index
]
=
alpha_zero
;
}
}
}
}
}
}
}
}
...
...
src/main/java/SuperTiles.java
View file @
c44613be
This diff is collapsed.
Click to expand it.
src/main/java/TileNeibs.java
View file @
c44613be
...
@@ -160,6 +160,19 @@ public class TileNeibs{
...
@@ -160,6 +160,19 @@ public class TileNeibs{
}
}
return
-
1
;
// should not happen
return
-
1
;
// should not happen
}
}
public
void
shrinkSelection
(
int
shrink
,
// grow tile selection by 1 over non-background tiles 1: 4 directions, 2 - 8 directions, 3 - 8 by 1, 4 by 1 more
boolean
[]
tiles
,
boolean
[]
prohibit
)
{
boolean
[]
itiles
=
new
boolean
[
tiles
.
length
];
for
(
int
i
=
0
;
i
<
tiles
.
length
;
i
++)
itiles
[
i
]
=
!
tiles
[
i
];
growSelection
(
shrink
,
// grow tile selection by 1 over non-background tiles 1: 4 directions, 2 - 8 directions, 3 - 8 by 1, 4 by 1 more
itiles
,
prohibit
);
for
(
int
i
=
0
;
i
<
tiles
.
length
;
i
++)
tiles
[
i
]
=
!
itiles
[
i
];
}
public
void
growSelection
(
public
void
growSelection
(
int
grow
,
// grow tile selection by 1 over non-background tiles 1: 4 directions, 2 - 8 directions, 3 - 8 by 1, 4 by 1 more
int
grow
,
// grow tile selection by 1 over non-background tiles 1: 4 directions, 2 - 8 directions, 3 - 8 by 1, 4 by 1 more
...
...
src/main/java/TilePlanes.java
View file @
c44613be
This diff is collapsed.
Click to expand it.
src/main/java/TileProcessor.java
View file @
c44613be
This diff is collapsed.
Click to expand it.
src/main/java/TileSurface.java
View file @
c44613be
...
@@ -3170,9 +3170,13 @@ public class TileSurface {
...
@@ -3170,9 +3170,13 @@ public class TileSurface {
if
(
grown_cluster
[
neTile1
]
==
null
)
{
if
(
grown_cluster
[
neTile1
]
==
null
)
{
int
nSurfTile1
=
surf_indices
[
neTile1
];
int
nSurfTile1
=
surf_indices
[
neTile1
];
// should never be null as it is connected from nSurfTile0
// should never be null as it is connected from nSurfTile0
grown_cluster
[
neTile1
]
=
new
boolean
[
tileData
[
nSurfTile1
].
length
];
if
(
nSurfTile1
>=
0
)
{
grown_cluster
[
neTile1
]
=
new
boolean
[
tileData
[
nSurfTile1
].
length
];
// out_of_bounds
}
}
if
(
grown_cluster
[
neTile1
]
!=
null
){
grown_cluster
[
neTile1
][
nl1
]
=
true
;
}
}
grown_cluster
[
neTile1
][
nl1
]
=
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