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
4aa60524
Commit
4aa60524
authored
May 12, 2025
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added average roll
parent
7edcdbe5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
6 deletions
+21
-6
CuasCenterLma.java
src/main/java/com/elphel/imagej/cuas/CuasCenterLma.java
+19
-5
OpticalFlow.java
...ain/java/com/elphel/imagej/tileprocessor/OpticalFlow.java
+2
-1
No files found.
src/main/java/com/elphel/imagej/cuas/CuasCenterLma.java
View file @
4aa60524
...
@@ -35,9 +35,9 @@ public class CuasCenterLma {
...
@@ -35,9 +35,9 @@ public class CuasCenterLma {
private
int
[]
sel_par_index
=
null
;
private
int
[]
sel_par_index
=
null
;
private
int
[]
sel_par_rindex
=
null
;
private
int
[]
sel_par_rindex
=
null
;
p
ublic
double
[]
parameters_vector
=
null
;
p
rivate
double
[]
parameters_vector
=
null
;
p
ublic
double
[]
full_parameters_vector
=
null
;
p
rivate
double
[]
full_parameters_vector
=
null
;
private
double
roll_average
=
0
;
private
double
[]
last_rms
=
null
;
// {rms, rms_pure}, matching this.vector
private
double
[]
last_rms
=
null
;
// {rms, rms_pure}, matching this.vector
private
double
[]
good_or_bad_rms
=
null
;
// just for diagnostics, to read last (failed) rms
private
double
[]
good_or_bad_rms
=
null
;
// just for diagnostics, to read last (failed) rms
private
double
[]
initial_rms
=
null
;
// {rms, rms_pure}, first-calcualted rms
private
double
[]
initial_rms
=
null
;
// {rms, rms_pure}, first-calcualted rms
...
@@ -77,6 +77,7 @@ public class CuasCenterLma {
...
@@ -77,6 +77,7 @@ public class CuasCenterLma {
cuasCenterLma
.
getRMS
()+
" ("
+
cuasCenterLma
.
getInitialRMS
()+
")"
);
cuasCenterLma
.
getRMS
()+
" ("
+
cuasCenterLma
.
getInitialRMS
()+
")"
);
System
.
out
.
println
(
"azimuth_center = "
+
rslt
[
0
][
0
]);
System
.
out
.
println
(
"azimuth_center = "
+
rslt
[
0
][
0
]);
System
.
out
.
println
(
" tilt_center = "
+
rslt
[
0
][
1
]);
System
.
out
.
println
(
" tilt_center = "
+
rslt
[
0
][
1
]);
System
.
out
.
println
(
" average roll = "
+
rslt
[
0
][
2
]);
System
.
out
.
println
(
"azimuth_radius = "
+
rslt
[
1
][
0
]);
System
.
out
.
println
(
"azimuth_radius = "
+
rslt
[
1
][
0
]);
System
.
out
.
println
(
" tilt_radius = "
+
rslt
[
1
][
1
]);
System
.
out
.
println
(
" tilt_radius = "
+
rslt
[
1
][
1
]);
}
}
...
@@ -226,7 +227,16 @@ public class CuasCenterLma {
...
@@ -226,7 +227,16 @@ public class CuasCenterLma {
last_rms
);
// final double [] rms_fp // null or [2]
last_rms
);
// final double [] rms_fp // null or [2]
initial_rms
=
last_rms
.
clone
();
initial_rms
=
last_rms
.
clone
();
good_or_bad_rms
=
this
.
last_rms
.
clone
();
good_or_bad_rms
=
this
.
last_rms
.
clone
();
// calculate average roll
double
cos_sum
=
0
,
sin_sum
=
0
;
for
(
int
i
=
0
;
i
<
scene_indices
.
length
;
i
++)
{
int
nscene
=
scene_indices
[
i
];
double
roll
=
scenes_atr
[
nscene
][
2
];
cos_sum
+=
Math
.
cos
(
roll
);
sin_sum
+=
Math
.
sin
(
roll
);
}
roll_average
=
Math
.
atan2
(
sin_sum
,
cos_sum
);
return
0
;
return
0
;
}
}
...
@@ -634,7 +644,7 @@ public class CuasCenterLma {
...
@@ -634,7 +644,7 @@ public class CuasCenterLma {
return
rslt
;
return
rslt
;
}
}
public
double
[]
getCenter
()
{
public
double
[]
getCenter
()
{
return
new
double
[]
{
full_parameters_vector
[
PARAM_AZIMUTH_CENTER
],
full_parameters_vector
[
PARAM_TILT_CENTER
]};
return
new
double
[]
{
full_parameters_vector
[
PARAM_AZIMUTH_CENTER
],
full_parameters_vector
[
PARAM_TILT_CENTER
]
,
roll_average
};
}
}
public
double
[]
getRadius
()
{
public
double
[]
getRadius
()
{
return
new
double
[]
{
full_parameters_vector
[
PARAM_AZIMUTH_RADIUS
],
full_parameters_vector
[
PARAM_TILT_RADIUS
]};
return
new
double
[]
{
full_parameters_vector
[
PARAM_AZIMUTH_RADIUS
],
full_parameters_vector
[
PARAM_TILT_RADIUS
]};
...
@@ -646,5 +656,9 @@ public class CuasCenterLma {
...
@@ -646,5 +656,9 @@ public class CuasCenterLma {
return
initial_rms
[
0
];
return
initial_rms
[
0
];
}
}
public
double
getAverageRoll
()
{
return
roll_average
;
}
}
}
src/main/java/com/elphel/imagej/tileprocessor/OpticalFlow.java
View file @
4aa60524
...
@@ -5595,8 +5595,9 @@ public class OpticalFlow {
...
@@ -5595,8 +5595,9 @@ public class OpticalFlow {
}
}
}
}
boolean
extract_center_orientation
=
true
;
boolean
extract_center_orientation
=
true
;
double
[][]
center_ATR
=
null
;
// {{center_A, center_T, average_R},{radius_A, radius_T}}
if
(
extract_center_orientation
&&
clt_parameters
.
imp
.
lock_position
)
{
if
(
extract_center_orientation
&&
clt_parameters
.
imp
.
lock_position
)
{
double
[][]
center_ATR
=
CuasCenterLma
.
getCenterATR
(
center_ATR
=
CuasCenterLma
.
getCenterATR
(
quadCLTs
,
// QuadCLT [] quadCLTs,
quadCLTs
,
// QuadCLT [] quadCLTs,
ref_index
,
//int ref_index,
ref_index
,
//int ref_index,
new
int
[]
{
earliest_scene
,
last_index
},
//int [] range,
new
int
[]
{
earliest_scene
,
last_index
},
//int [] range,
...
...
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