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
96ea490a
Commit
96ea490a
authored
Oct 16, 2023
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing for scene==ref_scene
parent
3430abee
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
17 deletions
+24
-17
OpticalFlow.java
...ain/java/com/elphel/imagej/tileprocessor/OpticalFlow.java
+4
-2
StructureFromMotion.java
.../elphel/imagej/tileprocessor/sfm/StructureFromMotion.java
+20
-15
No files found.
src/main/java/com/elphel/imagej/tileprocessor/OpticalFlow.java
View file @
96ea490a
...
...
@@ -4895,10 +4895,12 @@ public class OpticalFlow {
batch_mode, // final boolean batch_mode,
debugLevel); // final int debugLevel)
*/
int
num_avg_pairs
=
16
;
// number of scene pairs to average
// int num_avg_pairs = 16; // number of scene pairs to average
int
num_avg_pairs
=
1
;
// number of scene pairs to average
QuadCLT
[][]
scenes_pairs
=
new
QuadCLT
[
num_avg_pairs
][
2
];
for
(
int
i
=
0
;
i
<
num_avg_pairs
;
i
++)
{
scenes_pairs
[
i
][
0
]
=
quadCLTs
[
ref_index
-
1
-
i
];
// scenes_pairs[i][0] = quadCLTs[ref_index - 1 - i];
scenes_pairs
[
i
][
0
]
=
quadCLTs
[
ref_index
-
i
];
scenes_pairs
[
i
][
1
]
=
quadCLTs
[
earliest_scene
+
num_avg_pairs
-
1
-
i
];
}
double
[][]
sfm_dsn
=
StructureFromMotion
.
sfmPair
(
...
...
src/main/java/com/elphel/imagej/tileprocessor/sfm/StructureFromMotion.java
View file @
96ea490a
...
...
@@ -576,22 +576,27 @@ public class StructureFromMotion {
QuadCLT
[]
scenes
=
scene_pairs
[
npair
];
for
(
int
nscene
=
0
;
nscene
<
scenes
.
length
;
nscene
++)
{
String
ts
=
scenes
[
nscene
].
getImageName
();
if
((
ers_reference
.
getSceneXYZ
(
ts
)==
null
)
||
(
ers_reference
.
getSceneATR
(
ts
)==
null
))
{
System
.
out
.
println
(
"sfmPair(): no pose for timestamp "
+
ts
);
return
null
;
}
scenes_xyzatr
[
npair
][
nscene
]
=
new
double
[][]
{
ers_reference
.
getSceneXYZ
(
ts
),
ers_reference
.
getSceneATR
(
ts
)};
scenes_xyzatr_dt
[
npair
][
nscene
]=
new
double
[][]
{
ers_reference
.
getSceneErsXYZ_dt
(
ts
),
ers_reference
.
getSceneErsATR_dt
(
ts
)};
for
(
int
i
=
0
;
i
<
scenes_xyzatr_dt
[
nscene
].
length
;
i
++)
{
if
(
scenes_xyzatr_dt
[
npair
][
nscene
][
i
]
==
null
)
{
System
.
out
.
println
(
"sfmPair(): scene_xyzatr_dt["
+
i
+
"] == null"
);
scenes_xyzatr_dt
[
npair
][
nscene
][
i
]
=
ZERO3
.
clone
();
if
(
ts
.
equals
(
ref_scene
.
getImageName
()))
{
scenes_xyzatr
[
npair
][
nscene
]
=
ref_xyzatr
;
scenes_xyzatr_dt
[
npair
][
nscene
]=
ref_xyzatr_dt
;
}
else
{
if
((
ers_reference
.
getSceneXYZ
(
ts
)==
null
)
||
(
ers_reference
.
getSceneATR
(
ts
)==
null
))
{
System
.
out
.
println
(
"sfmPair(): no pose for timestamp "
+
ts
);
return
null
;
}
scenes_xyzatr
[
npair
][
nscene
]
=
new
double
[][]
{
ers_reference
.
getSceneXYZ
(
ts
),
ers_reference
.
getSceneATR
(
ts
)};
scenes_xyzatr_dt
[
npair
][
nscene
]=
new
double
[][]
{
ers_reference
.
getSceneErsXYZ_dt
(
ts
),
ers_reference
.
getSceneErsATR_dt
(
ts
)};
for
(
int
i
=
0
;
i
<
scenes_xyzatr_dt
[
npair
][
nscene
].
length
;
i
++)
{
if
(
scenes_xyzatr_dt
[
npair
][
nscene
][
i
]
==
null
)
{
System
.
out
.
println
(
"sfmPair(): scene_xyzatr_dt["
+
i
+
"] == null"
);
scenes_xyzatr_dt
[
npair
][
nscene
][
i
]
=
ZERO3
.
clone
();
}
}
}
}
}
}
...
...
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