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
89fbf5c2
Commit
89fbf5c2
authored
Mar 21, 2022
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleaning up, adding parameters for different debug modes
parent
decd04ed
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
47 deletions
+64
-47
IntersceneLma.java
...n/java/com/elphel/imagej/tileprocessor/IntersceneLma.java
+9
-5
IntersceneLmaParameters.java
.../elphel/imagej/tileprocessor/IntersceneLmaParameters.java
+49
-37
OpticalFlow.java
...ain/java/com/elphel/imagej/tileprocessor/OpticalFlow.java
+6
-5
No files found.
src/main/java/com/elphel/imagej/tileprocessor/IntersceneLma.java
View file @
89fbf5c2
...
...
@@ -266,24 +266,28 @@ public class IntersceneLma {
}
if
(
rslt
[
0
])
{
// better
if
(
iter
>=
num_iter
)
{
// better, but num tries exceeded
if
(
debug_level
>
0
)
System
.
out
.
println
(
"Step "
+
iter
+
": Improved, but number of steps exceeded maximal"
);
if
(
debug_level
>
1
)
System
.
out
.
println
(
"Step "
+
iter
+
": Improved, but number of steps exceeded maximal"
);
}
else
{
if
(
debug_level
>
0
)
System
.
out
.
println
(
"Step "
+
iter
+
": LMA: Success"
);
if
(
debug_level
>
1
)
System
.
out
.
println
(
"Step "
+
iter
+
": LMA: Success"
);
}
}
else
{
// improved over initial ?
if
(
last_rms
[
0
]
<
initial_rms
[
0
])
{
// NaN
rslt
[
0
]
=
true
;
if
(
debug_level
>
0
)
System
.
out
.
println
(
"Step "
+
iter
+
": Failed to converge, but result improved over initial"
);
if
(
debug_level
>
1
)
System
.
out
.
println
(
"Step "
+
iter
+
": Failed to converge, but result improved over initial"
);
}
else
{
if
(
debug_level
>
0
)
System
.
out
.
println
(
"Step "
+
iter
+
": Failed to converge"
);
if
(
debug_level
>
1
)
System
.
out
.
println
(
"Step "
+
iter
+
": Failed to converge"
);
}
}
if
(
debug_level
>
0
)
{
boolean
show_intermediate
=
true
;
if
(
show_intermediate
&&
(
debug_level
>
0
))
{
System
.
out
.
println
(
"LMA: full RMS="
+
last_rms
[
0
]+
" ("
+
initial_rms
[
0
]+
"), pure RMS="
+
last_rms
[
1
]+
" ("
+
initial_rms
[
1
]+
") + lambda="
+
lambda
);
}
if
(
debug_level
>
0
)
{
if
((
debug_level
>
1
)
||
(
iter
==
1
)
||
last_run
)
{
if
(!
show_intermediate
)
{
System
.
out
.
println
(
"LMA: full RMS="
+
last_rms
[
0
]+
" ("
+
initial_rms
[
0
]+
"), pure RMS="
+
last_rms
[
1
]+
" ("
+
initial_rms
[
1
]+
") + lambda="
+
lambda
);
}
String
[]
lines
=
printOldNew
(
false
);
// boolean allvectors)
for
(
String
line
:
lines
)
{
System
.
out
.
println
(
line
);
...
...
src/main/java/com/elphel/imagej/tileprocessor/IntersceneLmaParameters.java
View file @
89fbf5c2
This diff is collapsed.
Click to expand it.
src/main/java/com/elphel/imagej/tileprocessor/OpticalFlow.java
View file @
89fbf5c2
...
...
@@ -581,7 +581,7 @@ public class OpticalFlow {
final
int
debug_level
,
//1
final
boolean
enable_debug_images
)
// true
{
boolean
debug_mismatch
=
(
debug_level
>
-
10
);
//
true
;
boolean
debug_mismatch
=
(
debug_level
>
-
10
);
//
&& enable_debug_images)
;
// int debug_corr2d = 0;// 10
final
TileProcessor
tp
=
reference_QuadClt
.
getTileProcessor
();
...
...
@@ -3602,8 +3602,7 @@ public class OpticalFlow {
int
debug_level
)
{
boolean
show_results
=
true
;
boolean
show_results
=
clt_parameters
.
ilp
.
ilma_debug_adjust_series
;
if
(
ref_index
<
0
)
{
ref_index
+=
scenes
.
length
;
}
...
...
@@ -8428,6 +8427,8 @@ public double[][] correlateIntersceneDebug( // only uses GPU and quad
double
[][]
flowXY
=
new
double
[
macroTiles
][
2
];
// zero pre-shifts
// double [][] flowXY_frac = new double [macroTiles][]; // Will contain fractional X/Y shift for CLT
double
[][]
reference_tiles_macro
=
new
double
[
macroTiles
][];
// hack below to pass nlma for debugging. Change clt_parameters.ilp.ilma_num_corr to -11 after first pass
int
test_debug_level
=
clt_parameters
.
ilp
.
ilma_debug_invariant
?
(
clt_parameters
.
ofp
.
debug_level_iterate
-
nlma
):
-
11
;
double
[][]
vector_XYS
=
correlate2DIterate
(
// returns optical flow and confidence
clt_parameters
.
img_dtt
,
// final ImageDttParameters imgdtt_params,
// for prepareSceneTiles()
...
...
@@ -8460,7 +8461,7 @@ public double[][] correlateIntersceneDebug( // only uses GPU and quad
clt_parameters
.
ofp
.
min_change
,
// final double min_change,
clt_parameters
.
ofp
.
best_neibs_num
,
// final int best_num,
clt_parameters
.
ofp
.
ref_stdev
,
// final double ref_stdev,
clt_parameters
.
ofp
.
debug_level_iterate
-
nlma
,
// final int debug_level)
test_debug_level
,
//
clt_parameters.ofp.debug_level_iterate-nlma, // final int debug_level)
clt_parameters
.
ofp
.
enable_debug_images
);
//final boolean enable_debug_images)
if
(
dbg_img
!=
null
)
{
for
(
int
iy
=
0
;
iy
<
macroTilesY
;
iy
++)
{
...
...
@@ -8505,7 +8506,7 @@ public double[][] correlateIntersceneDebug( // only uses GPU and quad
}
}
if
(
dbg_img
!=
null
)
{
if
(
clt_parameters
.
ilp
.
ilma_debug_invariant
)
{
//
dbg_img != null) {
/*
long [] long_xyz0 = new long [camera_xyz0.length];
long [] long_atr0 = new long [camera_atr0.length];
...
...
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