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
47bf5840
Commit
47bf5840
authored
Dec 28, 2023
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug with adjustment by non-reference scene
parent
b469f1c2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
66 additions
and
56 deletions
+66
-56
Interscene.java
...main/java/com/elphel/imagej/tileprocessor/Interscene.java
+64
-55
StructureFromMotion.java
.../elphel/imagej/tileprocessor/sfm/StructureFromMotion.java
+2
-1
No files found.
src/main/java/com/elphel/imagej/tileprocessor/Interscene.java
View file @
47bf5840
...
...
@@ -2267,8 +2267,9 @@ public class Interscene {
disable_ers
,
// boolean disable_ers,
min_max
,
// double [] min_max, // null or pair of minimal and maximal offsets
fail_reason
,
// int [] fail_reason, // null or int[1]: 0 - OK, 1 - LMA, 2 - min, 3 - max
quadCLTs
[
nscene0
],
// QuadCLT reference_QuadClt,
quadCLTs
[
ref_index
],
// QuadCLT ref_QuadClt, // reference scene for ref_disparity, zero xyz and atr
ref_disparity
,
// double [] ref_disparity, // null or alternative reference disparity
quadCLTs
[
nscene0
],
// QuadCLT reference_QuadClt,
pXpYD_ref
,
// double [][] pXpYD_ref, // pXpYD for the reference scene
reliable_ref
,
// boolean [] reliable_ref, // null or bitmask of reliable reference tiles
tp_tasks_ref
[
0
],
// TpTask[] tp_tasks_ref, // only (main if MB correction) tasks for FPN correction
...
...
@@ -2330,8 +2331,9 @@ public class Interscene {
disable_ers
,
// boolean disable_ers,
min_max
,
// double [] min_max, // null or pair of minimal and maximal offsets
fail_reason
,
// int [] fail_reason, // null or int[1]: 0 - OK, 1 - LMA, 2 - min, 3 - max
quadCLTs
[
nscene0
],
// QuadCLT reference_QuadClt,
quadCLTs
[
ref_index
],
//QuadCLT ref_QuadClt, // reference scene for ref_disparity, zero xyz and atr
ref_disparity
,
// double [] ref_disparity, // null or alternative reference disparity
quadCLTs
[
nscene0
],
// QuadCLT first_QuadClt, // First in comparison pair
pXpYD_ref
,
// double [][] pXpYD_ref, // pXpYD for the reference scene
reliable_ref
,
// boolean [] reliable_ref, // null or bitmask of reliable reference tiles
tp_tasks_ref
[
0
],
// TpTask[] tp_tasks_ref, // only (main if MB correction) tasks for FPN correction
...
...
@@ -2411,11 +2413,12 @@ public class Interscene {
clt_parameters
,
// CLTParameters clt_parameters,
true
,
// boolean initial_adjust,
false
,
// boolean fpn_disable, // disable fpn filter if images are known to be too close
disable_ers
,
// boolean disable_ers,
min_max
,
// double [] min_max, // null or pair of minimal and maximal offsets
fail_reason
,
// int [] fail_reason, // null or int[1]: 0 - OK, 1 - LMA, 2 - min, 3 - max
reference_QuadClt
,
// QuadCLT ref
erence_QuadClt,
disable_ers
,
// boolean disable_ers,
min_max
,
// double [] min_max, // null or pair of minimal and maximal offsets
fail_reason
,
// int [] fail_reason, // null or int[1]: 0 - OK, 1 - LMA, 2 - min, 3 - max
reference_QuadClt
,
// QuadCLT ref
_QuadClt, // reference scene for ref_disparity, zero xyz and atr
ref_disparity
,
// double [] ref_disparity, // null or alternative reference disparity
reference_QuadClt
,
// QuadCLT first_QuadClt, // First in comparison pair
pXpYD_ref
,
// double [][] pXpYD_ref, // pXpYD for the reference scene
reliable_ref
,
// boolean [] reliable_ref, // null or bitmask of reliable reference tiles
tp_tasks_ref2
[
0
],
// TpTask[] tp_tasks_ref, // only (main if MB correction) tasks for FPN correction
...
...
@@ -2441,8 +2444,9 @@ public class Interscene {
boolean
disable_ers
,
double
[]
min_max
,
// null or pair of minimal and maximal offsets
int
[]
fail_reason
,
// null or int[1]: 0 - OK, 1 - LMA, 2 - min, 3 - max
QuadCLT
ref
erence_QuadClt
,
// First in comparison pair, does not need to be reference?
QuadCLT
ref
_QuadClt
,
// reference scene for ref_disparity, zero xyz and atr
double
[]
ref_disparity
,
// null or alternative reference disparity
QuadCLT
first_QuadClt
,
// First in comparison pair, does not need to be reference?
double
[][]
pXpYD_ref
,
// pXpYD for the reference scene
boolean
[]
reliable_ref
,
// null or bitmask of reliable reference tiles
TpTask
[]
tp_tasks_ref
,
// only (main if MB correction) tasks for FPN correction
...
...
@@ -2495,8 +2499,9 @@ public class Interscene {
mb_max_gain
,
// double mb_max_gain,
min_max
,
// double [] min_max, // null or pair of minimal and maximal offsets
fail_reason
,
// int [] fail_reason, // null or int[1]: 0 - OK, 1 - LMA, 2 - min, 3 - max
ref
erence_QuadClt
,
// QuadCLT reference_QuadCLT,
ref
_QuadClt
,
// QuadCLT ref_scene, // Scene for which DSI (ref_disparity) is calculated
ref_disparity
,
// double [] ref_disparity, // null or alternative reference disparity
first_QuadClt
,
// QuadCLT reference_QuadCLT,
pXpYD_ref
,
// double [][] pXpYD_ref, // pXpYD for the reference scene
tp_tasks_ref
,
// TpTask[] tp_tasks_ref, // only (main if MB correction) tasks for FPN correction
scene_QuadClt
,
// QuadCLT scene_QuadCLT,
...
...
@@ -2526,7 +2531,7 @@ public class Interscene {
double
[][]
quad_strengths
=
getQuadStrengths
(
coord_motion
,
// double [][][] coord_motion,
gap_frac
,
//double gap_frac, // 0.25
reference
_QuadClt
.
getTileProcessor
().
getTilesX
());
// int tilesX);
first
_QuadClt
.
getTileProcessor
().
getTilesX
());
// int tilesX);
for
(
int
i
=
0
;
i
<
quad_strengths
[
0
].
length
;
i
++)
{
if
((
quad_strengths
[
0
][
i
]
<
min_quad_tiles
)
||
(
quad_strengths
[
1
][
i
]
<
min_quad_weight
))
{
disable_ers
=
true
;
...
...
@@ -2569,7 +2574,7 @@ public class Interscene {
ref_xyzatr
,
// _inv, // ref_xyzatr,
// reference atr, xyz are considered 0.0 not anymore?
scene_QuadClt
,
// final QuadCLT scene_QuadClt,
reference
_QuadClt
,
// final QuadCLT reference_QuadClt,
first
_QuadClt
,
// final QuadCLT reference_QuadClt,
param_select_mod
,
// param_select, // final boolean[] param_select,
param_regweights
,
// final double [] param_regweights,
coord_motion
[
1
],
// final double [][] vector_XYS, // optical flow X,Y, confidence obtained from the correlate2DIterate()
...
...
@@ -2637,8 +2642,9 @@ public class Interscene {
mb_max_gain
,
// double mb_max_gain,
min_max
,
// double [] min_max, // null or pair of minimal and maximal offsets
fail_reason
,
// int [] fail_reason, // null or int[1]: 0 - OK, 1 - LMA, 2 - min, 3 - max
reference_QuadClt
,
// QuadCLT reference_QuadCLT,
ref_disparity
,
// double [] ref_disparity, // null or alternative reference disparity
first_QuadClt
,
// QuadCLT ref_scene, // Scene for which DSI (ref_disparity) is calculated
ref_disparity
,
// double [] ref_disparity, // null or alternative reference disparity
first_QuadClt
,
// QuadCLT first_scene,
pXpYD_ref
,
// double [][] pXpYD_ref, // pXpYD for the reference scene
tp_tasks_ref
,
// TpTask[] tp_tasks_ref, // only (main if MB correction) tasks for FPN correction
scene_QuadClt
,
// QuadCLT scene_QuadCLT,
...
...
@@ -2655,7 +2661,7 @@ public class Interscene {
mb_vectors
,
// double [][] mb_vectors, // now [2][ntiles];
2
,
// int imp_debug_level,
debug_level
);
// 1); // -1); // int debug_level);
TileProcessor
tp
=
reference
_QuadClt
.
getTileProcessor
();
TileProcessor
tp
=
first
_QuadClt
.
getTileProcessor
();
int
tilesX
=
tp
.
getTilesX
();
int
tilesY
=
tp
.
getTilesY
();
...
...
@@ -2664,7 +2670,7 @@ public class Interscene {
tilesX
,
tilesY
,
true
,
scene_QuadClt
.
getImageName
()+
"-"
+
reference
_QuadClt
.
getImageName
()+
"-CORR-FPN"
,
scene_QuadClt
.
getImageName
()+
"-"
+
first
_QuadClt
.
getImageName
()+
"-CORR-FPN"
,
fpn_dbg_titles
);
}
if
(
show_corr_fpn
)
{
// repeat after last adjustment to get images
...
...
@@ -2688,8 +2694,9 @@ public class Interscene {
mb_max_gain
,
// double mb_max_gain,
null
,
// double [] min_max, // null or pair of minimal and maximal offsets
null
,
// int [] fail_reason, // null or int[1]: 0 - OK, 1 - LMA, 2 - min, 3 - max
reference_QuadClt
,
// QuadCLT reference_QuadCLT,
ref_disparity
,
// double [] ref_disparity, // null or alternative reference disparity
first_QuadClt
,
// QuadCLT ref_scene, // Scene for which DSI (ref_disparity) is calculated
ref_disparity
,
// double [] ref_disparity, // null or alternative reference disparity
first_QuadClt
,
// QuadCLT first_scene,
pXpYD_ref
,
// double [][] pXpYD_ref, // pXpYD for the reference scene
tp_tasks_ref
,
// TpTask[] tp_tasks_ref, // only (main if MB correction) tasks for FPN correction
scene_QuadClt
,
// QuadCLT scene_QuadCLT,
...
...
@@ -2706,7 +2713,7 @@ public class Interscene {
mb_vectors
,
// double [][] mb_vectors, // now [2][ntiles];
2
,
// int imp_debug_level,
debug_level
);
// 1); // -1); // int debug_level);
TileProcessor
tp
=
reference
_QuadClt
.
getTileProcessor
();
TileProcessor
tp
=
first
_QuadClt
.
getTileProcessor
();
int
tilesX
=
tp
.
getTilesX
();
int
tilesY
=
tp
.
getTilesY
();
...
...
@@ -2715,7 +2722,7 @@ public class Interscene {
tilesX
,
tilesY
,
true
,
scene_QuadClt
.
getImageName
()+
"-"
+
reference
_QuadClt
.
getImageName
()+
"-CORR-FPN"
,
scene_QuadClt
.
getImageName
()+
"-"
+
first
_QuadClt
.
getImageName
()+
"-CORR-FPN"
,
fpn_dbg_titles
);
}
if
(
clt_parameters
.
imp
.
debug_level
>
-
2
)
{
...
...
@@ -2845,8 +2852,9 @@ public class Interscene {
0
,
// mb_max_gain, // double mb_max_gain,
null
,
// double [] min_max, // null or pair of minimal and maximal offsets
null
,
// int [] fail_reason, // null or int[1]: 0 - OK, 1 - LMA, 2 - min, 3 - max
reference_QuadClt
,
// QuadCLT ref
erence_QuadCLT,
reference_QuadClt
,
// QuadCLT ref
_scene, // Scene for which DSI (ref_disparity) is calculated
ref_disparity
,
// null, // double [] ref_disparity, // null or alternative reference disparity
reference_QuadClt
,
// QuadCLT first_scene,
pXpYD_ref
,
// double [][] pXpYD_ref, // pXpYD for the reference scene 11653
tp_tasks_ref
,
// TpTask[] tp_tasks_ref, // only (main if MB correction) tasks for FPN correction
scene_QuadClt
,
// QuadCLT scene_QuadCLT,
...
...
@@ -2944,7 +2952,7 @@ public class Interscene {
* @param clt_parameters
* @param use3D when true, generate disparity difference in addition to average {pX,pY}
* @param mb_max_gain
* @param
ref
_scene
* @param
first
_scene
* @param ref_disparity
* @param pXpYD_ref
* @param tp_tasks_ref
...
...
@@ -2971,8 +2979,9 @@ public class Interscene {
double
mb_max_gain
,
double
[]
min_max
,
// null or pair of minimal and maximal offsets
int
[]
fail_reason
,
// null or int[1]: 0 - OK, 1 - LMA, 2 - min, 3 - max
QuadCLT
ref_scene
,
QuadCLT
ref_scene
,
// Scene for which DSI (ref_disparity) is calculated
double
[]
ref_disparity
,
// null or alternative reference disparity
QuadCLT
first_scene
,
// first in a pair, scene to compare to
double
[][]
pXpYD_ref
,
// pXpYD for the reference scene
TpTask
[]
tp_tasks_ref
,
// only (main if MB correction) tasks for FPN correction.
QuadCLT
scene
,
...
...
@@ -2993,10 +3002,10 @@ public class Interscene {
{
boolean
use3D_lma
=
clt_parameters
.
ilp
.
ilma_3d_lma
;
boolean
use3D_lma_tilt_only
=
clt_parameters
.
ilp
.
ilma_3d_tilt_only
;
if
(!
ref
_scene
.
hasGPU
())
{
if
(!
first
_scene
.
hasGPU
())
{
throw
new
IllegalArgumentException
(
"interCorrPair(): CPU mode not supported"
);
}
TileProcessor
tp
=
ref
_scene
.
getTileProcessor
();
TileProcessor
tp
=
first
_scene
.
getTileProcessor
();
// Temporary reusing same ref scene ******
boolean
scene_is_ref_test
=
clt_parameters
.
imp
.
scene_is_ref_test
;
// false; // true;
boolean
show_2d_correlations
=
clt_parameters
.
imp
.
show2dCorrelations
(
imp_debug_level
);
// true;
...
...
@@ -3032,9 +3041,9 @@ public class Interscene {
double
eq_level
=
clt_parameters
.
imp
.
eq_level
;
// 0.8; // equalize to (log) fraction of average/this strength
final
double
scene_disparity_cor
=
clt_parameters
.
imp
.
disparity_corr
;
// 04/07/2023 // 0.0;
final
double
gpu_sigma_corr
=
clt_parameters
.
getGpuCorrSigma
(
ref
_scene
.
isMonochrome
());
final
double
gpu_sigma_rb_corr
=
ref
_scene
.
isMonochrome
()?
1.0
:
clt_parameters
.
gpu_sigma_rb_corr
;
final
double
gpu_sigma_log_corr
=
clt_parameters
.
getGpuCorrLoGSigma
(
ref
_scene
.
isMonochrome
());
final
double
gpu_sigma_corr
=
clt_parameters
.
getGpuCorrSigma
(
first
_scene
.
isMonochrome
());
final
double
gpu_sigma_rb_corr
=
first
_scene
.
isMonochrome
()?
1.0
:
clt_parameters
.
gpu_sigma_rb_corr
;
final
double
gpu_sigma_log_corr
=
clt_parameters
.
getGpuCorrLoGSigma
(
first
_scene
.
isMonochrome
());
boolean
mb_en
=
clt_parameters
.
imp
.
mb_en
;
double
mb_tau
=
clt_parameters
.
imp
.
mb_tau
;
// 0.008; // time constant, sec
...
...
@@ -3052,7 +3061,7 @@ public class Interscene {
}
if
(
show_tptask_ref
)
{
if
(
tp_tasks_ref
!=
null
){
String
dbg_title
=
ref
_scene
.
getImageName
()+
"-ref"
;
String
dbg_title
=
first
_scene
.
getImageName
()+
"-ref"
;
TpTask
.
showTpTask
(
tp_tasks_ref
,
// TpTask[] tp_tasks,
tilesX
,
// int tilesX,
...
...
@@ -3063,17 +3072,17 @@ public class Interscene {
ImageDtt
image_dtt
;
image_dtt
=
new
ImageDtt
(
ref
_scene
.
getNumSensors
(),
// ,
first
_scene
.
getNumSensors
(),
// ,
clt_parameters
.
transform_size
,
clt_parameters
.
img_dtt
,
ref
_scene
.
isAux
(),
ref
_scene
.
isMonochrome
(),
ref
_scene
.
isLwir
(),
clt_parameters
.
getScaleStrength
(
ref
_scene
.
isAux
()),
ref
_scene
.
getGPU
());
first
_scene
.
isAux
(),
first
_scene
.
isMonochrome
(),
first
_scene
.
isLwir
(),
clt_parameters
.
getScaleStrength
(
first
_scene
.
isAux
()),
first
_scene
.
getGPU
());
image_dtt
.
getCorrelation2d
();
// initiate image_dtt.correlation2d, needed if disparity_map != null
if
(
ref
_scene
.
getGPU
()
!=
null
)
{
ref
_scene
.
getGPU
().
setGpu_debug_level
(
debug_level
-
4
);
// monitor GPU ops >=-1
if
(
first
_scene
.
getGPU
()
!=
null
)
{
first
_scene
.
getGPU
().
setGpu_debug_level
(
debug_level
-
4
);
// monitor GPU ops >=-1
}
final
double
disparity_corr
=
clt_parameters
.
imp
.
disparity_corr
;
// 04/07/2023 // 0.0; // (z_correction == 0) ? 0.0 : geometryCorrection.getDisparityFromZ(1.0/z_correction);
//ref_disparity
...
...
@@ -3190,7 +3199,7 @@ public class Interscene {
swd
+=
scene_disparity_strength
[
0
][
i
]
*
scene_disparity_strength
[
1
][
i
];
}
average_disparity
=
swd
/
sw
;
double
magic_scale
=
use3D_lma
?
1.0
:
ref
_scene
.
getTileProcessor
().
getMagicScale
();
double
magic_scale
=
use3D_lma
?
1.0
:
first
_scene
.
getTileProcessor
().
getMagicScale
();
for
(
int
i
=
0
;
i
<
scene_disparity_strength
[
0
].
length
;
i
++)
{
// scene_disparity_strength[0][i] = (scene_disparity_strength[0][i] - average_disparity) / average_absolute_disparity;
scene_disparity_strength
[
0
][
i
]
=
(
scene_disparity_strength
[
0
][
i
]
-
average_disparity
)
/
magic_scale
;
...
...
@@ -3205,15 +3214,15 @@ public class Interscene {
ref_disparity
,
// dls[0], // final double [] disparity_ref, // invalid tiles - NaN in disparity (maybe it should not be masked by margins?)
ZERO3
,
// scene_xyz, // final double [] scene_xyz, // camera center in world coordinates
ZERO3
,
// scene_atr, // final double [] scene_atr, // camera orientation relative to world frame
ref
_scene
,
// final QuadCLT scene_QuadClt,
ref
_scene
);
// final QuadCLT reference_QuadClt)
first
_scene
,
// final QuadCLT scene_QuadClt,
first
_scene
);
// final QuadCLT reference_QuadClt)
double
[][]
dbg_ref_pXpYD2
=
OpticalFlow
.
transformToScenePxPyD
(
// will be null for disparity == NaN, total size - tilesX*tilesY
null
,
// final Rectangle [] extra_woi, // show larger than sensor WOI (or null)
ref_disparity
,
// dls[0], // final double [] disparity_ref, // invalid tiles - NaN in disparity (maybe it should not be masked by margins?)
ZERO3
,
// scene_xyz, // final double [] scene_xyz, // camera center in world coordinates
new
double
[]
{
0
,
0
,
0.00001
},
// scene_atr, // final double [] scene_atr, // camera orientation relative to world frame
ref
_scene
,
// final QuadCLT scene_QuadClt,
ref
_scene
);
// final QuadCLT reference_QuadClt)
first
_scene
,
// final QuadCLT scene_QuadClt,
first
_scene
);
// final QuadCLT reference_QuadClt)
double
[][]
dbg_img
=
new
double
[
6
][
dbg_ref_pXpYD
.
length
];
for
(
int
i
=
0
;
i
<
dbg_img
.
length
;
i
++)
{
Arrays
.
fill
(
dbg_img
[
i
],
Double
.
NaN
);
...
...
@@ -3236,10 +3245,10 @@ public class Interscene {
tilesX
,
tilesY
,
true
,
scene
.
getImageName
()+
"-"
+
ref
_scene
.
getImageName
()+
"-transform_test"
,
scene
.
getImageName
()+
"-"
+
first
_scene
.
getImageName
()+
"-transform_test"
,
dbg_titles
);
System
.
out
.
println
(
"transform_test ref_scene: "
+
ref
_scene
.
getImageName
());
ref
_scene
.
getErsCorrection
().
printVectors
(
scene_xyz
,
scene_atr
);
System
.
out
.
println
(
"transform_test ref_scene: "
+
first
_scene
.
getImageName
());
first
_scene
.
getErsCorrection
().
printVectors
(
scene_xyz
,
scene_atr
);
}
...
...
@@ -3327,11 +3336,11 @@ public class Interscene {
}
if
(
show_render_ref
)
{
ImagePlus
imp_render_ref
=
ref
_scene
.
renderFromTD
(
ImagePlus
imp_render_ref
=
first
_scene
.
renderFromTD
(
-
1
,
// final int sensor_mask,
false
,
// boolean merge_channels,
clt_parameters
,
// CLTParameters clt_parameters,
clt_parameters
.
getColorProcParameters
(
ref
_scene
.
isAux
()),
//ColorProcParameters colorProcParameters,
clt_parameters
.
getColorProcParameters
(
first
_scene
.
isAux
()),
//ColorProcParameters colorProcParameters,
clt_parameters
.
getRGBParameters
(),
//EyesisCorrectionParameters.RGBParameters rgbParameters,
null
,
// int [] wh,
toRGB
,
// boolean toRGB,
...
...
@@ -3344,7 +3353,7 @@ public class Interscene {
-
1
,
// final int sensor_mask,
false
,
// boolean merge_channels,
clt_parameters
,
// CLTParameters clt_parameters,
clt_parameters
.
getColorProcParameters
(
ref
_scene
.
isAux
()),
//ColorProcParameters colorProcParameters,
clt_parameters
.
getColorProcParameters
(
first
_scene
.
isAux
()),
//ColorProcParameters colorProcParameters,
clt_parameters
.
getRGBParameters
(),
//EyesisCorrectionParameters.RGBParameters rgbParameters,
null
,
// int [] wh,
toRGB
,
// boolean toRGB,
...
...
@@ -3357,7 +3366,7 @@ public class Interscene {
float
[][]
foffsets
=
getInterCorrOffsetsDebug
(
tp_tasks_ref
,
// final TpTask[] tp_tasks_ref,
tp_tasks
[
0
],
// final TpTask[] tp_tasks,
ref
_scene
.
getNumSensors
(),
first
_scene
.
getNumSensors
(),
tilesX
,
// final int tilesX,
tilesY
);
// final int tilesY
for
(
int
i
=
0
;
(
i
<
dbg_corr_fpn
.
length
)
&&
(
i
<
foffsets
.
length
);
i
++)
{
...
...
@@ -3371,7 +3380,7 @@ public class Interscene {
fpn_max_offset
,
// final double max_offset,
tp_tasks_ref
,
// final TpTask[] tp_tasks_ref,
tp_tasks
[
0
],
// final TpTask[] tp_tasks,
ref
_scene
.
getNumSensors
(),
// final int numSens,
first
_scene
.
getNumSensors
(),
// final int numSens,
tilesX
,
// final int tilesX,
tilesY
);
// final int tilesY);
}
...
...
@@ -3381,7 +3390,7 @@ public class Interscene {
Double
.
NaN
,
// final double max_offset,
tp_tasks_ref
,
// final TpTask[] tp_tasks_ref,
tp_tasks
[
0
],
// final TpTask[] tp_tasks,
ref
_scene
.
getNumSensors
(),
// final int numSens,
first
_scene
.
getNumSensors
(),
// final int numSens,
tilesX
,
// final int tilesX,
tilesY
);
// final int tilesY);
if
(
offsets
==
null
)
{
...
...
@@ -3441,7 +3450,7 @@ public class Interscene {
double
min_str
=
all_fpn
?
clt_parameters
.
imp
.
min_str_fpn
:
clt_parameters
.
imp
.
min_str
;
double
min_str_sum
=
all_fpn
?
clt_parameters
.
imp
.
min_str_sum_fpn
:
clt_parameters
.
imp
.
min_str_sum
;
double
min_str_neib
=
all_fpn
?
clt_parameters
.
imp
.
min_str_neib_fpn
:
clt_parameters
.
imp
.
min_str_neib
;
double
corr_fz_inter
=
clt_parameters
.
getGpuFatZeroInter
(
ref
_scene
.
isMonochrome
());
double
corr_fz_inter
=
clt_parameters
.
getGpuFatZeroInter
(
first
_scene
.
isMonochrome
());
if
(
mb_en
&&
(
mb_vectors
!=
null
))
{
// increase fat zero when there is motion blur
corr_fz_inter
*=
8
;
}
...
...
@@ -3586,7 +3595,7 @@ public class Interscene {
tilesX
,
tilesY
,
true
,
scene
.
getImageName
()+
"-"
+
ref
_scene
.
getImageName
()+
"-coord_motion-eq"
,
scene
.
getImageName
()+
"-"
+
first
_scene
.
getImageName
()+
"-coord_motion-eq"
,
mvTitles
);
}
...
...
@@ -3594,7 +3603,7 @@ public class Interscene {
}
if
(
mov_en
)
{
String
debug_image_name
=
mov_debug_images
?
(
scene
.
getImageName
()+
"-"
+
ref
_scene
.
getImageName
()+
"-movements"
):
null
;
String
debug_image_name
=
mov_debug_images
?
(
scene
.
getImageName
()+
"-"
+
first
_scene
.
getImageName
()+
"-movements"
):
null
;
boolean
[]
move_mask
=
getMovementMask
(
clt_parameters
,
// CLTParameters clt_parameters,
coord_motion
[
1
],
// double [][] motion, // only x,y,w components
...
...
@@ -3641,7 +3650,7 @@ public class Interscene {
tilesX
*(
2
*
image_dtt
.
transform_size
),
tilesY
*(
2
*
image_dtt
.
transform_size
),
true
,
scene
.
getImageName
()+
"-"
+
ref
_scene
.
getImageName
()+
"-interscene"
,
scene
.
getImageName
()+
"-"
+
first
_scene
.
getImageName
()+
"-interscene"
,
titles
);
}
...
...
@@ -3690,7 +3699,7 @@ public class Interscene {
tilesX
,
tilesY
,
true
,
scene
.
getImageName
()+
"-"
+
ref
_scene
.
getImageName
()+
"-motion_vectors"
,
scene
.
getImageName
()+
"-"
+
first
_scene
.
getImageName
()+
"-motion_vectors"
,
titles
);
}
if
(
show_coord_motion
)
{
...
...
@@ -3721,7 +3730,7 @@ public class Interscene {
tilesX
,
tilesY
,
true
,
scene
.
getImageName
()+
"-"
+
ref
_scene
.
getImageName
()+
"-coord_motion"
,
scene
.
getImageName
()+
"-"
+
first
_scene
.
getImageName
()+
"-coord_motion"
,
mvTitles
);
}
if
(
debug_level
>
0
){
...
...
src/main/java/com/elphel/imagej/tileprocessor/sfm/StructureFromMotion.java
View file @
47bf5840
...
...
@@ -219,8 +219,9 @@ public class StructureFromMotion {
mb_max_gain
,
// double mb_max_gain,
null
,
// min_max, // double [] min_max, // null or pair of minimal and maximal offsets
fail_reason
,
// int [] fail_reason, // null or int[1]: 0 - OK, 1 - LMA, 2 - min, 3 - max
ref_scene
,
// QuadCLT ref
erence_QuadCLT,
ref_scene
,
// QuadCLT ref
_scene, // Scene for which DSI (ref_disparity) is calculated
ref_disparity
,
// double [] ref_disparity, // null or alternative reference disparity
ref_scene
,
// QuadCLT first_scene,
ref_pXpYD
,
// double [][] pXpYD_ref, // pXpYD for the reference scene
tp_tasks_ref
[
0
],
// TpTask[] tp_tasks_ref, // only (main if MB correction) tasks for FPN correction
scene
,
// QuadCLT scene_QuadCLT,
...
...
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