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
330ac1f3
Commit
330ac1f3
authored
Jul 22, 2022
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved and tested initial DSI, fixed DSI filtering
parent
ff4593c5
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
95 additions
and
76 deletions
+95
-76
CLTPass3d.java
src/main/java/com/elphel/imagej/tileprocessor/CLTPass3d.java
+2
-2
ImageDtt.java
src/main/java/com/elphel/imagej/tileprocessor/ImageDtt.java
+5
-5
ImageDttCPU.java
...ain/java/com/elphel/imagej/tileprocessor/ImageDttCPU.java
+8
-8
IntersceneMatchParameters.java
...lphel/imagej/tileprocessor/IntersceneMatchParameters.java
+1
-1
OpticalFlow.java
...ain/java/com/elphel/imagej/tileprocessor/OpticalFlow.java
+15
-3
QuadCLTCPU.java
...main/java/com/elphel/imagej/tileprocessor/QuadCLTCPU.java
+62
-56
TileProcessor.java
...n/java/com/elphel/imagej/tileprocessor/TileProcessor.java
+2
-1
No files found.
src/main/java/com/elphel/imagej/tileprocessor/CLTPass3d.java
View file @
330ac1f3
...
...
@@ -1259,10 +1259,10 @@ public class CLTPass3d{
final
double
strength
=
disparity_map
[
ImageDtt
.
DISPARITY_STRENGTH_INDEX
][
nTile
];
final
double
disparity
=
disparity_map
[
ImageDtt
.
DISPARITY_INDEX_CM
][
nTile
];
// is it combined with LMA?
// double fom = strength - w_adisp * Math.abs(disparity) - w_cdiff * second_max;
double
cdiff
=
(
second_max
==
null
)
?
0.0
:
second_max
[
nTile
];
double
fom
=
strength
-
w_adisp
*
Math
.
abs
(
disparity
)
-
w_cdiff
*
second_max
[
nTile
]
*(
min_strength
/
strength
);
-
w_cdiff
*
cdiff
*(
min_strength
/
strength
);
if
((
strength
<=
0
)
||
(
strength
<=
min_strength
)
||
Double
.
isNaN
(
fom
))
{
...
...
src/main/java/com/elphel/imagej/tileprocessor/ImageDtt.java
View file @
330ac1f3
...
...
@@ -219,7 +219,7 @@ public class ImageDtt extends ImageDttCPU {
if
(
globalDebugLevel
>
1
){
System
.
out
.
println
(
"ortho_height="
+
imgdtt_params
.
ortho_height
+
" ortho_eff_height="
+
imgdtt_params
.
ortho_eff_height
);
for
(
int
i
=
0
;
i
<
corr_size
;
i
++){
System
.
out
.
println
(
" ortho_weights["
+
i
+
"]="
+
ortho_weights
[
i
]);
System
.
out
.
println
(
"
a.
ortho_weights["
+
i
+
"]="
+
ortho_weights
[
i
]);
}
}
...
...
@@ -1528,7 +1528,7 @@ public class ImageDtt extends ImageDttCPU {
if
(
globalDebugLevel
>
1
){
System
.
out
.
println
(
"ortho_height="
+
imgdtt_params
.
ortho_height
+
" ortho_eff_height="
+
imgdtt_params
.
ortho_eff_height
);
for
(
int
i
=
0
;
i
<
corr_size
;
i
++){
System
.
out
.
println
(
" ortho_weights["
+
i
+
"]="
+
ortho_weights
[
i
]);
System
.
out
.
println
(
"
b.
ortho_weights["
+
i
+
"]="
+
ortho_weights
[
i
]);
}
}
...
...
@@ -2195,7 +2195,7 @@ public class ImageDtt extends ImageDttCPU {
if
(
globalDebugLevel
>
1
){
System
.
out
.
println
(
"ortho_height="
+
imgdtt_params
.
ortho_height
+
" ortho_eff_height="
+
imgdtt_params
.
ortho_eff_height
);
for
(
int
i
=
0
;
i
<
corr_size
;
i
++){
System
.
out
.
println
(
" ortho_weights["
+
i
+
"]="
+
ortho_weights
[
i
]);
System
.
out
.
println
(
"
c.
ortho_weights["
+
i
+
"]="
+
ortho_weights
[
i
]);
}
}
...
...
@@ -2951,7 +2951,7 @@ public class ImageDtt extends ImageDttCPU {
if
(
globalDebugLevel
>
1
){
System
.
out
.
println
(
"ortho_height="
+
imgdtt_params
.
ortho_height
+
" ortho_eff_height="
+
imgdtt_params
.
ortho_eff_height
);
for
(
int
i
=
0
;
i
<
corr_size
;
i
++){
System
.
out
.
println
(
" ortho_weights["
+
i
+
"]="
+
ortho_weights
[
i
]);
System
.
out
.
println
(
"
d.
ortho_weights["
+
i
+
"]="
+
ortho_weights
[
i
]);
}
}
...
...
@@ -3626,7 +3626,7 @@ public class ImageDtt extends ImageDttCPU {
if
(
globalDebugLevel
>
1
){
System
.
out
.
println
(
"ortho_height="
+
imgdtt_params
.
ortho_height
+
" ortho_eff_height="
+
imgdtt_params
.
ortho_eff_height
);
for
(
int
i
=
0
;
i
<
corr_size
;
i
++){
System
.
out
.
println
(
" ortho_weights["
+
i
+
"]="
+
ortho_weights
[
i
]);
System
.
out
.
println
(
"
e.
ortho_weights["
+
i
+
"]="
+
ortho_weights
[
i
]);
}
}
...
...
src/main/java/com/elphel/imagej/tileprocessor/ImageDttCPU.java
View file @
330ac1f3
...
...
@@ -1829,7 +1829,7 @@ public class ImageDttCPU {
if
(
globalDebugLevel
>
1
){
System
.
out
.
println
(
"ortho_height="
+
imgdtt_params
.
ortho_height
+
" ortho_eff_height="
+
imgdtt_params
.
ortho_eff_height
);
for
(
int
i
=
0
;
i
<
corr_size
;
i
++){
System
.
out
.
println
(
" ortho_weights["
+
i
+
"]="
+
ortho_weights
[
i
]);
System
.
out
.
println
(
"
f.
ortho_weights["
+
i
+
"]="
+
ortho_weights
[
i
]);
}
}
...
...
@@ -3624,7 +3624,7 @@ public class ImageDttCPU {
if
(
globalDebugLevel
>
1
){
System
.
out
.
println
(
"ortho_height="
+
imgdtt_params
.
ortho_height
+
" ortho_eff_height="
+
imgdtt_params
.
ortho_eff_height
);
for
(
int
i
=
0
;
i
<
corr_size
;
i
++){
System
.
out
.
println
(
" ortho_weights["
+
i
+
"]="
+
ortho_weights
[
i
]);
System
.
out
.
println
(
"
g.
ortho_weights["
+
i
+
"]="
+
ortho_weights
[
i
]);
}
}
...
...
@@ -4602,7 +4602,7 @@ public class ImageDttCPU {
if
(
globalDebugLevel
>
1
){
System
.
out
.
println
(
"ortho_height="
+
imgdtt_params
.
ortho_height
+
" ortho_eff_height="
+
imgdtt_params
.
ortho_eff_height
);
for
(
int
i
=
0
;
i
<
corr_size
;
i
++){
System
.
out
.
println
(
" ortho_weights["
+
i
+
"]="
+
ortho_weights
[
i
]);
System
.
out
.
println
(
"
h.
ortho_weights["
+
i
+
"]="
+
ortho_weights
[
i
]);
}
}
...
...
@@ -7878,7 +7878,7 @@ public class ImageDttCPU {
if
(
globalDebugLevel
>
1
){
System
.
out
.
println
(
"ortho_height="
+
imgdtt_params
.
ortho_height
+
" ortho_eff_height="
+
imgdtt_params
.
ortho_eff_height
);
for
(
int
i
=
0
;
i
<
corr_size
;
i
++){
System
.
out
.
println
(
" ortho_weights["
+
i
+
"]="
+
ortho_weights
[
i
]);
System
.
out
.
println
(
"
i.
ortho_weights["
+
i
+
"]="
+
ortho_weights
[
i
]);
}
}
...
...
@@ -12732,7 +12732,7 @@ public class ImageDttCPU {
if
(
globalDebugLevel
>
1
){
System
.
out
.
println
(
"ortho_height="
+
clt_parameters
.
img_dtt
.
ortho_height
+
" ortho_eff_height="
+
clt_parameters
.
img_dtt
.
ortho_eff_height
);
for
(
int
i
=
0
;
i
<
corr_size
;
i
++){
System
.
out
.
println
(
" ortho_weights["
+
i
+
"]="
+
ortho_weights
[
i
]);
System
.
out
.
println
(
"
j.
ortho_weights["
+
i
+
"]="
+
ortho_weights
[
i
]);
}
}
...
...
@@ -13669,7 +13669,7 @@ public class ImageDttCPU {
if
(
globalDebugLevel
>
1
){
System
.
out
.
println
(
"ortho_height="
+
clt_parameters
.
img_dtt
.
ortho_height
+
" ortho_eff_height="
+
clt_parameters
.
img_dtt
.
ortho_eff_height
);
for
(
int
i
=
0
;
i
<
corr_size
;
i
++){
System
.
out
.
println
(
" ortho_weights["
+
i
+
"]="
+
ortho_weights
[
i
]);
System
.
out
.
println
(
"
k.
ortho_weights["
+
i
+
"]="
+
ortho_weights
[
i
]);
}
}
...
...
@@ -14386,7 +14386,7 @@ public class ImageDttCPU {
if
(
globalDebugLevel
>
1
){
System
.
out
.
println
(
"ortho_height="
+
clt_parameters
.
img_dtt
.
ortho_height
+
" ortho_eff_height="
+
clt_parameters
.
img_dtt
.
ortho_eff_height
);
for
(
int
i
=
0
;
i
<
corr_size
;
i
++){
System
.
out
.
println
(
" ortho_weights["
+
i
+
"]="
+
ortho_weights
[
i
]);
System
.
out
.
println
(
"
l.
ortho_weights["
+
i
+
"]="
+
ortho_weights
[
i
]);
}
}
...
...
@@ -14798,7 +14798,7 @@ public class ImageDttCPU {
if
(
globalDebugLevel
>
1
){
System
.
out
.
println
(
"ortho_height="
+
imgdtt_params
.
ortho_height
+
" ortho_eff_height="
+
imgdtt_params
.
ortho_eff_height
);
for
(
int
i
=
0
;
i
<
corr_size
;
i
++){
System
.
out
.
println
(
" ortho_weights["
+
i
+
"]="
+
ortho_weights
[
i
]);
System
.
out
.
println
(
"
m.
ortho_weights["
+
i
+
"]="
+
ortho_weights
[
i
]);
}
}
...
...
src/main/java/com/elphel/imagej/tileprocessor/IntersceneMatchParameters.java
View file @
330ac1f3
...
...
@@ -136,7 +136,7 @@ public class IntersceneMatchParameters {
public
double
min_disparity
=
-
0.15
;
// 0.2;
public
double
max_sym_disparity
=
0.1
;
// 0.2;
// 2 next are wrong currently - minimal strength is ~0.25
public
double
min_strength_lma
=
0.3
;
// no real filtering
public
double
min_strength_lma
=
0.
0
;
// 0.
3; // no real filtering
public
double
min_strength_replace
=
0.05
;
/// 0.14; /// Before /// - LWIR, after - RGB
public
double
min_strength_blur
=
0.06
;
/// 0.2;
public
double
sigma
=
2
;
/// 5;
...
...
src/main/java/com/elphel/imagej/tileprocessor/OpticalFlow.java
View file @
330ac1f3
...
...
@@ -4322,12 +4322,24 @@ public class OpticalFlow {
debugLevel
-
2
);
}
// split cycles to remove output clutter
int
debug_scene
=
-
15
;
boolean
debug2
=
true
;
boolean
[]
reliable_ref
=
null
;
if
(
min_ref_str
>
0.0
)
{
reliable_ref
=
quadCLTs
[
ref_index
].
getReliableTiles
(
// will be null if does not exist.
min_ref_str
,
// double min_strength,
true
);
// boolean needs_lma);
if
(
debug2
)
{
double
[]
dbg_img
=
new
double
[
reliable_ref
.
length
];
for
(
int
i
=
0
;
i
<
dbg_img
.
length
;
i
++)
{
dbg_img
[
i
]
=
reliable_ref
[
i
]?
1
:
0
;
}
(
new
ShowDoubleFloatArrays
()).
showArrays
(
dbg_img
,
quadCLTs
[
ref_index
].
getTileProcessor
().
getTilesX
(),
quadCLTs
[
ref_index
].
getTileProcessor
().
getTilesY
(),
"reliable_ref"
);
}
}
for
(
int
scene_index
=
ref_index
-
1
;
scene_index
>=
earliest_scene
;
scene_index
--)
{
...
...
@@ -11431,7 +11443,7 @@ public double[][] correlateIntersceneDebug( // only uses GPU and quad
double
max_change
=
1.0
e
-
3
;
double
min_disparity
=
-
0.2
;
double
max_sym_disparity
=
0.2
;
double
min_strength_lma
=
0.7
;
// weaker - treat as non-lma
double
min_strength_lma
=
0.
0
;
//
7; // weaker - treat as non-lma
double
min_strength_replace
=
0.05
;
/// 0.14; /// Before /// - LWIR, after - RGB
double
min_strength_blur
=
0.06
;
/// 0.2;
double
sigma
=
2
;
/// 5;
...
...
@@ -11684,7 +11696,7 @@ public double[][] correlateIntersceneDebug( // only uses GPU and quad
tilesX
,
// int width,
sigma
);
// double sigma);
dbg_img
[
10
]
=
disp
.
clone
();
double
[][]
ds
=
{
disp
,
clean_lma
};
double
[][]
ds
=
{
disp
,
dls
[
2
]
};
final
double
[][]
ds_filled
=
QuadCLT
.
fillDisparityStrength
(
ds
,
// final double [][] ds0,
min_disparity
,
// final double min_disparity,
...
...
src/main/java/com/elphel/imagej/tileprocessor/QuadCLTCPU.java
View file @
330ac1f3
This diff is collapsed.
Click to expand it.
src/main/java/com/elphel/imagej/tileprocessor/TileProcessor.java
View file @
330ac1f3
...
...
@@ -1867,6 +1867,7 @@ ImageDtt.startAndJoin(threads);
for
(
DSD
dsd:
dsd_list
)
{
CLTPass3d
pass
=
passes
.
get
(
dsd
.
indx
);
double
[]
diffs
=
pass
.
getSecondMaxDiff
(
false
);
double
diff
=
(
diffs
==
null
)?
Double
.
NaN
:
diffs
[
nt
];
String
prefix
=
" "
;
if
(
dsd
.
indx
==
dsd_max_fom
.
indx
)
{
prefix
=
"+"
;
...
...
@@ -1878,7 +1879,7 @@ ImageDtt.startAndJoin(threads);
}
System
.
out
.
println
(
String
.
format
(
"%1s%4d: %8.3f %6.4f %6.4f %5b %1d %8.3f %8.3f"
,
prefix
,
//
dsd
.
indx
,
dsd
.
disparity
,
dsd
.
strength
,
dsd
.
adiff
,
dsd
.
has_lma
,
dsd
.
clust_radius
,
diff
s
[
nt
]
,
dsd
.
fom
));
dsd
.
indx
,
dsd
.
disparity
,
dsd
.
strength
,
dsd
.
adiff
,
dsd
.
has_lma
,
dsd
.
clust_radius
,
diff
,
dsd
.
fom
));
}
System
.
out
.
println
();
return
;
...
...
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