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
0de865d9
Commit
0de865d9
authored
Feb 12, 2024
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added average RMSE fro orientation
parent
7c17ebab
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
76 additions
and
72 deletions
+76
-72
Interscene.java
...main/java/com/elphel/imagej/tileprocessor/Interscene.java
+38
-53
OpticalFlow.java
...ain/java/com/elphel/imagej/tileprocessor/OpticalFlow.java
+16
-19
RMSEStats.java
src/main/java/com/elphel/imagej/tileprocessor/RMSEStats.java
+22
-0
No files found.
src/main/java/com/elphel/imagej/tileprocessor/Interscene.java
View file @
0de865d9
This diff is collapsed.
Click to expand it.
src/main/java/com/elphel/imagej/tileprocessor/OpticalFlow.java
View file @
0de865d9
...
@@ -7591,8 +7591,9 @@ public class OpticalFlow {
...
@@ -7591,8 +7591,9 @@ public class OpticalFlow {
Arrays
.
fill
(
dbg_rms_pre
,
Double
.
NaN
);
Arrays
.
fill
(
dbg_rms_pre
,
Double
.
NaN
);
// process scenes before reference
// process scenes before reference
int
dbg_ref_index
=
10
;
// wait for ref_index <= dbg_ref_index and print (manually update dbg_ref_index
int
dbg_ref_index
=
10
;
// wait for ref_index <= dbg_ref_index and print (manually update dbg_ref_index
double
maximal_series_rms
=
0.0
;
RMSEStats
rmse_stats
=
new
RMSEStats
();
double
maximal_series_rms1
=
0.0
;
RMSEStats
rmse_stats1
=
new
RMSEStats
();
if
(
ref_index
>
1
)
{
if
(
ref_index
>
1
)
{
for
(
int
i
=
ref_index
-
2
;
i
>=
0
;
i
--)
{
for
(
int
i
=
ref_index
-
2
;
i
>=
0
;
i
--)
{
QuadCLT
scene_QuadClt
=
scenes
[
i
];
QuadCLT
scene_QuadClt
=
scenes
[
i
];
...
@@ -7672,9 +7673,7 @@ public class OpticalFlow {
...
@@ -7672,9 +7673,7 @@ public class OpticalFlow {
}
}
}
}
}
}
if
(
lma_rms
[
0
]
>
maximal_series_rms
)
{
rmse_stats
.
add
(
lma_rms
[
0
]);
maximal_series_rms
=
lma_rms
[
0
];
}
dbg_rms_pre
[
i
]
=
lma_rms
[
0
];
dbg_rms_pre
[
i
]
=
lma_rms
[
0
];
ers_reference
.
addScene
(
scene_QuadClt
.
getImageName
(),
ers_reference
.
addScene
(
scene_QuadClt
.
getImageName
(),
scenes_xyzatr
[
i
][
0
],
scenes_xyzatr
[
i
][
0
],
...
@@ -7691,8 +7690,8 @@ public class OpticalFlow {
...
@@ -7691,8 +7690,8 @@ public class OpticalFlow {
if
(
debug_level
>
-
1
)
{
if
(
debug_level
>
-
1
)
{
System
.
out
.
println
(
"Pass multi scene "
+
i
+
" (of "
+
scenes
.
length
+
") "
+
System
.
out
.
println
(
"Pass multi scene "
+
i
+
" (of "
+
scenes
.
length
+
") "
+
reference_QuadClt
.
getImageName
()
+
"/"
+
scene_QuadClt
.
getImageName
()+
reference_QuadClt
.
getImageName
()
+
"/"
+
scene_QuadClt
.
getImageName
()+
" Done. RMS="
+
lma_rms
[
0
]+
", maximal so far was "
+
maximal_series_rms
);
" Done. RMS="
+
lma_rms
[
0
]+
}
", maximal so far was "
+
rmse_stats
.
getMax
()+
", average was "
+
rmse_stats
.
getAverage
());
}
if
(
delete_scene_asap
)
{
if
(
delete_scene_asap
)
{
scenes
[
i
+
1
]
=
null
;
scenes
[
i
+
1
]
=
null
;
}
}
...
@@ -7775,9 +7774,7 @@ public class OpticalFlow {
...
@@ -7775,9 +7774,7 @@ public class OpticalFlow {
0.0
,
// double max_rms,
0.0
,
// double max_rms,
debug_level
);
// int debug_level)
debug_level
);
// int debug_level)
}
}
if
(
lma_rms
[
0
]
>
maximal_series_rms
)
{
rmse_stats
.
add
(
lma_rms
[
0
]);
maximal_series_rms
=
lma_rms
[
0
];
}
dbg_rms_pre
[
i
]
=
lma_rms
[
0
];
dbg_rms_pre
[
i
]
=
lma_rms
[
0
];
ers_reference
.
addScene
(
scene_QuadClt
.
getImageName
(),
ers_reference
.
addScene
(
scene_QuadClt
.
getImageName
(),
scenes_xyzatr
[
i
][
0
],
scenes_xyzatr
[
i
][
0
],
...
@@ -7794,7 +7791,8 @@ public class OpticalFlow {
...
@@ -7794,7 +7791,8 @@ public class OpticalFlow {
if
(
debug_level
>
-
1
)
{
if
(
debug_level
>
-
1
)
{
System
.
out
.
println
(
"Pass multi scene "
+
i
+
" (of "
+
scenes
.
length
+
") "
+
System
.
out
.
println
(
"Pass multi scene "
+
i
+
" (of "
+
scenes
.
length
+
") "
+
reference_QuadClt
.
getImageName
()
+
"/"
+
scene_QuadClt
.
getImageName
()+
reference_QuadClt
.
getImageName
()
+
"/"
+
scene_QuadClt
.
getImageName
()+
" Done. RMS="
+
lma_rms
[
0
]+
", maximal so far was "
+
maximal_series_rms
);
" Done. RMS="
+
lma_rms
[
0
]+
", maximal so far was "
+
rmse_stats
.
getMax
()+
", average was "
+
rmse_stats
.
getAverage
());
}
}
if
(
delete_scene_asap
)
{
if
(
delete_scene_asap
)
{
scenes
[
i
-
1
]
=
null
;
scenes
[
i
-
1
]
=
null
;
...
@@ -7802,7 +7800,7 @@ public class OpticalFlow {
...
@@ -7802,7 +7800,7 @@ public class OpticalFlow {
}
}
}
}
if
(
debug_level
>
-
3
)
{
if
(
debug_level
>
-
3
)
{
System
.
out
.
println
(
"All multi scene passes are Done. Maximal RMSE was "
+
maximal_series_rms
);
System
.
out
.
println
(
"All multi scene passes are Done. Maximal RMSE was "
+
rmse_stats
.
getMax
()+
", average was "
+
rmse_stats
.
getAverage
()
);
}
}
// boolean show_results = true;
// boolean show_results = true;
...
@@ -7922,9 +7920,7 @@ public class OpticalFlow {
...
@@ -7922,9 +7920,7 @@ public class OpticalFlow {
0.0
,
// double max_rms,
0.0
,
// double max_rms,
debug_level
);
// int debug_level)
debug_level
);
// int debug_level)
}
}
if
(
lma_rms
[
0
]
>
maximal_series_rms1
)
{
rmse_stats1
.
add
(
lma_rms
[
0
]);
maximal_series_rms1
=
lma_rms
[
0
];
}
dbg_rms
[
i
]
=
lma_rms
[
0
];
dbg_rms
[
i
]
=
lma_rms
[
0
];
ers_reference
.
addScene
(
ers_reference
.
addScene
(
scene_ts
,
scene_ts
,
...
@@ -7944,7 +7940,8 @@ public class OpticalFlow {
...
@@ -7944,7 +7940,8 @@ public class OpticalFlow {
if
(
debug_level
>
-
1
)
{
if
(
debug_level
>
-
1
)
{
System
.
out
.
println
(
"Pass 2 multi scene "
+
i
+
" (of "
+
scenes
.
length
+
") "
+
System
.
out
.
println
(
"Pass 2 multi scene "
+
i
+
" (of "
+
scenes
.
length
+
") "
+
reference_QuadClt
.
getImageName
()
+
"/"
+
scene_ts
+
reference_QuadClt
.
getImageName
()
+
"/"
+
scene_ts
+
" Done. RMS="
+
lma_rms
[
0
]+
", maximal so far was "
+
maximal_series_rms
);
" Done. RMS="
+
lma_rms
[
0
]+
", maximal so far was "
+
rmse_stats
.
getMax
()+
", average was "
+
rmse_stats
.
getAverage
());
}
}
if
(
delete_scene_asap
)
{
if
(
delete_scene_asap
)
{
scenes
[
i
-
1
]
=
null
;
scenes
[
i
-
1
]
=
null
;
...
@@ -7965,7 +7962,7 @@ public class OpticalFlow {
...
@@ -7965,7 +7962,7 @@ public class OpticalFlow {
rms_mean
/=
rms_num
;
rms_mean
/=
rms_num
;
if
(
debug_level
>
-
3
)
{
if
(
debug_level
>
-
3
)
{
System
.
out
.
println
(
"adjustSeries() rms_pre_mean="
+
rms_pre_mean
+
", rms_mean="
+
System
.
out
.
println
(
"adjustSeries() rms_pre_mean="
+
rms_pre_mean
+
", rms_mean="
+
rms_mean
+
", maximal RMSE="
+
maximal_series_rms1
);
rms_mean
+
", maximal RMSE="
+
rmse_stats1
.
getMax
()+
", average was "
+
rmse_stats1
.
getAverage
()
);
}
}
if
(
show_results
)
{
if
(
show_results
)
{
...
@@ -8125,8 +8122,8 @@ public class OpticalFlow {
...
@@ -8125,8 +8122,8 @@ public class OpticalFlow {
8
);
// int iscale) // 8
8
);
// int iscale) // 8
}
}
if
(
debug_level
>
-
3
)
{
if
(
debug_level
>
-
3
)
{
System
.
out
.
println
(
"adjustSeries() Done. Maximal RMSE in pass1 was "
+
maximal_series_rms
+
System
.
out
.
println
(
"adjustSeries() Done. Maximal RMSE in pass1 was "
+
rmse_stats
.
getMax
()+
", average was "
+
rmse_stats
.
getAverage
()
+
", in pass2 - "
+
maximal_series_rms1
);
", in pass2 - "
+
rmse_stats1
.
getMax
()+
", average was "
+
rmse_stats1
.
getAverage
()
);
}
}
}
}
...
...
src/main/java/com/elphel/imagej/tileprocessor/RMSEStats.java
0 → 100644
View file @
0de865d9
package
com
.
elphel
.
imagej
.
tileprocessor
;
public
class
RMSEStats
{
public
double
max
=
0
;
public
double
sum2
=
0
;
public
int
num
=
0
;
public
void
add
(
double
rmse
)
{
sum2
+=
rmse
*
rmse
;
num
++;
max
=
Math
.
max
(
max
,
rmse
);
}
public
double
getMax
()
{
return
max
;
}
public
int
getNum
()
{
return
num
;
}
public
double
getAverage
()
{
return
Math
.
sqrt
(
sum2
/
num
);
}
}
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