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
54e00356
Commit
54e00356
authored
Jan 25, 2024
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improving mount correction, implementing gyro (omegas) correction
parent
76f96ef8
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
244 additions
and
21 deletions
+244
-21
IntersceneMatchParameters.java
...lphel/imagej/tileprocessor/IntersceneMatchParameters.java
+63
-2
OpticalFlow.java
...ain/java/com/elphel/imagej/tileprocessor/OpticalFlow.java
+3
-0
QuadCLTCPU.java
...main/java/com/elphel/imagej/tileprocessor/QuadCLTCPU.java
+141
-14
QuaternionLma.java
...n/java/com/elphel/imagej/tileprocessor/QuaternionLma.java
+37
-5
No files found.
src/main/java/com/elphel/imagej/tileprocessor/IntersceneMatchParameters.java
View file @
54e00356
This diff is collapsed.
Click to expand it.
src/main/java/com/elphel/imagej/tileprocessor/OpticalFlow.java
View file @
54e00356
...
...
@@ -4659,7 +4659,10 @@ public class OpticalFlow {
// skip completely if no color or mono, tiff or video
boolean
adjust_imu_orient
=
clt_parameters
.
imp
.
adjust_imu_orient
;
// calculate camera orientation correction from predicted by IMS
boolean
calc_quat_corr
=
clt_parameters
.
imp
.
calc_quat_corr
;
// calculate camera orientation correction from predicted by IMS
// apply_quat_corr used inside getGroundIns() - used when generating output
// boolean apply_quat_corr = clt_parameters.imp.apply_quat_corr; // apply camera orientation correction from predicted by IMS
boolean
use_ims_rotation
=
clt_parameters
.
imp
.
use_quat_corr
;
// use internally (probably deprecated
...
...
src/main/java/com/elphel/imagej/tileprocessor/QuadCLTCPU.java
View file @
54e00356
This diff is collapsed.
Click to expand it.
src/main/java/com/elphel/imagej/tileprocessor/QuaternionLma.java
View file @
54e00356
...
...
@@ -221,12 +221,13 @@ public class QuaternionLma {
debug_level
);
// final int debug_level);
return
;
}
//MODE_XYZQ
N
=
vect_x
.
length
;
this
.
mode
=
mode
;
samples
=
3
+
quat0
.
length
;
samples_x
=
7
;
pure_weight
=
1.0
-
reg_w
;
int
extra_samples
=
0
;
// (quat0.length < 4)? 0:REGLEN;
int
extra_samples
=
(
reg_w
>
0
)
?
quat0
.
length
:
0
;
// (quat0.length < 4)? 0:REGLEN;
x_vector
=
new
double
[
samples_x
*
N
];
y_vector
=
new
double
[
samples
*
N
+
extra_samples
];
weights
=
new
double
[
samples
*
N
+
extra_samples
];
...
...
@@ -285,9 +286,12 @@ public class QuaternionLma {
}
double
k
=
(
pure_weight
)/
sw
;
for
(
int
i
=
0
;
i
<
weights
.
length
;
i
++)
weights
[
i
]
*=
k
;
if
(
extra_samples
>
0
)
{
weights
[
samples
*
N
]
=
1.0
-
pure_weight
;
y_vector
[
samples
*
N
]
=
1.0
;
if
(
extra_samples
>
0
)
{
double
w
=
(
1.0
-
pure_weight
)/
parameters_vector
.
length
;
for
(
int
i
=
0
;
i
<
parameters_vector
.
length
;
i
++)
{
weights
[
samples
*
N
+
i
]
=
w
;
y_vector
[
samples
*
N
]
=
0.0
;
// or target value
}
}
last_jt
=
new
double
[
parameters_vector
.
length
][];
if
(
debug_level
>
0
)
{
...
...
@@ -387,7 +391,7 @@ public class QuaternionLma {
samples
=
7
;
samples_x
=
7
;
pure_weight
=
1.0
-
reg_w
;
int
extra_samples
=
0
;
// (quat0.length < 4)? 0:REGLEN;
int
extra_samples
=
0
;
// (
reg_w > 0)? quat0.length:0; // (
quat0.length < 4)? 0:REGLEN;
x_vector
=
new
double
[
samples
*
N
];
y_vector
=
new
double
[
samples
*
N
+
extra_samples
];
y_inv_vector
=
new
double
[
samples_x
*
N
+
extra_samples
];
...
...
@@ -1130,6 +1134,14 @@ public class QuaternionLma {
}
}
}
if
(
weights
.
length
>
N
*
samples
)
{
for
(
int
i
=
0
;
i
<
vector3
.
length
;
i
++)
{
fx
[
samples
*
N
+
i
]
=
vector3
[
i
];
if
(
jt
!=
null
)
{
jt
[
i
][
samples
*
N
+
i
]
=
1.0
;
}
}
}
return
fx
;
}
...
...
@@ -1563,6 +1575,26 @@ public class QuaternionLma {
return
rslt
[
0
]?
iter
:
-
1
;
}
public
double
[]
getMinMaxDiag
(
int
debug_level
){
double
[][]
jt
=
new
double
[
parameters_vector
.
length
][];
double
[]
fx
=
getFxDerivs
(
parameters_vector
,
// double [] vector,
jt
,
// final double [][] jt, // should be null or initialized with [vector.length][]
debug_level
);
// final int debug_level)
Matrix
wjtjlambda
=
new
Matrix
(
getWJtJlambda
(
0
,
// *10, // temporary
jt
));
// double [][] jt)
double
[]
mn_mx
=
{
Double
.
NaN
,
Double
.
NaN
};
for
(
int
i
=
0
;
i
<
parameters_vector
.
length
;
i
++)
{
double
d
=
wjtjlambda
.
get
(
i
,
i
);
if
(!(
d
>
mn_mx
[
0
]))
mn_mx
[
0
]
=
d
;
if
(!(
d
<
mn_mx
[
1
]))
mn_mx
[
1
]
=
d
;
}
return
mn_mx
;
}
private
boolean
[]
lmaStep
(
double
lambda
,
double
rms_diff
,
...
...
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