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
8f62453e
Commit
8f62453e
authored
Mar 12, 2017
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
splitting clusters
parent
e2689c1b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
3 deletions
+62
-3
EyesisCorrectionParameters.java
src/main/java/EyesisCorrectionParameters.java
+1
-1
QuadCLT.java
src/main/java/QuadCLT.java
+1
-1
TileProcessor.java
src/main/java/TileProcessor.java
+60
-1
No files found.
src/main/java/EyesisCorrectionParameters.java
View file @
8f62453e
...
...
@@ -2402,7 +2402,7 @@ public class EyesisCorrectionParameters {
gd
.
addNumericField
(
"Contrast of dotted border on correlation results"
,
this
.
corr_border_contrast
,
6
);
gd
.
addMessage
(
"--- tiles tasks (current tile_task_op = "
+
this
.
tile_task_op
+
") ---"
);
gd
.
addCheckbox
(
"Enhace ortho lines detection (enh_ortho)"
,
ImageDtt
.
getOrthoLines
(
this
.
tile_task_op
));
gd
.
addCheckbox
(
"Force disparity for image rendering (false - use fo
lund by tile correlation)"
,
ImageDtt
.
getForcedDisparity
(
this
.
tile_task_op
));
gd
.
addCheckbox
(
"Force disparity for image rendering (false - use fo
und from tile correlation)"
,
ImageDtt
.
getForcedDisparity
(
this
.
tile_task_op
));
gd
.
addNumericField
(
"Bitmask of used images (1 - top left, 2 - top right, 4 - bottom left, 8 bottom right)"
,
ImageDtt
.
getImgMask
(
this
.
tile_task_op
),
0
);
gd
.
addNumericField
(
"Bitmask of used pairs (1 - top, 2 - bottom, 4 - left, 8 - right)"
,
ImageDtt
.
getPairMask
(
this
.
tile_task_op
),
0
);
// gd.addNumericField("Tile operations bits: +(0..f) - images, +(00.f0) - process pairs +256, ... ", this.tile_task_op, 0);
...
...
src/main/java/QuadCLT.java
View file @
8f62453e
...
...
@@ -3182,7 +3182,7 @@ public class QuadCLT {
// for testing defined for a window, later the tiles to process will be calculated based on previous passes results
int
[][]
tile_op
=
tp
.
setSameTileOp
(
clt_parameters
,
clt_parameters
.
tile_task_op
,
debugLevel
);
double
[][]
disparity_array
=
tp
.
setSameDisparity
(
0.0
);
// [tp.tilesY][tp.tilesX] - individual per-tile expected disparity
double
[][]
disparity_array
=
tp
.
setSameDisparity
(
clt_parameters
.
disparity
);
//
0.0); // [tp.tilesY][tp.tilesX] - individual per-tile expected disparity
//TODO: Add array of default disparity - use for combining images in force disparity mode (no correlation), when disparity is predicted from other tiles
...
...
src/main/java/TileProcessor.java
View file @
8f62453e
...
...
@@ -1193,6 +1193,9 @@ public class TileProcessor {
}
// Just calculate stress, do not actually break (after last smoothing)
dp
.
breakDisparity
(
0.0
,
// final double break4, // clt_parameters.tiBreak/0 allow disconnecting from neighbors (fg/bg)
...
...
@@ -1239,7 +1242,32 @@ public class TileProcessor {
sdfa_instance
.
showArrays
(
dbg_img
,
tilesX
*
clt_parameters
.
transform_size
,
tilesY
*
clt_parameters
.
transform_size
,
true
,
"neighbors"
,
titles_all
);
//************************************************
//************************************************
int
[][]
flaps
=
dp
.
createOverlapGeometry
(
neighbors
,
// +1 - up (N), +2 - up-right - NE, ... +0x80 - NW
these_tiles
,
// final boolean [] selected, // only inner?
border
,
// final boolean [] border,
threadsMax
,
// maximal number of threads to launch
debugLevel
);
double
[][]
dbg_flaps
=
dp
.
dbgShowOverlaps
(
// boolean [] selected,
flaps
,
// int [][] flaps,
clt_parameters
.
transform_size
,
// int tile_size,
-
1.0
,
// double bgnd,
1.0
);
// double fgnd)
double
[]
dbg_neibs
=
dp
.
dbgShowNeighbors
(
these_tiles
,
// grown, // these_tiles,
neighbors
,
// _orig, // int [] neighbors,
clt_parameters
.
transform_size
,
// int tile_size,
-
1.0
,
// double bgnd,
1.0
);
// double fgnd)
String
[]
titleFlaps
=
{
"neib"
,
"N"
,
"NE"
,
"E"
,
"SE"
,
"S"
,
"SW"
,
"W"
,
"NW"
};
double
[][]
dbg_flaps_all
=
{
dbg_neibs
,
dbg_flaps
[
0
],
dbg_flaps
[
1
],
dbg_flaps
[
2
],
dbg_flaps
[
3
],
dbg_flaps
[
4
],
dbg_flaps
[
5
],
dbg_flaps
[
6
],
dbg_flaps
[
7
]};
sdfa_instance
.
showArrays
(
dbg_flaps_all
,
tilesX
*
clt_parameters
.
transform_size
,
tilesY
*
clt_parameters
.
transform_size
,
true
,
"flaps-dirs"
,
titleFlaps
);
int
numScans
=
createTileTasks
(
50
,
// int maxClusters,
...
...
@@ -1801,4 +1829,35 @@ public class TileProcessor {
"triangles-"
+
texturePath
,
titles
);
}
/* Create a Thread[] array as large as the number of processors available.
* From Stephan Preibisch's Multithreading.java class. See:
* http://repo.or.cz/w/trakem2.git?a=blob;f=mpi/fruitfly/general/MultiThreading.java;hb=HEAD
*/
static
Thread
[]
newThreadArray
(
int
maxCPUs
)
{
int
n_cpus
=
Runtime
.
getRuntime
().
availableProcessors
();
if
(
n_cpus
>
maxCPUs
)
n_cpus
=
maxCPUs
;
return
new
Thread
[
n_cpus
];
}
/* Start all given threads and wait on each of them until all are done.
* From Stephan Preibisch's Multithreading.java class. See:
* http://repo.or.cz/w/trakem2.git?a=blob;f=mpi/fruitfly/general/MultiThreading.java;hb=HEAD
*/
public
static
void
startAndJoin
(
Thread
[]
threads
)
{
for
(
int
ithread
=
0
;
ithread
<
threads
.
length
;
++
ithread
)
{
threads
[
ithread
].
setPriority
(
Thread
.
NORM_PRIORITY
);
threads
[
ithread
].
start
();
}
try
{
for
(
int
ithread
=
0
;
ithread
<
threads
.
length
;
++
ithread
)
threads
[
ithread
].
join
();
}
catch
(
InterruptedException
ie
)
{
throw
new
RuntimeException
(
ie
);
}
}
}
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