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
54ecece0
Commit
54ecece0
authored
Jun 22, 2022
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
moving objects detection during pose matching
parent
2790d745
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
548 additions
and
118 deletions
+548
-118
CorrVector.java
...main/java/com/elphel/imagej/tileprocessor/CorrVector.java
+7
-2
IntersceneLma.java
...n/java/com/elphel/imagej/tileprocessor/IntersceneLma.java
+6
-6
IntersceneMatchParameters.java
...lphel/imagej/tileprocessor/IntersceneMatchParameters.java
+99
-2
OpticalFlow.java
...ain/java/com/elphel/imagej/tileprocessor/OpticalFlow.java
+433
-105
QuadCLT.java
src/main/java/com/elphel/imagej/tileprocessor/QuadCLT.java
+3
-3
No files found.
src/main/java/com/elphel/imagej/tileprocessor/CorrVector.java
View file @
54ecece0
...
@@ -519,7 +519,7 @@ public class CorrVector{ // TODO: Update to non-quad (extract to a file first)?
...
@@ -519,7 +519,7 @@ public class CorrVector{ // TODO: Update to non-quad (extract to a file first)?
public
double
[]
getIMU
()
{
public
double
[]
getIMU
()
{
// double [] imu = {vector[IMU_INDEX + 0], vector[IMU_INDEX + 1], vector[IMU_INDEX + 2],vector[IMU_INDEX + 3], vector[IMU_INDEX + 4], vector[IMU_INDEX + 5]};
// double [] imu = {vector[IMU_INDEX + 0], vector[IMU_INDEX + 1], vector[IMU_INDEX + 2],vector[IMU_INDEX + 3], vector[IMU_INDEX + 4], vector[IMU_INDEX + 5]};
int
indx
=
getZoomIndex
();
int
indx
=
get
IMUIndex
();
// Was bug: get
ZoomIndex();
double
[]
imu
=
new
double
[
6
];
double
[]
imu
=
new
double
[
6
];
for
(
int
i
=
0
;
i
<
imu
.
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
imu
.
length
;
i
++)
{
imu
[
i
]
=
vector
[
indx
+
i
];
imu
[
i
]
=
vector
[
indx
+
i
];
...
@@ -528,10 +528,15 @@ public class CorrVector{ // TODO: Update to non-quad (extract to a file first)?
...
@@ -528,10 +528,15 @@ public class CorrVector{ // TODO: Update to non-quad (extract to a file first)?
}
}
public
void
setIMU
(
double
[]
imu
)
{
public
void
setIMU
(
double
[]
imu
)
{
int
indx
=
getZoomIndex
();
int
indx
=
get
IMUIndex
();
// Was bug: get
ZoomIndex();
for
(
int
i
=
0
;
i
<
imu
.
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
imu
.
length
;
i
++)
{
vector
[
indx
+
i
]
=
imu
[
i
];
vector
[
indx
+
i
]
=
imu
[
i
];
}
}
System
.
out
.
print
(
"setIMU("
);
for
(
int
i
=
0
;
i
<
imu
.
length
;
i
++)
{
System
.
out
.
print
(
imu
[
i
]+
","
);
}
System
.
out
.
println
(
")"
);
}
}
public
double
setZoomsFromF
(
double
[]
f
)
{
// USED in lwir
public
double
setZoomsFromF
(
double
[]
f
)
{
// USED in lwir
...
...
src/main/java/com/elphel/imagej/tileprocessor/IntersceneLma.java
View file @
54ecece0
...
@@ -67,22 +67,22 @@ public class IntersceneLma {
...
@@ -67,22 +67,22 @@ public class IntersceneLma {
full_vector
[
ErsCorrection
.
DP_DAZ
],
full_vector
[
ErsCorrection
.
DP_DTL
],
full_vector
[
ErsCorrection
.
DP_DRL
]};
full_vector
[
ErsCorrection
.
DP_DAZ
],
full_vector
[
ErsCorrection
.
DP_DTL
],
full_vector
[
ErsCorrection
.
DP_DRL
]};
}
}
public
double
[]
getSceneERSXYZ
(
boolean
initial
)
{
public
double
[]
getSceneERSXYZ
(
boolean
initial
)
{
// never used
double
[]
full_vector
=
initial
?
backup_parameters_full:
getFullVector
(
parameters_vector
);
double
[]
full_vector
=
initial
?
backup_parameters_full:
getFullVector
(
parameters_vector
);
return
new
double
[]
{
return
new
double
[]
{
full_vector
[
ErsCorrection
.
DP_DSVX
],
full_vector
[
ErsCorrection
.
DP_DSVY
],
full_vector
[
ErsCorrection
.
DP_DSVZ
]};
full_vector
[
ErsCorrection
.
DP_DSVX
],
full_vector
[
ErsCorrection
.
DP_DSVY
],
full_vector
[
ErsCorrection
.
DP_DSVZ
]};
}
}
public
double
[]
getSceneERSATR
(
boolean
initial
)
{
public
double
[]
getSceneERSATR
(
boolean
initial
)
{
// never used
double
[]
full_vector
=
initial
?
backup_parameters_full:
getFullVector
(
parameters_vector
);
double
[]
full_vector
=
initial
?
backup_parameters_full:
getFullVector
(
parameters_vector
);
return
new
double
[]
{
return
new
double
[]
{
full_vector
[
ErsCorrection
.
DP_DSVAZ
],
full_vector
[
ErsCorrection
.
DP_DSVTL
],
full_vector
[
ErsCorrection
.
DP_DSVRL
]};
full_vector
[
ErsCorrection
.
DP_DSVAZ
],
full_vector
[
ErsCorrection
.
DP_DSVTL
],
full_vector
[
ErsCorrection
.
DP_DSVRL
]};
}
}
public
double
[]
getReferenceERSXYZ
(
boolean
initial
)
{
public
double
[]
getReferenceERSXYZ
(
boolean
initial
)
{
// never used
double
[]
full_vector
=
initial
?
backup_parameters_full:
getFullVector
(
parameters_vector
);
double
[]
full_vector
=
initial
?
backup_parameters_full:
getFullVector
(
parameters_vector
);
return
new
double
[]
{
return
new
double
[]
{
full_vector
[
ErsCorrection
.
DP_DSVX
],
full_vector
[
ErsCorrection
.
DP_DSVY
],
full_vector
[
ErsCorrection
.
DP_DSVZ
]};
full_vector
[
ErsCorrection
.
DP_DSVX
],
full_vector
[
ErsCorrection
.
DP_DSVY
],
full_vector
[
ErsCorrection
.
DP_DSVZ
]};
}
}
public
double
[]
getReferenceERSATR
(
boolean
initial
)
{
public
double
[]
getReferenceERSATR
(
boolean
initial
)
{
// never used
double
[]
full_vector
=
initial
?
backup_parameters_full:
getFullVector
(
parameters_vector
);
double
[]
full_vector
=
initial
?
backup_parameters_full:
getFullVector
(
parameters_vector
);
return
new
double
[]
{
return
new
double
[]
{
full_vector
[
ErsCorrection
.
DP_DSVAZ
],
full_vector
[
ErsCorrection
.
DP_DSVTL
],
full_vector
[
ErsCorrection
.
DP_DSVRL
]};
full_vector
[
ErsCorrection
.
DP_DSVAZ
],
full_vector
[
ErsCorrection
.
DP_DSVTL
],
full_vector
[
ErsCorrection
.
DP_DSVRL
]};
...
@@ -389,7 +389,7 @@ public class IntersceneLma {
...
@@ -389,7 +389,7 @@ public class IntersceneLma {
Matrix
wjtjlambda
=
new
Matrix
(
getWJtJlambda
(
Matrix
wjtjlambda
=
new
Matrix
(
getWJtJlambda
(
lambda
,
// *10, // temporary
lambda
,
// *10, // temporary
this
.
last_jt
));
// double [][] jt)
this
.
last_jt
));
// double [][] jt)
if
(
debug_level
>
2
)
{
if
(
debug_level
>
3
)
{
try
{
try
{
System
.
out
.
println
(
"getFxDerivs(): getChecksum(this.y_vector)="
+
getChecksum
(
this
.
y_vector
));
System
.
out
.
println
(
"getFxDerivs(): getChecksum(this.y_vector)="
+
getChecksum
(
this
.
y_vector
));
System
.
out
.
println
(
"getFxDerivs(): getChecksum(this.weights)="
+
getChecksum
(
this
.
weights
));
System
.
out
.
println
(
"getFxDerivs(): getChecksum(this.weights)="
+
getChecksum
(
this
.
weights
));
...
@@ -793,7 +793,7 @@ public class IntersceneLma {
...
@@ -793,7 +793,7 @@ public class IntersceneLma {
fx
[
i
+
2
*
macrotile_centers
.
length
]
=
vector
[
i
];
// - parameters_initial[i]; // scale will be combined with weights
fx
[
i
+
2
*
macrotile_centers
.
length
]
=
vector
[
i
];
// - parameters_initial[i]; // scale will be combined with weights
jt
[
i
][
i
+
2
*
macrotile_centers
.
length
]
=
1.0
;
// scale will be combined with weights
jt
[
i
][
i
+
2
*
macrotile_centers
.
length
]
=
1.0
;
// scale will be combined with weights
}
}
if
(
debug_level
>
2
)
{
if
(
debug_level
>
3
)
{
try
{
try
{
System
.
out
.
println
(
"getFxDerivs(): getChecksum(fx)="
+
getChecksum
(
fx
));
System
.
out
.
println
(
"getFxDerivs(): getChecksum(fx)="
+
getChecksum
(
fx
));
if
(
jt
!=
null
)
{
if
(
jt
!=
null
)
{
...
...
src/main/java/com/elphel/imagej/tileprocessor/IntersceneMatchParameters.java
View file @
54ecece0
This diff is collapsed.
Click to expand it.
src/main/java/com/elphel/imagej/tileprocessor/OpticalFlow.java
View file @
54ecece0
This diff is collapsed.
Click to expand it.
src/main/java/com/elphel/imagej/tileprocessor/QuadCLT.java
View file @
54ecece0
...
@@ -2045,6 +2045,7 @@ public class QuadCLT extends QuadCLTCPU {
...
@@ -2045,6 +2045,7 @@ public class QuadCLT extends QuadCLTCPU {
final
double
[]
scene_xyz
,
// camera center in world coordinates
final
double
[]
scene_xyz
,
// camera center in world coordinates
final
double
[]
scene_atr
,
// camera orientation relative to world frame
final
double
[]
scene_atr
,
// camera orientation relative to world frame
final
QuadCLT
scene
,
final
QuadCLT
scene
,
final
QuadCLT
ref_scene
,
// now - may be null - for testing if scene is rotated ref
final
boolean
toRGB
,
final
boolean
toRGB
,
String
suffix
,
String
suffix
,
int
threadsMax
,
int
threadsMax
,
...
@@ -2056,7 +2057,7 @@ public class QuadCLT extends QuadCLTCPU {
...
@@ -2056,7 +2057,7 @@ public class QuadCLT extends QuadCLTCPU {
scene_xyz
,
// final double [] scene_xyz, // camera center in world coordinates
scene_xyz
,
// final double [] scene_xyz, // camera center in world coordinates
scene_atr
,
// final double [] scene_atr, // camera orientation relative to world frame
scene_atr
,
// final double [] scene_atr, // camera orientation relative to world frame
scene
,
// final QuadCLT scene_QuadClt,
scene
,
// final QuadCLT scene_QuadClt,
null
,
// scene,
// final QuadCLT reference_QuadClt, // now - may be null - for testing if scene is rotated ref
ref_scene
,
// final QuadCLT reference_QuadClt, // now - may be null - for testing if scene is rotated ref
threadsMax
);
// int threadsMax)
threadsMax
);
// int threadsMax)
int
rendered_width
=
scene
.
getErsCorrection
().
getSensorWH
()[
0
];
int
rendered_width
=
scene
.
getErsCorrection
().
getSensorWH
()[
0
];
if
(
full_woi_in
!=
null
)
{
if
(
full_woi_in
!=
null
)
{
...
@@ -2238,8 +2239,7 @@ public class QuadCLT extends QuadCLTCPU {
...
@@ -2238,8 +2239,7 @@ public class QuadCLT extends QuadCLTCPU {
return
null
;
return
null
;
}
}
saveQuadClt
();
// to re-load new set of Bayer images to the GPU (do nothing for CPU) and Geometry
// GPU-specific
// GPU-specific
boolean
showCoord
=
debugLevel
>
1
;
boolean
showCoord
=
debugLevel
>
1
;
boolean
is_mono
=
isMonochrome
();
boolean
is_mono
=
isMonochrome
();
...
...
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