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
d129b782
Commit
d129b782
authored
May 03, 2017
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
assigning tiles to surfaces
parent
6ae8367c
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
466 additions
and
35 deletions
+466
-35
EyesisCorrectionParameters.java
src/main/java/EyesisCorrectionParameters.java
+92
-2
Eyesis_Correction.java
src/main/java/Eyesis_Correction.java
+21
-1
QuadCLT.java
src/main/java/QuadCLT.java
+25
-2
SuperTiles.java
src/main/java/SuperTiles.java
+12
-0
TileProcessor.java
src/main/java/TileProcessor.java
+63
-12
TileSurface.java
src/main/java/TileSurface.java
+253
-18
No files found.
src/main/java/EyesisCorrectionParameters.java
View file @
d129b782
This diff is collapsed.
Click to expand it.
src/main/java/Eyesis_Correction.java
View file @
d129b782
...
...
@@ -507,6 +507,7 @@ private Panel panel1,
addButton
(
"CLT reset 3D"
,
panelClt1
,
color_stop
);
addButton
(
"CLT 3D"
,
panelClt1
,
color_conf_process
);
addButton
(
"CLT planes"
,
panelClt1
,
color_conf_process
);
addButton
(
"CLT ASSIGN"
,
panelClt1
,
color_process
);
addButton
(
"CLT OUT 3D"
,
panelClt1
,
color_process
);
add
(
panelClt1
);
...
...
@@ -4782,6 +4783,26 @@ private Panel panel1,
UPDATE_STATUS
,
//final boolean updateStatus,
DEBUG_LEVEL
);
//final int debugLevel);
return
;
}
else
if
(
label
.
equals
(
"CLT ASSIGN"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
if
(
QUAD_CLT
==
null
){
System
.
out
.
println
(
"QUAD_CLT is null, nothing to show"
);
return
;
}
if
(!
CLT_PARAMETERS
.
showTsDialog
())
return
;
boolean
OK
=
QUAD_CLT
.
assignCLTPlanes
(
CLT_PARAMETERS
,
// EyesisCorrectionParameters.DCTParameters dct_parameters,
THREADS_MAX
,
//final int threadsMax, // maximal number of threads to launch
UPDATE_STATUS
,
//final boolean updateStatus,
DEBUG_LEVEL
);
//final int debugLevel);
if
(!
OK
){
System
.
out
.
println
(
"Could not assign tiles to surfaces, probably \"CLT planes\" command did not run"
);
return
;
}
return
;
}
else
if
(
label
.
equals
(
"CLT OUT 3D"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
...
...
@@ -4790,7 +4811,6 @@ private Panel panel1,
System
.
out
.
println
(
"QUAD_CLT is null, nothing to show (will add previous steps)"
);
return
;
}
String
configPath
=
null
;
if
(
EYESIS_CORRECTIONS
.
correctionsParameters
.
saveSettings
)
{
...
...
src/main/java/QuadCLT.java
View file @
d129b782
...
...
@@ -4460,7 +4460,6 @@ public class QuadCLT {
}
return
rslt
;
}
// public ImagePlus [] cltDisparityScan(
public
void
showCLTPlanes
(
EyesisCorrectionParameters
.
CLTParameters
clt_parameters
,
final
int
threadsMax
,
// maximal number of threads to launch
...
...
@@ -4481,9 +4480,33 @@ public class QuadCLT {
threadsMax
,
updateStatus
,
debugLevel
);
// CLTPass3d last_scan = tp.clt_3d_passes.get(tp.clt_3d_passes.size() -1); // get last one
}
public
boolean
assignCLTPlanes
(
EyesisCorrectionParameters
.
CLTParameters
clt_parameters
,
final
int
threadsMax
,
// maximal number of threads to launch
final
boolean
updateStatus
,
final
int
debugLevel
)
{
if
(
tp
==
null
){
System
.
out
.
println
(
"showCLTPlanes(): tp is null"
);
return
false
;
}
if
(
tp
.
clt_3d_passes
==
null
){
System
.
out
.
println
(
"showCLTPlanes(): tp.clt_3d_passes is null"
);
return
false
;
}
return
tp
.
assignTilesToSurfaces
(
clt_parameters
,
geometryCorrection
,
threadsMax
,
updateStatus
,
debugLevel
);
}
public
void
out3d
(
EyesisCorrectionParameters
.
CLTParameters
clt_parameters
,
final
int
threadsMax
,
// maximal number of threads to launch
...
...
src/main/java/SuperTiles.java
View file @
d129b782
...
...
@@ -72,6 +72,9 @@ public class SuperTiles{
int
[][]
shell_map
=
null
;
// per supertile, per disparity plane - shell index + 1 (0 - none)
double
[][]
surfaces
;
// per shell, per tile (linescan order) disparity value or NaN in missing supertiles
TileSurface
tileSurface
=
null
;
/**
* currently lowest plane for each includes all tiles, so do not use it. May change in the future
...
...
@@ -185,6 +188,15 @@ public class SuperTiles{
}
}
public
void
setTileSurface
(
TileSurface
tileSurface
)
{
this
.
tileSurface
=
tileSurface
;
}
public
TileSurface
getTileSurface
()
{
return
tileSurface
;
}
public
void
initFuseCoeff
(
double
scale_diag
,
boolean
debug
)
...
...
src/main/java/TileProcessor.java
View file @
d129b782
...
...
@@ -2942,6 +2942,53 @@ public class TileProcessor {
}
public
boolean
assignTilesToSurfaces
(
EyesisCorrectionParameters
.
CLTParameters
clt_parameters
,
GeometryCorrection
geometryCorrection
,
final
int
threadsMax
,
// maximal number of threads to launch
final
boolean
updateStatus
,
final
int
debugLevel
)
{
CLTPass3d
scan_prev
=
clt_3d_passes
.
get
(
clt_3d_passes
.
size
()
-
1
);
// get last one
// boolean show_st = clt_parameters.stShow || (debugLevel > 1);
SuperTiles
st
=
scan_prev
.
getSuperTiles
();
TileSurface
tileSurface
=
st
.
getTileSurface
();
if
(
tileSurface
==
null
){
return
false
;
}
double
[][][]
dispStrength
=
st
.
getDisparityStrengths
(
clt_parameters
.
stMeasSel
);
// int stMeasSel) // = 1; // Select measurements for supertiles : +1 - combo, +2 - quad +4 - hor +8 - vert)
boolean
[][]
tileSel
=
st
.
getMeasurementSelections
(
clt_parameters
.
stMeasSel
);
// int stMeasSel) // = 1; // Select measurements for supertiles : +1 - combo, +2 - quad +4 - hor +8 - vert)
tileSurface
.
InitTilesAssignment
(
clt_parameters
.
tsReset
,
dispStrength
,
// final double [][][] dispStrength,
tileSel
,
// final boolean [][] tileSel,
debugLevel
);
// final int debugLevel,
int
[]
stats
=
tileSurface
.
assignTilesToSurfaces
(
clt_parameters
.
tsMaxDiff
,
//final double maxDiff,
clt_parameters
.
tsMinDiffOther
,
//final double minDiffOther, // should be >= maxDiff
clt_parameters
.
tsMinStrength
,
//final double minStrength,
clt_parameters
.
tsMaxStrength
,
//final double maxStrength,
clt_parameters
.
tsMoveDirs
,
//final int moveDirs, // 1 increase disparity, 2 - decrease disparity, 3 - both directions
clt_parameters
.
tsEnMulti
,
//final boolean enMulti,
clt_parameters
.
tsSurfStrPow
,
//final double surfStrPow, // surface strength power
clt_parameters
.
tsSigma
,
//final double sigma,
clt_parameters
.
tsNSigma
,
//final double nSigma,
clt_parameters
.
tsMinAdvantage
,
//final double minAdvantage,
clt_parameters
.
plDispNorm
,
// final double dispNorm, // disparity normalize (proportionally scale down disparity difference if above
dispStrength
,
// final double [][][] dispStrength,
0
,
// -1, // debugLevel, // final int debugLevel)
clt_parameters
.
tileX
,
clt_parameters
.
tileY
);
tileSurface
.
printStats
(
stats
);
return
true
;
}
//======================
public
void
showPlanes
(
EyesisCorrectionParameters
.
CLTParameters
clt_parameters
,
...
...
@@ -3174,9 +3221,11 @@ public class TileProcessor {
st
.
tileProcessor
.
getTilesY
(),
// int tilesY,
geometryCorrection
,
// GeometryCorrection geometryCorrection,
st
.
tileProcessor
.
threadsMax
);
// int threadsMax);
st
.
setTileSurface
(
tileSurface
);
TileSurface
.
TileData
[][]
tileData
=
tileSurface
.
createTileShells
(
// TileSurface.TileData [][] tileData =
tileSurface
.
createTileShells
(
clt_parameters
.
msUseSel
,
// final boolean use_sel,
clt_parameters
.
msDivideByArea
,
// final boolean divide_by_area,
clt_parameters
.
msScaleProj
,
// final double scale_projection,
...
...
@@ -3185,19 +3234,17 @@ public class TileProcessor {
0
,
// -1, // debugLevel, // final int debugLevel)
clt_parameters
.
tileX
,
clt_parameters
.
tileY
);
int
[][]
tiles_layers
=
tileSurface
.
sortTilesToSurfaces
(
tileSurface
.
InitTilesAssignment
(
true
,
dispStrength
,
// final double [][][] dispStrength,
tileSel
,
// final boolean [][] tileSel,
tileData
,
// final TileData [][] tileData_src,
// parameters
clt_parameters
,
// final EyesisCorrectionParameters.CLTParameters clt_parameters,
debugLevel
,
// final int debugLevel,
clt_parameters
.
tileX
,
clt_parameters
.
tileY
);
debugLevel
);
// final int debugLevel,
if
(
debugLevel
>
-
10
){
return
;
// just cut off the rest
}
TilePlanes
.
PlaneData
[][][]
split_planes
=
// use original (measured planes. See if smoothed are needed here)
...
...
@@ -3571,6 +3618,10 @@ public class TileProcessor {
}
}
public
void
secondPassSetup
(
// prepare tile tasks for the second pass based on the previous one(s)
// final double [][][] image_data, // first index - number of image in a quad
...
...
src/main/java/TileSurface.java
View file @
d129b782
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