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
ad220366
Commit
ad220366
authored
Feb 20, 2022
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debugging tiles with dual-maximums in correlation (FG/BG)
parent
8d033226
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
532 additions
and
135 deletions
+532
-135
BiQuadParameters.java
...ava/com/elphel/imagej/tileprocessor/BiQuadParameters.java
+16
-7
Corr2dLMA.java
src/main/java/com/elphel/imagej/tileprocessor/Corr2dLMA.java
+6
-2
Correlation2d.java
...n/java/com/elphel/imagej/tileprocessor/Correlation2d.java
+220
-23
ImageDtt.java
src/main/java/com/elphel/imagej/tileprocessor/ImageDtt.java
+151
-65
ImageDttParameters.java
...a/com/elphel/imagej/tileprocessor/ImageDttParameters.java
+45
-3
OpticalFlow.java
...ain/java/com/elphel/imagej/tileprocessor/OpticalFlow.java
+94
-35
No files found.
src/main/java/com/elphel/imagej/tileprocessor/BiQuadParameters.java
View file @
ad220366
...
@@ -254,6 +254,9 @@ public class BiQuadParameters {
...
@@ -254,6 +254,9 @@ public class BiQuadParameters {
public
int
mll_max_refines_pre
=
5
;
public
int
mll_max_refines_pre
=
5
;
public
double
mll_min_disp_change_lma
=
0.003
;
// stop re-measure when difference is below, LMA, 120 pairs
public
double
mll_min_disp_change_lma
=
0.003
;
// stop re-measure when difference is below, LMA, 120 pairs
public
int
mll_max_refines_lma
=
4
;
public
int
mll_max_refines_lma
=
4
;
public
int
mll_max_refines_bg
=
5
;
public
boolean
mll_generate_scene_outlines
=
false
;
// Uses 2 GB - change format, add dimensions (separate color for ref)
public
boolean
mll_generate_scene_outlines
=
false
;
// Uses 2 GB - change format, add dimensions (separate color for ref)
// Exporting ML files
// Exporting ML files
...
@@ -689,12 +692,14 @@ public class BiQuadParameters {
...
@@ -689,12 +692,14 @@ public class BiQuadParameters {
gd
.
addMessage
(
"Calculating GT Disparity"
);
gd
.
addMessage
(
"Calculating GT Disparity"
);
gd
.
addNumericField
(
"Min change of disparity (preliminary, 40 pairs/no LMA)"
,
this
.
mll_min_disp_change_pre
,
3
,
6
,
"pix"
,
gd
.
addNumericField
(
"Min change of disparity (preliminary, 40 pairs/no LMA)"
,
this
.
mll_min_disp_change_pre
,
3
,
6
,
"pix"
,
"Refine tile until disparity change falls below"
);
"Refine tile until disparity change falls below"
);
gd
.
addNumericField
(
"Number of
disparity refine passes (preliminary, 40 pairs/no LMA)"
,
this
.
mll_max_refines_pre
,
0
,
3
,
""
,
gd
.
addNumericField
(
"Number of
FG disparity refine passes (preliminary, 40 pairs/no LMA)"
,
this
.
mll_max_refines_pre
,
0
,
3
,
""
,
"Abandon disparity refinement for tiles where disparity does not converge after this number of passes"
);
"Abandon disparity refinement for tiles where disparity does not converge after this number of passes"
);
gd
.
addNumericField
(
"Min change of disparity (final, 120 pairs with LMA)"
,
this
.
mll_min_disp_change_lma
,
3
,
6
,
"pix"
,
gd
.
addNumericField
(
"Min change of disparity (final, 120 pairs with LMA)"
,
this
.
mll_min_disp_change_lma
,
3
,
6
,
"pix"
,
"Refine tile until disparity change falls below"
);
"Refine tile until disparity change falls below"
);
gd
.
addNumericField
(
"Number of
disparity refine passes (final, 120 pairs with LMA)"
,
this
.
mll_max_refines_lma
,
0
,
3
,
""
,
gd
.
addNumericField
(
"Number of
FG disparity refine passes (final, 120 pairs with LMA)"
,
this
.
mll_max_refines_lma
,
0
,
3
,
""
,
"Abandon disparity refinement for tiles where disparity does not converge after this number of passes"
);
"Abandon disparity refinement for tiles where disparity does not converge after this number of passes"
);
gd
.
addNumericField
(
"Number of BG disparity refine passes (final, 120 pairs with LMA)"
,
this
.
mll_max_refines_bg
,
0
,
3
,
""
,
"Measure BG disparity for the tiles that have dual correlation maximums"
);
gd
.
addCheckbox
(
"Generate scene outlines"
,
this
.
mll_generate_scene_outlines
,
gd
.
addCheckbox
(
"Generate scene outlines"
,
this
.
mll_generate_scene_outlines
,
"Generate and save scene outlines for scene series (need to change format, it is 2GB with uncompressed Tiff)"
);
"Generate and save scene outlines for scene series (need to change format, it is 2GB with uncompressed Tiff)"
);
...
@@ -997,6 +1002,7 @@ public class BiQuadParameters {
...
@@ -997,6 +1002,7 @@ public class BiQuadParameters {
this
.
mll_max_refines_pre
=
(
int
)
gd
.
getNextNumber
();
this
.
mll_max_refines_pre
=
(
int
)
gd
.
getNextNumber
();
this
.
mll_min_disp_change_lma
=
gd
.
getNextNumber
();
this
.
mll_min_disp_change_lma
=
gd
.
getNextNumber
();
this
.
mll_max_refines_lma
=
(
int
)
gd
.
getNextNumber
();
this
.
mll_max_refines_lma
=
(
int
)
gd
.
getNextNumber
();
this
.
mll_max_refines_bg
=
(
int
)
gd
.
getNextNumber
();
this
.
mll_generate_scene_outlines
=
gd
.
getNextBoolean
();
this
.
mll_generate_scene_outlines
=
gd
.
getNextBoolean
();
this
.
mll_add_combo
=
gd
.
getNextBoolean
();
this
.
mll_add_combo
=
gd
.
getNextBoolean
();
...
@@ -1246,7 +1252,8 @@ public class BiQuadParameters {
...
@@ -1246,7 +1252,8 @@ public class BiQuadParameters {
properties
.
setProperty
(
prefix
+
"mll_max_refines_pre"
,
this
.
mll_max_refines_pre
+
""
);
properties
.
setProperty
(
prefix
+
"mll_max_refines_pre"
,
this
.
mll_max_refines_pre
+
""
);
properties
.
setProperty
(
prefix
+
"mll_min_disp_change_lma"
,
this
.
mll_min_disp_change_lma
+
""
);
properties
.
setProperty
(
prefix
+
"mll_min_disp_change_lma"
,
this
.
mll_min_disp_change_lma
+
""
);
properties
.
setProperty
(
prefix
+
"mll_max_refines_lma"
,
this
.
mll_max_refines_lma
+
""
);
properties
.
setProperty
(
prefix
+
"mll_max_refines_lma"
,
this
.
mll_max_refines_lma
+
""
);
properties
.
setProperty
(
prefix
+
"mll_generate_scene_outlines"
,
this
.
mll_generate_scene_outlines
+
""
);
properties
.
setProperty
(
prefix
+
"mll_max_refines_bg"
,
this
.
mll_max_refines_bg
+
""
);
properties
.
setProperty
(
prefix
+
"mll_generate_scene_outlines"
,
this
.
mll_generate_scene_outlines
+
""
);
properties
.
setProperty
(
prefix
+
"mll_add_combo"
,
this
.
mll_add_combo
+
""
);
properties
.
setProperty
(
prefix
+
"mll_add_combo"
,
this
.
mll_add_combo
+
""
);
properties
.
setProperty
(
prefix
+
"mll_save_accum"
,
this
.
mll_save_accum
+
""
);
properties
.
setProperty
(
prefix
+
"mll_save_accum"
,
this
.
mll_save_accum
+
""
);
...
@@ -1492,6 +1499,7 @@ public class BiQuadParameters {
...
@@ -1492,6 +1499,7 @@ public class BiQuadParameters {
if
(
properties
.
getProperty
(
prefix
+
"mll_max_refines_pre"
)!=
null
)
this
.
mll_max_refines_pre
=
Integer
.
parseInt
(
properties
.
getProperty
(
prefix
+
"mll_max_refines_pre"
));
if
(
properties
.
getProperty
(
prefix
+
"mll_max_refines_pre"
)!=
null
)
this
.
mll_max_refines_pre
=
Integer
.
parseInt
(
properties
.
getProperty
(
prefix
+
"mll_max_refines_pre"
));
if
(
properties
.
getProperty
(
prefix
+
"mll_min_disp_change_lma"
)!=
null
)
this
.
mll_min_disp_change_lma
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"mll_min_disp_change_lma"
));
if
(
properties
.
getProperty
(
prefix
+
"mll_min_disp_change_lma"
)!=
null
)
this
.
mll_min_disp_change_lma
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"mll_min_disp_change_lma"
));
if
(
properties
.
getProperty
(
prefix
+
"mll_max_refines_lma"
)!=
null
)
this
.
mll_max_refines_lma
=
Integer
.
parseInt
(
properties
.
getProperty
(
prefix
+
"mll_max_refines_lma"
));
if
(
properties
.
getProperty
(
prefix
+
"mll_max_refines_lma"
)!=
null
)
this
.
mll_max_refines_lma
=
Integer
.
parseInt
(
properties
.
getProperty
(
prefix
+
"mll_max_refines_lma"
));
if
(
properties
.
getProperty
(
prefix
+
"mll_max_refines_bg"
)!=
null
)
this
.
mll_max_refines_bg
=
Integer
.
parseInt
(
properties
.
getProperty
(
prefix
+
"mll_max_refines_bg"
));
if
(
properties
.
getProperty
(
prefix
+
"mll_generate_scene_outlines"
)!=
null
)
this
.
mll_generate_scene_outlines
=
Boolean
.
parseBoolean
(
properties
.
getProperty
(
prefix
+
"mll_generate_scene_outlines"
));
if
(
properties
.
getProperty
(
prefix
+
"mll_generate_scene_outlines"
)!=
null
)
this
.
mll_generate_scene_outlines
=
Boolean
.
parseBoolean
(
properties
.
getProperty
(
prefix
+
"mll_generate_scene_outlines"
));
if
(
properties
.
getProperty
(
prefix
+
"mll_add_combo"
)!=
null
)
this
.
mll_add_combo
=
Boolean
.
parseBoolean
(
properties
.
getProperty
(
prefix
+
"mll_add_combo"
));
if
(
properties
.
getProperty
(
prefix
+
"mll_add_combo"
)!=
null
)
this
.
mll_add_combo
=
Boolean
.
parseBoolean
(
properties
.
getProperty
(
prefix
+
"mll_add_combo"
));
...
@@ -1738,6 +1746,7 @@ public class BiQuadParameters {
...
@@ -1738,6 +1746,7 @@ public class BiQuadParameters {
bqp
.
mll_max_refines_pre
=
this
.
mll_max_refines_pre
;
bqp
.
mll_max_refines_pre
=
this
.
mll_max_refines_pre
;
bqp
.
mll_min_disp_change_lma
=
this
.
mll_min_disp_change_lma
;
bqp
.
mll_min_disp_change_lma
=
this
.
mll_min_disp_change_lma
;
bqp
.
mll_max_refines_lma
=
this
.
mll_max_refines_lma
;
bqp
.
mll_max_refines_lma
=
this
.
mll_max_refines_lma
;
bqp
.
mll_max_refines_bg
=
this
.
mll_max_refines_bg
;
bqp
.
mll_generate_scene_outlines
=
this
.
mll_generate_scene_outlines
;
bqp
.
mll_generate_scene_outlines
=
this
.
mll_generate_scene_outlines
;
bqp
.
mll_add_combo
=
this
.
mll_add_combo
;
bqp
.
mll_add_combo
=
this
.
mll_add_combo
;
...
...
src/main/java/com/elphel/imagej/tileprocessor/Corr2dLMA.java
View file @
ad220366
...
@@ -121,7 +121,7 @@ public class Corr2dLMA {
...
@@ -121,7 +121,7 @@ public class Corr2dLMA {
private
int
[]
used_cams_rmap
;
// variable-length list of used cameras numbers
private
int
[]
used_cams_rmap
;
// variable-length list of used cameras numbers
private
int
[][]
used_pairs_map
;
// [tile][pair] -1 for unused pairs, >=0 for used ones
private
int
[][]
used_pairs_map
;
// [tile][pair] -1 for unused pairs, >=0 for used ones
private
boolean
[]
last_common_scale
=
null
;
//When switching from common to individual the
private
boolean
[]
last_common_scale
=
null
;
//
new boolean[1]; //
When switching from common to individual the
// scale[0] is cloned, reverse - averaged to [0]
// scale[0] is cloned, reverse - averaged to [0]
private
boolean
[]
used_tiles
;
private
boolean
[]
used_tiles
;
...
@@ -599,6 +599,10 @@ public class Corr2dLMA {
...
@@ -599,6 +599,10 @@ public class Corr2dLMA {
adjust_disparities
=
new
boolean
[
numMax
];
adjust_disparities
=
new
boolean
[
numMax
];
Arrays
.
fill
(
adjust_disparities
,
true
);
Arrays
.
fill
(
adjust_disparities
,
true
);
}
}
if
(
last_common_scale
==
null
)
{
// first time - same as it was {false, ...,false}
last_common_scale
=
new
boolean
[
numMax
];
Arrays
.
fill
(
last_common_scale
,
false
);
}
/// double [][] disp_str = disp_str_all[0]; //FIXME: ****************
/// double [][] disp_str = disp_str_all[0]; //FIXME: ****************
adjust_lazyeye_ortho
=
adjust_lazyeye_par
;
// simplify relations for the calculated/dependent parameters
adjust_lazyeye_ortho
=
adjust_lazyeye_par
;
// simplify relations for the calculated/dependent parameters
...
@@ -2633,7 +2637,7 @@ public class Corr2dLMA {
...
@@ -2633,7 +2637,7 @@ public class Corr2dLMA {
double
[][]
abc
=
getABCTile
(
nmax
);
// nmax
double
[][]
abc
=
getABCTile
(
nmax
);
// nmax
for
(
int
tile
=
0
;
tile
<
numTiles
;
tile
++)
{
for
(
int
tile
=
0
;
tile
<
numTiles
;
tile
++)
{
int
offs
=
(
tile
*
numMax
+
nmax
)
*
tile_params
;
int
offs
=
(
tile
*
numMax
+
nmax
)
*
tile_params
;
ds
[
nmax
][
tile
][
0
]
=
Double
.
NaN
+
0
;
ds
[
nmax
][
tile
][
0
]
=
Double
.
NaN
;
if
(
Double
.
isNaN
(
maxmin_amp
[
tile
][
0
]))
{
if
(
Double
.
isNaN
(
maxmin_amp
[
tile
][
0
]))
{
continue
;
continue
;
}
}
...
...
src/main/java/com/elphel/imagej/tileprocessor/Correlation2d.java
View file @
ad220366
This diff is collapsed.
Click to expand it.
src/main/java/com/elphel/imagej/tileprocessor/ImageDtt.java
View file @
ad220366
This diff is collapsed.
Click to expand it.
src/main/java/com/elphel/imagej/tileprocessor/ImageDttParameters.java
View file @
ad220366
This diff is collapsed.
Click to expand it.
src/main/java/com/elphel/imagej/tileprocessor/OpticalFlow.java
View file @
ad220366
This diff is collapsed.
Click to expand it.
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