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
413cd545
Commit
413cd545
authored
Jun 22, 2024
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
continue with eigen
parent
c8d3d7d9
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
237 additions
and
110 deletions
+237
-110
ImageDtt.java
src/main/java/com/elphel/imagej/tileprocessor/ImageDtt.java
+93
-18
Interscene.java
...main/java/com/elphel/imagej/tileprocessor/Interscene.java
+83
-74
IntersceneLma.java
...n/java/com/elphel/imagej/tileprocessor/IntersceneLma.java
+28
-11
IntersceneMatchParameters.java
...lphel/imagej/tileprocessor/IntersceneMatchParameters.java
+33
-7
No files found.
src/main/java/com/elphel/imagej/tileprocessor/ImageDtt.java
View file @
413cd545
...
@@ -2348,14 +2348,17 @@ public class ImageDtt extends ImageDttCPU {
...
@@ -2348,14 +2348,17 @@ public class ImageDtt extends ImageDttCPU {
final
double
td_weight
,
// mix correlations accumulated in TD with
final
double
td_weight
,
// mix correlations accumulated in TD with
final
double
td_neib_weight
,
// mix correlations accumulated in TD (neibs)
final
double
td_neib_weight
,
// mix correlations accumulated in TD (neibs)
final
double
pd_weight
,
// correlations (post) accumulated in PD
final
double
pd_weight
,
// correlations (post) accumulated in PD
final
boolean
td_nopd_only
,
// only use TD accumulated data if no safe PD is available for the tile.
final
boolean
td_nopd_only
,
// only use TD accumulated data if no safe PD is available for the tile.
final
boolean
eig_use_neibs
,
// use correlation from 9 tiles with neibs, if single-tile fails
final
boolean
eig_use_neibs
,
// use correlation from 9 tiles with neibs, if single-tile fails
final
int
eig_min_weaks
,
// = 4; minimal weak neighbors for a weak tile (too few - no averaging)
final
int
eig_min_strongs
,
// minimal strong neighbors for strong tiles
final
double
eig_disp_diff
,
// maximal disparity difference from the closest (by disparity) neighbor
final
boolean
eig_remove_neibs
,
//remove weak (by-neibs) tiles if they have strong (by-single) neighbor
final
boolean
eig_remove_neibs
,
//remove weak (by-neibs) tiles if they have strong (by-single) neighbor
final
boolean
eig_filt_other
,
// apply other before-eigen filters
final
boolean
eig_filt_other
,
// apply other before-eigen filters
// final double min_str_nofpn, // = 0.25;
final
double
eig_str_sum_nofpn
,
// = 0.8; // 5;
final
double
eig_str_sum_nofpn
,
// = 0.8; // 5;
final
double
eig_str_neib_nofpn
,
// = 0.8; // 5;
final
double
eig_str_neib_nofpn
,
// = 0.8; // 5;
// final double min_str_fpn, // = 0.25;
final
double
eig_str_sum_fpn
,
// = 0.8; // 5;
final
double
eig_str_sum_fpn
,
// = 0.8; // 5;
final
double
eig_str_neib_fpn
,
// = 0.8; // 5;
final
double
eig_str_neib_fpn
,
// = 0.8; // 5;
final
int
min_neibs
,
// 2; // minimal number of strong neighbors (> min_str)
final
int
min_neibs
,
// 2; // minimal number of strong neighbors (> min_str)
...
@@ -2365,7 +2368,7 @@ public class ImageDtt extends ImageDttCPU {
...
@@ -2365,7 +2368,7 @@ public class ImageDtt extends ImageDttCPU {
final
boolean
neibs_nofpn_only
,
// consolidate neighbors for non-fpn tiles only!
final
boolean
neibs_nofpn_only
,
// consolidate neighbors for non-fpn tiles only!
final
boolean
redo_both
,
// use average of neighbors for both pd,td if any of the center tile tests (td, pd) fails
final
boolean
redo_both
,
// use average of neighbors for both pd,td if any of the center tile tests (td, pd) fails
final
int
min_num_neibs
,
// plus center, total number >= (min_num_neibs+1)
final
double
scale_neibs_pd
,
// scale threshold for the pixel-domain average maximums
final
double
scale_neibs_pd
,
// scale threshold for the pixel-domain average maximums
final
double
scale_neibs_td
,
// scale threshold for the transform-domain average maximums
final
double
scale_neibs_td
,
// scale threshold for the transform-domain average maximums
final
double
scale_avg_weight
,
// reduce influence of the averaged correlations compared to the single-tile ones
final
double
scale_avg_weight
,
// reduce influence of the averaged correlations compared to the single-tile ones
...
@@ -2379,7 +2382,6 @@ public class ImageDtt extends ImageDttCPU {
...
@@ -2379,7 +2382,6 @@ public class ImageDtt extends ImageDttCPU {
final
int
threadsMax
,
// maximal number of threads to launch
final
int
threadsMax
,
// maximal number of threads to launch
final
int
globalDebugLevel
)
final
int
globalDebugLevel
)
{
{
// final boolean
// final boolean eigen_sub_min = false; // when calculating eigenvectors, subtract min from data, false - just skip
// final boolean eigen_sub_min = false; // when calculating eigenvectors, subtract min from data, false - just skip
if
(
this
.
gpuQuad
==
null
)
{
if
(
this
.
gpuQuad
==
null
)
{
System
.
out
.
println
(
"clt_process_tl_interscene(): this.gpuQuad is null, bailing out"
);
System
.
out
.
println
(
"clt_process_tl_interscene(): this.gpuQuad is null, bailing out"
);
...
@@ -2497,6 +2499,7 @@ public class ImageDtt extends ImageDttCPU {
...
@@ -2497,6 +2499,7 @@ public class ImageDtt extends ImageDttCPU {
final
Thread
[]
threads
=
newThreadArray
(
threadsMax
);
final
Thread
[]
threads
=
newThreadArray
(
threadsMax
);
final
AtomicInteger
ai
=
new
AtomicInteger
(
0
);
final
AtomicInteger
ai
=
new
AtomicInteger
(
0
);
final
boolean
[]
used_td
=
new
boolean
[
tilesX
*
tilesY
];
// this tile had strong enough TD w/o neibs
final
boolean
[]
used_td
=
new
boolean
[
tilesX
*
tilesY
];
// this tile had strong enough TD w/o neibs
final
boolean
[]
weak_tile
=
new
boolean
[
tilesX
*
tilesY
];
// this is a weak tile (only through consolidating neighbors)
// all neibs with strong TD around them will be removed
// all neibs with strong TD around them will be removed
// not using PD at all? always TD, then neibs?
// not using PD at all? always TD, then neibs?
for
(
int
ithread
=
0
;
ithread
<
threads
.
length
;
ithread
++)
{
for
(
int
ithread
=
0
;
ithread
<
threads
.
length
;
ithread
++)
{
...
@@ -2537,10 +2540,7 @@ public class ImageDtt extends ImageDttCPU {
...
@@ -2537,10 +2540,7 @@ public class ImageDtt extends ImageDttCPU {
is_fpn
=
true
;
is_fpn
=
true
;
}
}
// double [][] corrs = new double [corrs_len + extra_len + extra_len_eig][]; // 1/17/2/18 +(0/1)
double
[][]
corrs
=
new
double
[
corrs_len
+
extra_len
][];
// 1/17/2/18 +(0/1)
double
[][]
corrs
=
new
double
[
corrs_len
+
extra_len
][];
// 1/17/2/18 +(0/1)
// int eigen_indx = (extra_len_eig > 0) ? (corrs_len + extra_len + extra_len_eig -1):-1;
// int eigen_indx = (extra_len_eig > 0) ? (corrs_len + extra_len):-1;
// copy correlation tiles from the GPU's floating point arrays
// copy correlation tiles from the GPU's floating point arrays
double
scale
=
1.0
/
getNumSensors
();
double
scale
=
1.0
/
getNumSensors
();
if
(
extra_sum
)
{
if
(
extra_sum
)
{
...
@@ -2654,6 +2654,13 @@ public class ImageDtt extends ImageDttCPU {
...
@@ -2654,6 +2654,13 @@ public class ImageDtt extends ImageDttCPU {
false
,
// boolean ignore_border, // only if fpn_mask != null - ignore tile if maximum touches fpn_mask
false
,
// boolean ignore_border, // only if fpn_mask != null - ignore tile if maximum touches fpn_mask
debug_data
,
// double [][] debug_data, // null or double [1]
debug_data
,
// double [][] debug_data, // null or double [1]
false
);
// boolean debug)
false
);
// boolean debug)
weak_tile
[
nTile
]
=
stats_mv
!=
null
;
if
(
stats_mv
!=
null
)
{
stats_mv
[
2
]
-=
eig_str_neib
*
scale_neibs_td
;
if
(
stats_mv
[
2
]
<=
0
)
{
stats_mv
=
null
;
}
}
}
}
if
((
debug_data
!=
null
)
&&
(
debug_data
[
0
]
!=
null
))
{
if
((
debug_data
!=
null
)
&&
(
debug_data
[
0
]
!=
null
))
{
iCorrTile_index
[
nTile
]
=
iCorrTile
;
iCorrTile_index
[
nTile
]
=
iCorrTile
;
...
@@ -2698,28 +2705,94 @@ public class ImageDtt extends ImageDttCPU {
...
@@ -2698,28 +2705,94 @@ public class ImageDtt extends ImageDttCPU {
public
void
run
()
{
public
void
run
()
{
TileNeibs
tn
=
new
TileNeibs
(
tilesX
,
tilesY
);
TileNeibs
tn
=
new
TileNeibs
(
tilesX
,
tilesY
);
for
(
int
nTile
=
ai
.
getAndIncrement
();
nTile
<
tiles
;
nTile
=
ai
.
getAndIncrement
())
{
for
(
int
nTile
=
ai
.
getAndIncrement
();
nTile
<
tiles
;
nTile
=
ai
.
getAndIncrement
())
{
if
((
mv
[
nTile
]
!=
null
)
&&
!
used_td
[
nTile
])
{
// is weak (by neibs)
boolean
remove_tile
=
false
;
if
(
weak_tile
[
nTile
]){
int
num_weak
=
0
;
boolean
has_strong
=
false
;
for
(
int
dir
=
0
;
dir
<
TileNeibs
.
DIRS
;
dir
++)
{
for
(
int
dir
=
0
;
dir
<
TileNeibs
.
DIRS
;
dir
++)
{
int
nTile1
=
tn
.
getNeibIndex
(
nTile
,
dir
);
int
nTile1
=
tn
.
getNeibIndex
(
nTile
,
dir
);
if
((
nTile1
>=
0
)
&&
used_td
[
nTile1
])
{
if
(
nTile1
>=
0
)
{
mv
[
nTile
]
=
null
;
if
(
used_td
[
nTile1
])
{
if
(
pxd
!=
null
)
{
has_strong
=
true
;
pxd
[
nTile
]
=
null
;
break
;
}
}
else
if
(
weak_tile
[
nTile1
])
{
if
(
iCorrTile_index
!=
null
)
{
num_weak
++;
int
iCorrTile
=
iCorrTile_index
[
nTile
];
dcorr_tiles
[
iCorrTile
][
eigen_indx
+
1
]
=
null
;
dcorr_tiles
[
iCorrTile
][
eigen_indx
+
3
]
=
null
;
}
}
break
;
}
}
}
}
remove_tile
|=
(
has_strong
||
(
num_weak
<
eig_min_weaks
));
}
else
if
(
used_td
[
nTile
])
{
int
num_strong
=
0
;
for
(
int
dir
=
0
;
dir
<
TileNeibs
.
DIRS
;
dir
++)
{
int
nTile1
=
tn
.
getNeibIndex
(
nTile
,
dir
);
if
((
nTile1
>=
0
)
&&
(
used_td
[
nTile1
]))
{
num_strong
++;
}
}
remove_tile
|=
(
num_strong
<
eig_min_strongs
);
}
if
(
remove_tile
)
{
// any of 3 reasons above
mv
[
nTile
]
=
null
;
if
(
pxd
!=
null
)
{
pxd
[
nTile
]
=
null
;
}
if
(
iCorrTile_index
!=
null
)
{
int
iCorrTile
=
iCorrTile_index
[
nTile
];
dcorr_tiles
[
iCorrTile
][
eigen_indx
+
1
]
=
null
;
dcorr_tiles
[
iCorrTile
][
eigen_indx
+
3
]
=
null
;
}
}
}
}
}
}
}
};
};
}
}
startAndJoin
(
threads
);
startAndJoin
(
threads
);
if
(
eig_disp_diff
>
0
)
{
final
boolean
[]
remove_tiles
=
new
boolean
[
tilesX
*
tilesY
];
ai
.
set
(
0
);
for
(
int
ithread
=
0
;
ithread
<
threads
.
length
;
ithread
++)
{
threads
[
ithread
]
=
new
Thread
()
{
@Override
public
void
run
()
{
TileNeibs
tn
=
new
TileNeibs
(
tilesX
,
tilesY
);
for
(
int
nTile
=
ai
.
getAndIncrement
();
nTile
<
tiles
;
nTile
=
ai
.
getAndIncrement
())
if
((
mv
[
nTile
]
!=
null
)
&&
(
pXpYD
[
nTile
]
!=
null
))
{
double
min_diff
=
eig_disp_diff
+
1.0
;
double
disp_c
=
pxd
[
nTile
][
2
];
for
(
int
dir
=
0
;
dir
<
TileNeibs
.
DIRS
;
dir
++)
{
int
nTile1
=
tn
.
getNeibIndex
(
nTile
,
dir
);
if
((
nTile1
>=
0
)
&&
(
pxd
[
nTile1
]!=
null
)
&&
!
Double
.
isNaN
(
pxd
[
nTile1
][
2
]))
{
min_diff
=
Math
.
min
(
Math
.
abs
(
pxd
[
nTile1
][
2
]-
disp_c
),
min_diff
);
}
}
remove_tiles
[
nTile
]
|=
(
min_diff
>
eig_disp_diff
);
}
}
};
}
startAndJoin
(
threads
);
ai
.
set
(
0
);
for
(
int
ithread
=
0
;
ithread
<
threads
.
length
;
ithread
++)
{
threads
[
ithread
]
=
new
Thread
()
{
@Override
public
void
run
()
{
for
(
int
nTile
=
ai
.
getAndIncrement
();
nTile
<
tiles
;
nTile
=
ai
.
getAndIncrement
())
if
(
remove_tiles
[
nTile
])
{
mv
[
nTile
]
=
null
;
if
(
pxd
!=
null
)
{
pxd
[
nTile
]
=
null
;
}
if
(
iCorrTile_index
!=
null
)
{
int
iCorrTile
=
iCorrTile_index
[
nTile
];
dcorr_tiles
[
iCorrTile
][
eigen_indx
+
1
]
=
null
;
dcorr_tiles
[
iCorrTile
][
eigen_indx
+
3
]
=
null
;
}
}
}
};
}
startAndJoin
(
threads
);
}
}
}
// Reduce weight if differs much from average of 8 neighbors, large disparity, remove too few neibs
// Reduce weight if differs much from average of 8 neighbors, large disparity, remove too few neibs
final
double
scale_num_neib
=
((
weight_zero_neibs
>=
0
)
&&
(
weight_zero_neibs
<
1.0
))
?
(
weight_zero_neibs
*
8
/(
1.0
-
weight_zero_neibs
)):
0.0
;
final
double
scale_num_neib
=
((
weight_zero_neibs
>=
0
)
&&
(
weight_zero_neibs
<
1.0
))
?
(
weight_zero_neibs
*
8
/(
1.0
-
weight_zero_neibs
)):
0.0
;
...
@@ -2792,6 +2865,8 @@ public class ImageDtt extends ImageDttCPU {
...
@@ -2792,6 +2865,8 @@ public class ImageDtt extends ImageDttCPU {
startAndJoin
(
threads
);
startAndJoin
(
threads
);
return
coord_motion
;
return
coord_motion
;
}
}
// using most of the ImageDttCPU.clt_process_tl_correlations
// using most of the ImageDttCPU.clt_process_tl_correlations
public
void
clt_process_tl_correlations
(
// convert to pixel domain and process correlations already prepared in fcorr_td and/or fcorr_combo_td
public
void
clt_process_tl_correlations
(
// convert to pixel domain and process correlations already prepared in fcorr_td and/or fcorr_combo_td
final
ImageDttParameters
imgdtt_params
,
// Now just extra correlation parameters, later will include, most others
final
ImageDttParameters
imgdtt_params
,
// Now just extra correlation parameters, later will include, most others
...
...
src/main/java/com/elphel/imagej/tileprocessor/Interscene.java
View file @
413cd545
This diff is collapsed.
Click to expand it.
src/main/java/com/elphel/imagej/tileprocessor/IntersceneLma.java
View file @
413cd545
...
@@ -50,7 +50,9 @@ public class IntersceneLma {
...
@@ -50,7 +50,9 @@ public class IntersceneLma {
private
double
[]
s_vector
=
null
;
// strength component - just for debug images
private
double
[]
s_vector
=
null
;
// strength component - just for debug images
private
double
[]
last_ymfx
=
null
;
private
double
[]
last_ymfx
=
null
;
private
double
[][]
last_jt
=
null
;
private
double
[][]
last_jt
=
null
;
private
double
[]
weights
;
// normalized so sum is 1.0 for all - samples and extra regularization
private
double
[]
weights
;
// normalized so sum is 1.0 for all - samples and extra regularization
private
double
sum_weights
=
0
;
private
int
num_defined
=
0
;
private
double
pure_weight
;
// weight of samples only
private
double
pure_weight
;
// weight of samples only
private
boolean
[]
par_mask
=
null
;
private
boolean
[]
par_mask
=
null
;
private
int
[]
par_indices
=
null
;
private
int
[]
par_indices
=
null
;
...
@@ -91,6 +93,14 @@ public class IntersceneLma {
...
@@ -91,6 +93,14 @@ public class IntersceneLma {
public
double
[][]
getLastJT
(){
public
double
[][]
getLastJT
(){
return
last_jt
;
return
last_jt
;
}
}
public
double
getSumWeights
()
{
return
sum_weights
;
}
public
int
getNumDefined
()
{
return
num_defined
;
}
public
double
[]
getLastRms
()
{
public
double
[]
getLastRms
()
{
...
@@ -830,6 +840,7 @@ public class IntersceneLma {
...
@@ -830,6 +840,7 @@ public class IntersceneLma {
final
Thread
[]
threads
=
ImageDtt
.
newThreadArray
(
QuadCLT
.
THREADS_MAX
);
final
Thread
[]
threads
=
ImageDtt
.
newThreadArray
(
QuadCLT
.
THREADS_MAX
);
final
AtomicInteger
ai
=
new
AtomicInteger
(
0
);
final
AtomicInteger
ai
=
new
AtomicInteger
(
0
);
final
AtomicInteger
ati
=
new
AtomicInteger
(
0
);
final
AtomicInteger
ati
=
new
AtomicInteger
(
0
);
final
AtomicInteger
anum_defined
=
new
AtomicInteger
(
0
);
final
double
[]
sw_arr
=
new
double
[
threads
.
length
];
final
double
[]
sw_arr
=
new
double
[
threads
.
length
];
double
sum_weights
;
double
sum_weights
;
final
int
num_types
=
(
num_components
>
2
)
?
2
:
1
;
final
int
num_types
=
(
num_components
>
2
)
?
2
:
1
;
...
@@ -842,17 +853,20 @@ public class IntersceneLma {
...
@@ -842,17 +853,20 @@ public class IntersceneLma {
if
(
Double
.
isNaN
(
w
))
{
if
(
Double
.
isNaN
(
w
))
{
w
=
0
;
w
=
0
;
}
}
weights
[
num_components
*
iMTile
]
=
w
;
if
(
w
>
0
)
{
sw_arr
[
thread_num
]
+=
2
*
w
;
anum_defined
.
getAndIncrement
();
//disparity_weight
weights
[
num_components
*
iMTile
]
=
w
;
if
(
num_types
>
1
)
{
sw_arr
[
thread_num
]
+=
2
*
w
;
w
=
vector_XYSDS
[
iMTile
][
4
]
*
disparity_weight
;
//disparity_weight
if
(
Double
.
isNaN
(
w
)
||
Double
.
isNaN
(
vector_XYSDS
[
iMTile
][
3
]))
{
if
(
num_types
>
1
)
{
w
=
0
;
w
=
vector_XYSDS
[
iMTile
][
4
]
*
disparity_weight
;
vector_XYSDS
[
iMTile
][
3
]
=
0.0
;
// disparity
if
(
Double
.
isNaN
(
w
)
||
Double
.
isNaN
(
vector_XYSDS
[
iMTile
][
3
]))
{
w
=
0
;
vector_XYSDS
[
iMTile
][
3
]
=
0.0
;
// disparity
}
weights
[
num_components
*
iMTile
+
2
]
=
w
;
sw_arr
[
thread_num
]
+=
w
;
}
}
weights
[
num_components
*
iMTile
+
2
]
=
w
;
sw_arr
[
thread_num
]
+=
w
;
}
}
}
}
}
}
...
@@ -863,6 +877,9 @@ public class IntersceneLma {
...
@@ -863,6 +877,9 @@ public class IntersceneLma {
for
(
double
w:
sw_arr
)
{
for
(
double
w:
sw_arr
)
{
sum_weights
+=
w
;
sum_weights
+=
w
;
}
}
num_defined
=
anum_defined
.
get
();
this
.
sum_weights
=
sum_weights
;
if
(
sum_weights
<=
1
E
-
8
)
{
if
(
sum_weights
<=
1
E
-
8
)
{
System
.
out
.
println
(
"!!!!!! setSamplesWeights(): sum_weights=="
+
sum_weights
+
" <= 1E-8"
);
System
.
out
.
println
(
"!!!!!! setSamplesWeights(): sum_weights=="
+
sum_weights
+
" <= 1E-8"
);
}
}
...
...
src/main/java/com/elphel/imagej/tileprocessor/IntersceneMatchParameters.java
View file @
413cd545
...
@@ -64,8 +64,8 @@ public class IntersceneMatchParameters {
...
@@ -64,8 +64,8 @@ public class IntersceneMatchParameters {
public
boolean
sfm_use
=
true
;
// use SfM to improve depth map
public
boolean
sfm_use
=
true
;
// use SfM to improve depth map
public
double
sfm_min_base
=
2.0
;
// use SfM if baseline exceeds this
public
double
sfm_min_base
=
0.6
;
//
2.0; // use SfM if baseline exceeds this
public
double
sfm_min_gain
=
5.0
;
// Minimal SfM gain to apply SfM to the depth map
public
double
sfm_min_gain
=
3.0
;
//
5.0; // Minimal SfM gain to apply SfM to the depth map
public
double
sfm_min_frac
=
0.5
;
// Minimal fraction of defined tiles to have SfM correction
public
double
sfm_min_frac
=
0.5
;
// Minimal fraction of defined tiles to have SfM correction
public
int
sfm_num_pairs
=
32
;
// desired number of SfM pairs to average
public
int
sfm_num_pairs
=
32
;
// desired number of SfM pairs to average
...
@@ -450,6 +450,9 @@ public class IntersceneMatchParameters {
...
@@ -450,6 +450,9 @@ public class IntersceneMatchParameters {
public
double
eig_max_sqrt
=
6.0
;
// for sqrt(lambda) - consider infinity (infinite linear feature, a line)
public
double
eig_max_sqrt
=
6.0
;
// for sqrt(lambda) - consider infinity (infinite linear feature, a line)
public
double
eig_min_sqrt
=
1.0
;
// for sqrt(lambda) - limit minimal sqrt(lambda) - can be sharp for very small max
public
double
eig_min_sqrt
=
1.0
;
// for sqrt(lambda) - limit minimal sqrt(lambda) - can be sharp for very small max
public
boolean
eig_use_neibs
=
true
;
// use correlation from 9 tiles with neibs, if single-tile fails
public
boolean
eig_use_neibs
=
true
;
// use correlation from 9 tiles with neibs, if single-tile fails
public
int
eig_min_weaks
=
4
;
// Minimal number of weak neighbors to keep center weak tile
public
int
eig_min_strongs
=
2
;
// Minimal number of strong neighbors for stron tiles
public
double
eig_disp_diff
=
1.0
;
// maximal disparity difference from the closest (by disparity) neighbor
public
boolean
eig_remove_neibs
=
true
;
// remove weak (by-neibs) tiles if they have strong (by-single) neighbor
public
boolean
eig_remove_neibs
=
true
;
// remove weak (by-neibs) tiles if they have strong (by-single) neighbor
public
boolean
eig_filt_other
=
false
;
// apply other before-eigen filters
public
boolean
eig_filt_other
=
false
;
// apply other before-eigen filters
public
double
eig_max_rms
=
2.0
;
// eigen-normalized maximal RMS to consider adjustment to be a failure
public
double
eig_max_rms
=
2.0
;
// eigen-normalized maximal RMS to consider adjustment to be a failure
...
@@ -473,7 +476,7 @@ min_str_neib_fpn 0.35
...
@@ -473,7 +476,7 @@ min_str_neib_fpn 0.35
public
double
min_ref_frac
=
0.2
;
// 0.22; if fraction number of reliable tiles is less than this, use best possible
public
double
min_ref_frac
=
0.2
;
// 0.22; if fraction number of reliable tiles is less than this, use best possible
// SfM-related filtering (remove tiles without SfM)
// SfM-related filtering (remove tiles without SfM)
public
boolean
sfm_filter
=
true
;
// use SfM filtering if available
public
boolean
sfm_filter
=
true
;
// use SfM filtering if available
public
double
sfm_minmax
=
10.0
;
// minimal value of the SfM gain maximum to consider available
public
double
sfm_minmax
=
3.0
;
// 10.0
// minimal value of the SfM gain maximum to consider available
public
double
sfm_fracmax
=
0.75
;
// minimal fraction of the SfM maximal gain
public
double
sfm_fracmax
=
0.75
;
// minimal fraction of the SfM maximal gain
public
double
sfm_fracall
=
0.3
;
// minimal relative area of the SfM-enabled tiles (do not apply filter if less)
public
double
sfm_fracall
=
0.3
;
// minimal relative area of the SfM-enabled tiles (do not apply filter if less)
...
@@ -1355,12 +1358,19 @@ min_str_neib_fpn 0.35
...
@@ -1355,12 +1358,19 @@ min_str_neib_fpn 0.35
"1.0 - subract threshold value before centroid and covariance, 0.0 - keep original correlation values."
);
"1.0 - subract threshold value before centroid and covariance, 0.0 - keep original correlation values."
);
gd
.
addNumericField
(
"Infinity radius"
,
this
.
eig_max_sqrt
,
5
,
7
,
""
,
gd
.
addNumericField
(
"Infinity radius"
,
this
.
eig_max_sqrt
,
5
,
7
,
""
,
"For sqrt(egenvalue)==radius - consider infinity (infinite linear feature, a line)."
);
"For sqrt(egenvalue)==radius - consider infinity (infinite linear feature, a line)."
);
gd
.
addNumericField
(
"Minimal radius"
,
this
.
eig_min_sqrt
,
5
,
7
,
""
,
gd
.
addNumericField
(
"Minimal radius"
,
this
.
eig_min_sqrt
,
5
,
7
,
""
,
"For sqrt(egenvalue)==radius - do not trust too sharp (caused by small spot over threshold)."
);
"For sqrt(egenvalue)==radius - do not trust too sharp (caused by small spot over threshold)."
);
gd
.
addCheckbox
(
"Use neighbors if single fails"
,
this
.
eig_use_neibs
,
gd
.
addCheckbox
(
"Use neighbors if single fails"
,
this
.
eig_use_neibs
,
"Use correlation from 9 tiles with neibs, if single-tile fails"
);
"Use correlation from 9 tiles with neibs, if single-tile fails"
);
gd
.
addCheckbox
(
"Remove weak by strong neighbors"
,
this
.
eig_remove_neibs
,
gd
.
addNumericField
(
"Min weak neighbors"
,
this
.
eig_min_weaks
,
0
,
3
,
""
,
"Remove weak (by-neibs) tiles if they have strong (by-single) neighbor"
);
"Minimal number of weak neighbors to keep center weak tile. Too few will not reduce noise by averaging"
);
gd
.
addNumericField
(
"Min strong neighbors of strong tiles"
,
this
.
eig_min_strongs
,
0
,
3
,
""
,
"Minimal number of strong (w/o averaging with neighbors) tiles."
);
gd
.
addNumericField
(
"Maximal disparity difference to neighbors"
,
this
.
eig_disp_diff
,
5
,
7
,
"pix"
,
"Maximal disparity difference from the closest (by disparity) neighbor."
);
gd
.
addCheckbox
(
"Remove weak by strong and too few weak neighbors"
,
this
.
eig_remove_neibs
,
"Remove weak (by-neibs) tiles if they have strong (by-single) neighbor. Or if they have too few weak ones"
);
gd
.
addCheckbox
(
"Apply other filters"
,
this
.
eig_filt_other
,
gd
.
addCheckbox
(
"Apply other filters"
,
this
.
eig_filt_other
,
"Apply other (before-eigen) filters"
);
"Apply other (before-eigen) filters"
);
gd
.
addNumericField
(
"Maximal eigen-normalized RMS"
,
this
.
eig_max_rms
,
5
,
7
,
""
,
gd
.
addNumericField
(
"Maximal eigen-normalized RMS"
,
this
.
eig_max_rms
,
5
,
7
,
""
,
...
@@ -2052,6 +2062,10 @@ min_str_neib_fpn 0.35
...
@@ -2052,6 +2062,10 @@ min_str_neib_fpn 0.35
this
.
eig_max_sqrt
=
gd
.
getNextNumber
();
this
.
eig_max_sqrt
=
gd
.
getNextNumber
();
this
.
eig_min_sqrt
=
gd
.
getNextNumber
();
this
.
eig_min_sqrt
=
gd
.
getNextNumber
();
this
.
eig_use_neibs
=
gd
.
getNextBoolean
();
this
.
eig_use_neibs
=
gd
.
getNextBoolean
();
this
.
eig_min_weaks
=
(
int
)
gd
.
getNextNumber
();
this
.
eig_min_strongs
=
(
int
)
gd
.
getNextNumber
();
this
.
eig_disp_diff
=
gd
.
getNextNumber
();
this
.
eig_remove_neibs
=
gd
.
getNextBoolean
();
this
.
eig_remove_neibs
=
gd
.
getNextBoolean
();
this
.
eig_filt_other
=
gd
.
getNextBoolean
();
this
.
eig_filt_other
=
gd
.
getNextBoolean
();
this
.
eig_max_rms
=
gd
.
getNextNumber
();
this
.
eig_max_rms
=
gd
.
getNextNumber
();
...
@@ -2608,6 +2622,10 @@ min_str_neib_fpn 0.35
...
@@ -2608,6 +2622,10 @@ min_str_neib_fpn 0.35
properties
.
setProperty
(
prefix
+
"eig_max_sqrt"
,
this
.
eig_max_sqrt
+
""
);
// double
properties
.
setProperty
(
prefix
+
"eig_max_sqrt"
,
this
.
eig_max_sqrt
+
""
);
// double
properties
.
setProperty
(
prefix
+
"eig_min_sqrt"
,
this
.
eig_min_sqrt
+
""
);
// double
properties
.
setProperty
(
prefix
+
"eig_min_sqrt"
,
this
.
eig_min_sqrt
+
""
);
// double
properties
.
setProperty
(
prefix
+
"eig_use_neibs"
,
this
.
eig_use_neibs
+
""
);
// boolean
properties
.
setProperty
(
prefix
+
"eig_use_neibs"
,
this
.
eig_use_neibs
+
""
);
// boolean
properties
.
setProperty
(
prefix
+
"eig_min_weaks"
,
this
.
eig_min_weaks
+
""
);
// int
properties
.
setProperty
(
prefix
+
"eig_min_strongs"
,
this
.
eig_min_strongs
+
""
);
// int
properties
.
setProperty
(
prefix
+
"eig_disp_diff"
,
this
.
eig_disp_diff
+
""
);
// double
properties
.
setProperty
(
prefix
+
"eig_remove_neibs"
,
this
.
eig_remove_neibs
+
""
);
// boolean
properties
.
setProperty
(
prefix
+
"eig_remove_neibs"
,
this
.
eig_remove_neibs
+
""
);
// boolean
properties
.
setProperty
(
prefix
+
"eig_filt_other"
,
this
.
eig_filt_other
+
""
);
// boolean
properties
.
setProperty
(
prefix
+
"eig_filt_other"
,
this
.
eig_filt_other
+
""
);
// boolean
properties
.
setProperty
(
prefix
+
"eig_max_rms"
,
this
.
eig_max_rms
+
""
);
// double
properties
.
setProperty
(
prefix
+
"eig_max_rms"
,
this
.
eig_max_rms
+
""
);
// double
...
@@ -3127,7 +3145,10 @@ min_str_neib_fpn 0.35
...
@@ -3127,7 +3145,10 @@ min_str_neib_fpn 0.35
if
(
properties
.
getProperty
(
prefix
+
"eig_max_sqrt"
)!=
null
)
this
.
eig_max_sqrt
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"eig_max_sqrt"
));
if
(
properties
.
getProperty
(
prefix
+
"eig_max_sqrt"
)!=
null
)
this
.
eig_max_sqrt
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"eig_max_sqrt"
));
if
(
properties
.
getProperty
(
prefix
+
"eig_min_sqrt"
)!=
null
)
this
.
eig_min_sqrt
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"eig_min_sqrt"
));
if
(
properties
.
getProperty
(
prefix
+
"eig_min_sqrt"
)!=
null
)
this
.
eig_min_sqrt
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"eig_min_sqrt"
));
if
(
properties
.
getProperty
(
prefix
+
"eig_use_neibs"
)!=
null
)
this
.
eig_use_neibs
=
Boolean
.
parseBoolean
(
properties
.
getProperty
(
prefix
+
"eig_use_neibs"
));
if
(
properties
.
getProperty
(
prefix
+
"eig_use_neibs"
)!=
null
)
this
.
eig_use_neibs
=
Boolean
.
parseBoolean
(
properties
.
getProperty
(
prefix
+
"eig_use_neibs"
));
if
(
properties
.
getProperty
(
prefix
+
"eig_remove_neibs"
)!=
null
)
this
.
eig_remove_neibs
=
Boolean
.
parseBoolean
(
properties
.
getProperty
(
prefix
+
"eig_remove_neibs"
));
if
(
properties
.
getProperty
(
prefix
+
"eig_min_weaks"
)!=
null
)
this
.
eig_min_weaks
=
Integer
.
parseInt
(
properties
.
getProperty
(
prefix
+
"eig_min_weaks"
));
if
(
properties
.
getProperty
(
prefix
+
"eig_min_strongs"
)!=
null
)
this
.
eig_min_strongs
=
Integer
.
parseInt
(
properties
.
getProperty
(
prefix
+
"eig_min_strongs"
));
if
(
properties
.
getProperty
(
prefix
+
"eig_disp_diff"
)!=
null
)
this
.
eig_disp_diff
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"eig_disp_diff"
));
if
(
properties
.
getProperty
(
prefix
+
"eig_remove_neibs"
)!=
null
)
this
.
eig_remove_neibs
=
Boolean
.
parseBoolean
(
properties
.
getProperty
(
prefix
+
"eig_remove_neibs"
));
if
(
properties
.
getProperty
(
prefix
+
"eig_filt_other"
)!=
null
)
this
.
eig_filt_other
=
Boolean
.
parseBoolean
(
properties
.
getProperty
(
prefix
+
"eig_filt_other"
));
if
(
properties
.
getProperty
(
prefix
+
"eig_filt_other"
)!=
null
)
this
.
eig_filt_other
=
Boolean
.
parseBoolean
(
properties
.
getProperty
(
prefix
+
"eig_filt_other"
));
if
(
properties
.
getProperty
(
prefix
+
"eig_max_rms"
)!=
null
)
this
.
eig_max_rms
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"eig_max_rms"
));
if
(
properties
.
getProperty
(
prefix
+
"eig_max_rms"
)!=
null
)
this
.
eig_max_rms
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"eig_max_rms"
));
...
@@ -3654,6 +3675,11 @@ min_str_neib_fpn 0.35
...
@@ -3654,6 +3675,11 @@ min_str_neib_fpn 0.35
imp
.
eig_max_sqrt
=
this
.
eig_max_sqrt
;
imp
.
eig_max_sqrt
=
this
.
eig_max_sqrt
;
imp
.
eig_min_sqrt
=
this
.
eig_min_sqrt
;
imp
.
eig_min_sqrt
=
this
.
eig_min_sqrt
;
imp
.
eig_use_neibs
=
this
.
eig_use_neibs
;
imp
.
eig_use_neibs
=
this
.
eig_use_neibs
;
imp
.
eig_min_weaks
=
this
.
eig_min_weaks
;
imp
.
eig_min_strongs
=
this
.
eig_min_strongs
;
imp
.
eig_disp_diff
=
this
.
eig_disp_diff
;
imp
.
eig_remove_neibs
=
this
.
eig_remove_neibs
;
imp
.
eig_remove_neibs
=
this
.
eig_remove_neibs
;
imp
.
eig_filt_other
=
this
.
eig_filt_other
;
imp
.
eig_filt_other
=
this
.
eig_filt_other
;
imp
.
eig_max_rms
=
this
.
eig_max_rms
;
imp
.
eig_max_rms
=
this
.
eig_max_rms
;
...
...
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