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
17f7b343
Commit
17f7b343
authored
Oct 07, 2021
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testing/debugging interscene
parent
58750471
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
318 additions
and
86 deletions
+318
-86
ErsCorrection.java
...n/java/com/elphel/imagej/tileprocessor/ErsCorrection.java
+1
-1
ImageDttCPU.java
...ain/java/com/elphel/imagej/tileprocessor/ImageDttCPU.java
+301
-76
OpticalFlow.java
...ain/java/com/elphel/imagej/tileprocessor/OpticalFlow.java
+11
-5
QuadCLTCPU.java
...main/java/com/elphel/imagej/tileprocessor/QuadCLTCPU.java
+2
-2
TwoQuadCLT.java
...main/java/com/elphel/imagej/tileprocessor/TwoQuadCLT.java
+3
-2
No files found.
src/main/java/com/elphel/imagej/tileprocessor/ErsCorrection.java
View file @
17f7b343
...
...
@@ -1959,7 +1959,7 @@ public class ErsCorrection extends GeometryCorrection {
double
[]
scene_xyz
,
double
[]
scene_atr
)
{
Rotation
ref_rotation
=
new
Rotation
(
RotationOrder
.
YXZ
,
ROT_CONV
,
reference_atr
[
0
],
reference_atr
[
1
],
reference_atr
[
2
]);
Rotation
ref_rotation
=
new
Rotation
(
RotationOrder
.
YXZ
,
ROT_CONV
,
reference_atr
[
0
],
reference_atr
[
1
],
reference_atr
[
2
]);
// null
Rotation
scene_rotation
=
new
Rotation
(
RotationOrder
.
YXZ
,
ROT_CONV
,
scene_atr
[
0
],
scene_atr
[
1
],
scene_atr
[
2
]);
Vector3D
ref_offset
=
new
Vector3D
(
reference_xyz
);
Vector3D
scene_offset
=
new
Vector3D
(
scene_xyz
);
...
...
src/main/java/com/elphel/imagej/tileprocessor/ImageDttCPU.java
View file @
17f7b343
This diff is collapsed.
Click to expand it.
src/main/java/com/elphel/imagej/tileprocessor/OpticalFlow.java
View file @
17f7b343
...
...
@@ -644,7 +644,7 @@ public class OpticalFlow {
-
1
);
//final int debug_level)
double
this_min_change
=
min_change
;
// (ntry < num_run_all)? 0.0: min_change;
boolean
ignore_worsening
=
ntry
<
num_ignore_worsening
;
// (num_run_all + 10);
if
(
debug_level
>
0
)
{
if
(
debug_level
>
0
)
{
//-2) { // was >0
System
.
out
.
println
(
"======== NTRY "
+
ntry
+
" ========"
);
}
flowXY_run
=
recalculateFlowXY
(
...
...
@@ -1517,7 +1517,7 @@ public class OpticalFlow {
}
int
iwidth
=
imax_tX
-
imin_tX
+
1
;
int
iheight
=
imax_tY
-
imin_tY
+
1
;
double
[][]
scene_slices
=
new
double
[
dsrbg_scene
.
length
][
iwidth
*
iheight
];
double
[][]
scene_slices
=
new
double
[
dsrbg_scene
.
length
][
iwidth
*
iheight
];
//OOM here
for
(
int
iY
=
0
;
iY
<
iheight
;
iY
++)
{
int
tY
=
imin_tY
+
iY
;
if
((
tY
>=
0
)
&&
(
tY
<
tilesY
))
{
...
...
@@ -3054,6 +3054,7 @@ public class OpticalFlow {
// modify LMA parameters to freeze reference ERS, remove pull on scene ERS
boolean
[]
param_select2
=
clt_parameters
.
ilp
.
ilma_lma_select
.
clone
();
// final boolean[] param_select,
double
[]
param_regweights2
=
clt_parameters
.
ilp
.
ilma_regularization_weights
;
// final double [] param_regweights,
boolean
delete_scene_asap
=
(
debug_level
<
10
);
// to save memory
// freeze reference ERS, free scene ERS
for
(
int
j
=
0
;
j
<
3
;
j
++)
{
param_select2
[
ErsCorrection
.
DP_DVX
+
j
]
=
false
;
...
...
@@ -3076,10 +3077,10 @@ public class OpticalFlow {
double
[]
new_from_last_atr
=
ers_scene_last_known
.
getSceneATR
(
scene_ts
);
// combine two rotations and two translations
System
.
out
.
println
(
"Processing scene "
+
i
);
double
[][]
combo_XYZATR
=
ErsCorrection
.
combineXYZATR
(
last_known_xyz
,
// double [] reference_xyz,
last_known_atr
,
// double [] reference_atr,
last_known_atr
,
// double [] reference_atr,
// null?
new_from_last_xyz
,
// double [] scene_xyz,
new_from_last_atr
);
// double [] scene_atr)
...
...
@@ -3114,12 +3115,17 @@ public class OpticalFlow {
System
.
out
.
println
(
"Pass multi scene "
+
i
+
" (of "
+
scenes
.
length
+
") "
+
reference_QuadClt
.
getImageName
()
+
"/"
+
scene_QuadClt
.
getImageName
()+
" Done."
);
}
if
(
delete_scene_asap
)
{
scenes
[
i
+
1
]
=
null
;
}
// Runtime.getRuntime().gc();
// System.out.println("Scene "+i+", --- Free memory="+Runtime.getRuntime().freeMemory()+" (of "+Runtime.getRuntime().totalMemory()+")");
}
reference_QuadClt
.
saveInterProperties
(
// save properties for interscene processing (extrinsics, ers, ...)
null
,
// String path, // full name with extension or w/o path to use x3d directory
debug_level
+
1
);
if
(
debug_level
>
-
1
)
{
if
(
!
delete_scene_asap
&&
(
debug_level
>
-
1
)
)
{
System
.
out
.
println
(
"adjustSeries(): preparing image set..."
);
int
nscenes
=
scenes
.
length
;
int
indx_ref
=
nscenes
-
1
;
...
...
src/main/java/com/elphel/imagej/tileprocessor/QuadCLTCPU.java
View file @
17f7b343
...
...
@@ -5525,7 +5525,7 @@ public class QuadCLTCPU {
tilesX
*(
2
*
image_dtt
.
transform_size
),
tilesY
*(
2
*
image_dtt
.
transform_size
),
true
,
image_name
+
sAux
()+
"-CORR-D"
+
clt_parameters
.
disparity
,
image_name
+
sAux
()+
"-CORR-D"
+
clt_parameters
.
disparity
+
"-FZ"
+
clt_parameters
.
getFatZero
(
isMonochrome
())
,
titles
);
}
}
...
...
@@ -5545,7 +5545,7 @@ public class QuadCLTCPU {
tilesX
*
(
clt_parameters
.
img_dtt
.
mcorr_comb_width
+
1
),
tilesY
*
(
clt_parameters
.
img_dtt
.
mcorr_comb_height
+
1
),
true
,
image_name
+
sAux
()+
"-COMBO-D"
+
clt_parameters
.
disparity
,
image_name
+
sAux
()+
"-COMBO-D"
+
clt_parameters
.
disparity
+
"-FZ"
+
clt_parameters
.
getFatZero
(
isMonochrome
())
,
titles
);
}
}
...
...
src/main/java/com/elphel/imagej/tileprocessor/TwoQuadCLT.java
View file @
17f7b343
...
...
@@ -909,7 +909,7 @@ public class TwoQuadCLT {
tilesX
*(
2
*
image_dtt
.
transform_size
),
tilesY
*(
2
*
image_dtt
.
transform_size
),
true
,
name
+
"-CORR-D"
+
clt_parameters
.
disparity
,
name
+
"-CORR-D"
+
clt_parameters
.
disparity
+
"-FZ"
+
clt_parameters
.
getFatZero
(
quadCLT_main
.
isMonochrome
())
,
titles
);
}
}
...
...
@@ -1799,7 +1799,8 @@ public class TwoQuadCLT {
tilesX
*(
2
*
image_dtt
.
transform_size
),
tilesY
*(
2
*
image_dtt
.
transform_size
),
true
,
name
+
"-CORR-D"
+
clt_parameters
.
disparity
,
name
+
"-CORR-D"
+
clt_parameters
.
disparity
+
"-FZ"
+
clt_parameters
.
getFatZero
(
quadCLT_main
.
isMonochrome
()),
titles
);
}
}
...
...
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