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
30937781
Commit
30937781
authored
Jan 22, 2020
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more debugging LMA lazy eye
parent
98f8ebea
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
848 additions
and
357 deletions
+848
-357
Corr2dLMA.java
src/main/java/com/elphel/imagej/tileprocessor/Corr2dLMA.java
+178
-44
Correlation2d.java
...n/java/com/elphel/imagej/tileprocessor/Correlation2d.java
+295
-218
ImageDtt.java
src/main/java/com/elphel/imagej/tileprocessor/ImageDtt.java
+125
-83
ImageDttParameters.java
...a/com/elphel/imagej/tileprocessor/ImageDttParameters.java
+147
-11
QuadCLT.java
src/main/java/com/elphel/imagej/tileprocessor/QuadCLT.java
+103
-1
No files found.
src/main/java/com/elphel/imagej/tileprocessor/Corr2dLMA.java
View file @
30937781
This diff is collapsed.
Click to expand it.
src/main/java/com/elphel/imagej/tileprocessor/Correlation2d.java
View file @
30937781
This diff is collapsed.
Click to expand it.
src/main/java/com/elphel/imagej/tileprocessor/ImageDtt.java
View file @
30937781
This diff is collapsed.
Click to expand it.
src/main/java/com/elphel/imagej/tileprocessor/ImageDttParameters.java
View file @
30937781
This diff is collapsed.
Click to expand it.
src/main/java/com/elphel/imagej/tileprocessor/QuadCLT.java
View file @
30937781
...
...
@@ -4703,7 +4703,7 @@ public class QuadCLT {
// correlation results - final and partial
// clt_corr_combo, // [tp.tilesY][tp.tilesX][(2*transform_size-1)*(2*transform_size-1)] // if null - will not calculate
// clt_corr_partial, // [tp.tilesY][tp.tilesX][pair][color][(2*transform_size-1)*(2*transform_size-1)] // if null - will not calculate
//
clt_mismatch, // [12][tp.tilesY * tp.tilesX] // transpose unapplied. null - do not calculate
clt_mismatch
,
// [12][tp.tilesY * tp.tilesX] // transpose unapplied. null - do not calculate
disparity_map
,
// [2][tp.tilesY * tp.tilesX]
// texture_tiles, // [tp.tilesY][tp.tilesX]["RGBA".length()][];
imp_quad
[
0
].
getWidth
(),
// final int width,
...
...
@@ -4750,6 +4750,108 @@ public class QuadCLT {
// (clt_parameters.dbg_mode & 256) != 0, // transpose convolve
threadsMax
,
debugLevel
);
if
(
disparity_map
!=
null
){
if
(!
batch_mode
&&
clt_parameters
.
show_map
&&
(
debugLevel
>
-
2
)){
sdfa_instance
.
showArrays
(
disparity_map
,
tilesX
,
tilesY
,
true
,
name
+
sAux
()+
"-DISP_MAP-D"
+
clt_parameters
.
disparity
,
ImageDtt
.
DISPARITY_TITLES
);
}
if
(
clt_mismatch
!=
null
)
{
sdfa_instance
.
showArrays
(
clt_mismatch
,
tilesX
,
tilesY
,
true
,
name
+
sAux
()+
"-CLT_MISMATCH-D"
+
clt_parameters
.
disparity
);
// ImageDtt.DISPARITY_TITLES);
double
min_bw
=
0.005
;
// double [][] mismatch_w = new double [clt_mismatch.length][tilesX*tilesY];
double
mismatch_sigma
=
clt_parameters
.
tileStep
*
clt_parameters
.
img_dtt
.
lma_diff_sigma
;
DoubleGaussianBlur
gb
=
new
DoubleGaussianBlur
();
for
(
int
ntile
=
0
;
ntile
<
clt_mismatch
[
0
].
length
;
ntile
++)
{
double
w
=
disparity_map
[
ImageDtt
.
IMG_DIFF0_INDEX
+
0
][
ntile
];
if
(
!(
w
>=
clt_parameters
.
img_dtt
.
lma_diff_minw
))
{
w
=
0.0
;
}
for
(
int
n
=
0
;
n
<
clt_mismatch
.
length
/
3
;
n
++)
{
if
(
w
<=
0.0
)
{
clt_mismatch
[
3
*
n
+
0
][
ntile
]
=
Double
.
NaN
;
clt_mismatch
[
3
*
n
+
1
][
ntile
]
=
Double
.
NaN
;
clt_mismatch
[
3
*
n
+
2
][
ntile
]
=
0.0
;
}
else
{
clt_mismatch
[
3
*
n
+
2
][
ntile
]
=
w
;
}
}
}
sdfa_instance
.
showArrays
(
clt_mismatch
,
tilesX
,
tilesY
,
true
,
name
+
sAux
()+
"-CLT_MISMATCH-FILTERED-D"
+
clt_parameters
.
disparity
);
for
(
int
ntile
=
0
;
ntile
<
clt_mismatch
[
0
].
length
;
ntile
++)
{
double
w
=
disparity_map
[
ImageDtt
.
IMG_DIFF0_INDEX
+
0
][
ntile
];
if
(
!(
w
>=
clt_parameters
.
img_dtt
.
lma_diff_minw
))
{
w
=
0.0
;
}
for
(
int
n
=
0
;
n
<
clt_mismatch
.
length
/
3
;
n
++)
{
if
(
w
<=
0.0
)
{
clt_mismatch
[
3
*
n
+
0
][
ntile
]
=
0.0
;
clt_mismatch
[
3
*
n
+
1
][
ntile
]
=
0.0
;
clt_mismatch
[
3
*
n
+
2
][
ntile
]
=
0.0
;
}
else
{
clt_mismatch
[
3
*
n
+
0
][
ntile
]
*=
w
;
clt_mismatch
[
3
*
n
+
1
][
ntile
]
*=
w
;
clt_mismatch
[
3
*
n
+
2
][
ntile
]
=
w
;
}
}
}
for
(
int
n
=
0
;
n
<
clt_mismatch
.
length
/
3
;
n
++)
{
gb
.
blurDouble
(
clt_mismatch
[
3
*
n
+
0
]
,
tilesX
,
tilesY
,
mismatch_sigma
,
mismatch_sigma
,
0.01
);
gb
.
blurDouble
(
clt_mismatch
[
3
*
n
+
1
]
,
tilesX
,
tilesY
,
mismatch_sigma
,
mismatch_sigma
,
0.01
);
gb
.
blurDouble
(
clt_mismatch
[
3
*
n
+
2
]
,
tilesX
,
tilesY
,
mismatch_sigma
,
mismatch_sigma
,
0.01
);
for
(
int
ntile
=
0
;
ntile
<
clt_mismatch
[
0
].
length
;
ntile
++)
{
if
(
clt_mismatch
[
3
*
n
+
2
][
ntile
]
>=
min_bw
)
{
clt_mismatch
[
3
*
n
+
0
][
ntile
]
/=
clt_mismatch
[
3
*
n
+
2
][
ntile
];
clt_mismatch
[
3
*
n
+
1
][
ntile
]
/=
clt_mismatch
[
3
*
n
+
2
][
ntile
];
if
(
n
>
0
)
{
double
w
=
disparity_map
[
ImageDtt
.
IMG_DIFF0_INDEX
+
0
][
ntile
];
if
(
w
<
clt_parameters
.
img_dtt
.
lma_diff_minw
)
{
w
=
0.0
;
}
clt_mismatch
[
3
*
n
+
2
][
ntile
]
=
w
;
}
}
else
{
clt_mismatch
[
3
*
n
+
0
][
ntile
]
=
Double
.
NaN
;
clt_mismatch
[
3
*
n
+
1
][
ntile
]
=
Double
.
NaN
;
clt_mismatch
[
3
*
n
+
2
][
ntile
]
=
0.0
;
}
}
}
sdfa_instance
.
showArrays
(
clt_mismatch
,
tilesX
,
tilesY
,
true
,
name
+
sAux
()+
"-CLT_MISMATCH-BLUR-D"
+
clt_parameters
.
disparity
);
}
/*
public boolean lma_diff_xy = true; // convert dd/nd to x,y
public double lma_diff_minw = 0.5; // minimal weight to keep
public double lma_diff_sigma = 2.0; // blur differential data (relative to the cluster linear size)
*/
}
return
results
;
}
...
...
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