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
ad8191c2
Commit
ad8191c2
authored
Jul 26, 2022
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reorganized some parameters, before quadratic photometric equalization
parent
45f2bf7b
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
967 additions
and
860 deletions
+967
-860
CLTParameters.java
src/main/java/com/elphel/imagej/cameras/CLTParameters.java
+60
-10
ImageDttParameters.java
...a/com/elphel/imagej/tileprocessor/ImageDttParameters.java
+729
-726
IntersceneMatchParameters.java
...lphel/imagej/tileprocessor/IntersceneMatchParameters.java
+104
-108
OpticalFlow.java
...ain/java/com/elphel/imagej/tileprocessor/OpticalFlow.java
+33
-11
QuadCLTCPU.java
...main/java/com/elphel/imagej/tileprocessor/QuadCLTCPU.java
+41
-5
No files found.
src/main/java/com/elphel/imagej/cameras/CLTParameters.java
View file @
ad8191c2
...
...
@@ -365,6 +365,13 @@ public class CLTParameters {
public
double
fom_inf_bonus
=
0.2
;
// add this to infinity FOM (if it is closer than fom_inf_range)
public
double
fom_inf_range
=
0.8
;
// 0.5
// Photometric calibration (move elsewhere)?
public
boolean
photo_en
=
false
;
// perform photogrammetric calibration to equalize pixel values
public
int
photo_num_full
=
3
;
// Number of full recalibrations with re-processing of the images
public
int
photo_num_refines
=
3
;
// Calibrate, remove outliers, recalibrate, ...
public
double
photo_min_strength
=
0.0
;
// maybe add to filter out weak tiles
public
double
photo_max_diff
=
40.0
;
// To filter mismatches. Normal (adjusted) have RMSE ~9
public
boolean
photo_debug
=
false
;
// Generate images and text
...
...
@@ -1347,6 +1354,13 @@ public class CLTParameters {
properties
.
setProperty
(
prefix
+
"fom_inf_bonus"
,
this
.
fom_inf_bonus
+
""
);
properties
.
setProperty
(
prefix
+
"fom_inf_range"
,
this
.
fom_inf_range
+
""
);
properties
.
setProperty
(
prefix
+
"photo_en"
,
this
.
photo_en
+
""
);
// boolean
properties
.
setProperty
(
prefix
+
"photo_num_full"
,
this
.
photo_num_full
+
""
);
// int
properties
.
setProperty
(
prefix
+
"photo_num_refines"
,
this
.
photo_num_refines
+
""
);
// int
properties
.
setProperty
(
prefix
+
"photo_min_strength"
,
this
.
photo_min_strength
+
""
);
// double
properties
.
setProperty
(
prefix
+
"photo_max_diff"
,
this
.
photo_max_diff
+
""
);
// double
properties
.
setProperty
(
prefix
+
"photo_debug"
,
this
.
photo_debug
+
""
);
// boolean
properties
.
setProperty
(
prefix
+
"show_textures"
,
this
.
show_textures
+
""
);
properties
.
setProperty
(
prefix
+
"debug_filters"
,
this
.
debug_filters
+
""
);
...
...
@@ -2204,6 +2218,13 @@ public class CLTParameters {
if
(
properties
.
getProperty
(
prefix
+
"fom_inf_bonus"
)!=
null
)
this
.
fom_inf_bonus
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"fom_inf_bonus"
));
if
(
properties
.
getProperty
(
prefix
+
"fom_inf_range"
)!=
null
)
this
.
fom_inf_range
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"fom_inf_range"
));
if
(
properties
.
getProperty
(
prefix
+
"photo_en"
)!=
null
)
this
.
photo_en
=
Boolean
.
parseBoolean
(
properties
.
getProperty
(
prefix
+
"photo_en"
));
if
(
properties
.
getProperty
(
prefix
+
"photo_num_full"
)!=
null
)
this
.
photo_num_full
=
Integer
.
parseInt
(
properties
.
getProperty
(
prefix
+
"photo_num_full"
));
if
(
properties
.
getProperty
(
prefix
+
"photo_num_refines"
)!=
null
)
this
.
photo_num_refines
=
Integer
.
parseInt
(
properties
.
getProperty
(
prefix
+
"photo_num_refines"
));
if
(
properties
.
getProperty
(
prefix
+
"photo_min_strength"
)!=
null
)
this
.
photo_min_strength
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"photo_min_strength"
));
if
(
properties
.
getProperty
(
prefix
+
"photo_max_diff"
)!=
null
)
this
.
photo_max_diff
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"photo_max_diff"
));
if
(
properties
.
getProperty
(
prefix
+
"photo_debug"
)!=
null
)
this
.
photo_debug
=
Boolean
.
parseBoolean
(
properties
.
getProperty
(
prefix
+
"photo_debug"
));
if
(
properties
.
getProperty
(
prefix
+
"show_textures"
)!=
null
)
this
.
show_textures
=
Boolean
.
parseBoolean
(
properties
.
getProperty
(
prefix
+
"show_textures"
));
if
(
properties
.
getProperty
(
prefix
+
"debug_filters"
)!=
null
)
this
.
debug_filters
=
Boolean
.
parseBoolean
(
properties
.
getProperty
(
prefix
+
"debug_filters"
));
...
...
@@ -2788,7 +2809,7 @@ public class CLTParameters {
public
boolean
showJDialog
()
{
// GenericDialog gd = new GenericDialog("Set CLT parameters");
GenericJTabbedDialog
gd
=
new
GenericJTabbedDialog
(
"Set CLT parameters"
,
80
0
,
900
);
GenericJTabbedDialog
gd
=
new
GenericJTabbedDialog
(
"Set CLT parameters"
,
109
0
,
900
);
gd
.
addTab
(
"General"
,
"General parameters"
);
gd
.
addNumericField
(
"Nominal (rectilinear) disparity between side of square cameras (pix)"
,
this
.
disparity
,
3
,
7
,
"pix"
,
"Used when rendering 4 images"
);
...
...
@@ -2855,7 +2876,7 @@ public class CLTParameters {
gd
.
addNumericField
(
"Calculated from correlation offset vs. actual one (not yet understood)"
,
this
.
corr_magic_scale
,
3
,
6
,
""
,
"CM and poly"
);
gd
.
addNumericField
(
"Select all-pair correlation type to use 0 - CM, 1 - poly"
,
this
.
corr_select
,
0
);
gd
.
addTab
(
"imageDtt"
,
"Setup extra ImageDtt parameters - eventually all will be set that way"
);
//
gd.addTab ("imageDtt", "Setup extra ImageDtt parameters - eventually all will be set that way");
this
.
img_dtt
.
dialogQuestions
(
gd
);
gd
.
addTab
(
"Rig"
,
"Parameters for the wide baseline rig with two quad cameras"
);
this
.
rig
.
dialogQuestions
(
gd
);
...
...
@@ -3164,16 +3185,16 @@ public class CLTParameters {
gd
.
addNumericField
(
"Minimal number of infinity tiles"
,
this
.
lyms_min_num_inf
,
0
,
3
,
""
,
"Minimal number of tiles (in all scenes total) in an infinity cluster"
);
gd
.
addTab
(
"3D"
,
"3D reconstruction"
);
gd
.
addNumericField
(
"Maximal channel mismatchatch for RGB cameras"
,
this
.
mismatch_rgb
,
4
,
6
,
"counts"
,
gd
.
addTab
(
"Initial DSI"
,
"Building initial (single-scene) DSI"
);
gd
.
addMessage
(
"--- Filter tiles by inter-channel mismatch (requires photometic equalization) ---"
);
gd
.
addNumericField
(
"Maximal channel mismatch for RGB cameras"
,
this
.
mismatch_rgb
,
4
,
6
,
"counts"
,
"Discard correlation results during disparity sweep if channels differ more (RGB)"
);
gd
.
addNumericField
(
"Maximal channel mismatch
atch for LWIR cameras"
,
this
.
mismatch_lwir
,
4
,
6
,
"counts"
,
gd
.
addNumericField
(
"Maximal channel mismatch
for LWIR cameras"
,
this
.
mismatch_lwir
,
4
,
6
,
"counts"
,
"Discard correlation results during disparity sweep if channels differ more (LWIR)"
);
gd
.
addNumericField
(
"Minimal correlation strength to override mismatch filter"
,
this
.
mismatch_override
,
4
,
6
,
""
,
"Allow tiles with the really strong correlation to have large mismatch."
);
gd
.
addMessage
(
"--- FOM for initial DSI ---"
);
gd
.
addMessage
(
"--- FOM for initial DSI (the combination of parameters that ranges corelation results) ---"
);
gd
.
addNumericField
(
"Minimal strength"
,
this
.
fom_min_strength
,
4
,
6
,
""
,
"Discard all weaker tiles (FOM=NEGATIVE_INFINITY)."
);
gd
.
addNumericField
(
"Weight of residual disparity, RGB"
,
this
.
fom_adisp_rgb
,
4
,
6
,
""
,
...
...
@@ -3188,8 +3209,30 @@ public class CLTParameters {
"Prevent stray FG over sky - add to FOM."
);
gd
.
addNumericField
(
"Infinity bonus disparity range"
,
this
.
fom_inf_range
,
4
,
6
,
"pix"
,
"Infinity range to receive FOM bonus."
);
gd
.
addMessage
(
"See \"Corr LMA\" tab under \"LMA (single) results filtering\" for LMA parameters"
);
gd
.
addMessage
(
"that influence the results on the last stages of the DSI building."
);
gd
.
addMessage
(
"\"Sky\" tab parameters define featureless sky area detection that supplement initial DSI."
);
gd
.
addTab
(
"Photometric"
,
"Photometric equalization - can be performed after DSI is available)"
);
gd
.
addMessage
(
"Photometric calibration is saved with the current scene (and saved with the \"Save\" command and with the reference scene."
);
gd
.
addMessage
(
"It is applied when the source files are read."
);
gd
.
addCheckbox
(
"Enable photometric calibration"
,
this
.
photo_en
,
"Equalize per- sensor gains and offsets. Requires disparity map. Save to reference scene and with current scene (to .corr-zml)."
);
gd
.
addNumericField
(
"Full photometric (re)calibrations"
,
this
.
photo_num_full
,
0
,
3
,
"pix"
,
"Full recalibratrions include re-importing raw images with updated offsets/gains"
);
gd
.
addNumericField
(
"Refines"
,
this
.
photo_num_refines
,
0
,
3
,
"pix"
,
"Calculate calibration, remove outliers (e.g. FG/BG) and repeat"
);
gd
.
addNumericField
(
"Minimal DSI strength"
,
this
.
photo_min_strength
,
5
,
7
,
""
,
"Do not use weak tiles."
);
gd
.
addNumericField
(
"Maximal channel mismatch"
,
this
.
photo_max_diff
,
5
,
7
,
""
,
"Detect (and remove outliers). Adjusted images have RMSE ~9 counts."
);
gd
.
addCheckbox
(
"Debug pphotometric calibration"
,
this
.
photo_debug
,
"Generate debug images an text output."
);
gd
.
addMessage
(
"--- 3D reconstruction ---"
);
gd
.
addTab
(
"3D"
,
"3D reconstruction"
);
gd
.
addCheckbox
(
"Show generated textures"
,
this
.
show_textures
);
gd
.
addCheckbox
(
"show intermediate results of filtering"
,
this
.
debug_filters
);
...
...
@@ -4182,6 +4225,13 @@ public class CLTParameters {
this
.
fom_inf_bonus
=
gd
.
getNextNumber
();
this
.
fom_inf_range
=
gd
.
getNextNumber
();
this
.
photo_en
=
gd
.
getNextBoolean
();
this
.
photo_num_full
=
(
int
)
gd
.
getNextNumber
();
this
.
photo_num_refines
=
(
int
)
gd
.
getNextNumber
();
this
.
photo_min_strength
=
gd
.
getNextNumber
();
this
.
photo_max_diff
=
gd
.
getNextNumber
();
this
.
photo_debug
=
gd
.
getNextBoolean
();
this
.
show_textures
=
gd
.
getNextBoolean
();
this
.
debug_filters
=
gd
.
getNextBoolean
();
this
.
min_smth
=
gd
.
getNextNumber
();
...
...
src/main/java/com/elphel/imagej/tileprocessor/ImageDttParameters.java
View file @
ad8191c2
...
...
@@ -28,6 +28,7 @@ import java.util.Properties;
import
com.elphel.imagej.common.GenericJTabbedDialog
;
public
class
ImageDttParameters
{
// "ImageDtt" tab followed by others
public
boolean
gpu_mode_debug
=
true
;
public
boolean
gpu_verify
=
false
;
// verify tasks/ input data
public
boolean
corr_mode_debug
=
true
;
...
...
@@ -398,6 +399,7 @@ public class ImageDttParameters {
public
void
dialogQuestions
(
GenericJTabbedDialog
gd
)
{
gd
.
addTab
(
"imageDtt"
,
"Setup extra ImageDtt parameters - eventually all will be set that way"
);
gd
.
addCheckbox
(
"Debug CPU->GPU matching"
,
this
.
gpu_mode_debug
,
"output clt_corr_partial"
);
gd
.
addCheckbox
(
"Verify GPU input"
,
this
.
gpu_verify
,
...
...
@@ -710,8 +712,8 @@ public class ImageDttParameters {
gd
.
addMessage
(
"Single-tile (no lazy eye) only parameters (some are common"
);
gd
.
addNumericField
(
"Cluster disparity range"
,
this
.
lma_disp_range
,
3
,
6
,
"pix"
,
"Disparity range to combine in one cluster (to mitigate ERS"
);
// gd.addCheckbox ("Correlation maximum as gaussian", this.lmas_gaussian,
// "Model correlation maximum as a Gaussian exp(-r^2) (false - as a parabola - 1-r^2)");
// gd.addCheckbox ("Correlation maximum as gaussian", this.lmas_gaussian,
// "Model correlation maximum as a Gaussian exp(-r^2) (false - as a parabola - 1-r^2)");
gd
.
addNumericField
(
"Correlation maximum function type"
,
this
.
lmas_gaussian
,
0
,
3
,
""
,
"0 - parabola - 1-r^2, 1 - exp(-r^2), 2 - limited parabola (>=0), 3 - limited squared parabola (1-r^2)^2"
);
...
...
@@ -765,8 +767,8 @@ public class ImageDttParameters {
gd
.
addCheckbox
(
"Re-run LMA after removing weak/failed tiles"
,
this
.
lma_second
,
"Re-run LMA with filtered tiles (see Correlation strength calculation section below)"
);
// gd.addCheckbox ("Gaussian mode during LMA re-run", this.lma_second_gaussian,
// "Parabola is more stable when using with un-filtered tiles, so it makes sense to use Gaussina only on filtered tiles");
// gd.addCheckbox ("Gaussian mode during LMA re-run", this.lma_second_gaussian,
// "Parabola is more stable when using with un-filtered tiles, so it makes sense to use Gaussina only on filtered tiles");
gd
.
addNumericField
(
"Correlation maximum function typedurinf re-run"
,
this
.
lma_second_gaussian
,
0
,
3
,
""
,
"0 - parabola - 1-r^2, 1 - exp(-r^2), 2 - limited parabola (>=0), 3 - limited squared parabola (1-r^2)^2."
+
" Parabola is more stable when using with un-filtered tiles, so it makes sense to use Gaussina only on filtered tiles"
);
...
...
@@ -1049,7 +1051,7 @@ public class ImageDttParameters {
this
.
tilt_damp_tilt
=
gd
.
getNextNumber
();
this
.
tilt_clust_extra
=
(
int
)
gd
.
getNextNumber
();
//LMA tab
//LMA tab
this
.
lma_disp_range
=
gd
.
getNextNumber
();
this
.
lmas_gaussian
=
(
int
)
gd
.
getNextNumber
();
this
.
lmas_adjust_wm
=
gd
.
getNextBoolean
();
...
...
@@ -1133,6 +1135,7 @@ public class ImageDttParameters {
public
void
setProperties
(
String
prefix
,
Properties
properties
){
properties
.
setProperty
(
prefix
+
"gpu_mode_debug"
,
this
.
gpu_mode_debug
+
""
);
properties
.
setProperty
(
prefix
+
"gpu_verify"
,
this
.
gpu_verify
+
""
);
properties
.
setProperty
(
prefix
+
"corr_mode_debug"
,
this
.
corr_mode_debug
+
""
);
...
...
src/main/java/com/elphel/imagej/tileprocessor/IntersceneMatchParameters.java
View file @
ad8191c2
This diff is collapsed.
Click to expand it.
src/main/java/com/elphel/imagej/tileprocessor/OpticalFlow.java
View file @
ad8191c2
...
...
@@ -4038,12 +4038,12 @@ public class OpticalFlow {
boolean
export_ml_files
=
clt_parameters
.
imp
.
export_ml_files
;
//boolean calibrate_photometric = true;
boolean
photo_en
=
clt_parameters
.
imp
.
photo_en
;
// false; // perform photogrammetric calibration to equalize pixel values
int
photo_num_full
=
clt_parameters
.
imp
.
photo_num_full
;
// 1; // Number of full recalibrations with re-processing of the images
int
photo_num_refines
=
clt_parameters
.
imp
.
photo_num_refines
;
// 3; // Calibrate, remove outliers, recalibrate, ...
double
photo_min_strength
=
clt_parameters
.
imp
.
photo_min_strength
;
// 0.0; // maybe add to filter out weak tiles
double
photo_max_diff
=
clt_parameters
.
imp
.
photo_max_diff
;
// 40.0; // To filter mismatches. Normal (adjusted) have RMSE ~9
boolean
photo_debug
=
clt_parameters
.
imp
.
photo_debug
;
// false; // Generate images and text
boolean
photo_en
=
clt_parameters
.
photo_en
;
// false; // perform photogrammetric calibration to equalize pixel values
int
photo_num_full
=
clt_parameters
.
photo_num_full
;
// 1; // Number of full recalibrations with re-processing of the images
int
photo_num_refines
=
clt_parameters
.
photo_num_refines
;
// 3; // Calibrate, remove outliers, recalibrate, ...
double
photo_min_strength
=
clt_parameters
.
photo_min_strength
;
// 0.0; // maybe add to filter out weak tiles
double
photo_max_diff
=
clt_parameters
.
photo_max_diff
;
// 40.0; // To filter mismatches. Normal (adjusted) have RMSE ~9
boolean
photo_debug
=
clt_parameters
.
photo_debug
;
// false; // Generate images and text
boolean
show_dsi_image
=
clt_parameters
.
imp
.
show_ranges
&&
!
batch_mode
;
boolean
show_images
=
clt_parameters
.
imp
.
show_images
&&
!
batch_mode
;
...
...
@@ -4132,11 +4132,19 @@ public class OpticalFlow {
final
int
debugLevelInner
=
clt_parameters
.
batch_run
?
-
2
:
debugLevel
;
// copied from TQ
double
min_ref_str
=
clt_parameters
.
imp
.
min_ref_str
;
double
sky_seed
=
7.0
;
// start with product of strength by diff_second below this
double
sky_lim
=
15.0
;
// then expand to product of strength by diff_second below this
double
lma_seed
=
2.0
;
// seed - disparity_lma limit double sky_lim = 15.0; // then expand to product of strength by diff_second below this
int
sky_shrink
=
6
;
int
sky_expand_extra
=
0
;
// 1?
double
sky_highest_min
=
clt_parameters
.
imp
.
sky_highest_min
;
double
cold_frac
=
clt_parameters
.
imp
.
cold_frac
;
double
hot_frac
=
clt_parameters
.
imp
.
hot_frac
;
double
cold_scale
=
clt_parameters
.
imp
.
cold_scale
;
double
sky_seed
=
clt_parameters
.
imp
.
sky_seed
;
double
lma_seed
=
clt_parameters
.
imp
.
lma_seed
;
int
sky_shrink
=
clt_parameters
.
imp
.
sky_shrink
;
int
seed_rows
=
clt_parameters
.
imp
.
seed_rows
;
double
sky_lim
=
clt_parameters
.
imp
.
sky_lim
;
int
sky_expand_extra
=
clt_parameters
.
imp
.
sky_expand_extra
;
double
min_strength
=
clt_parameters
.
imp
.
min_strength
;
int
lowest_sky_row
=
clt_parameters
.
imp
.
lowest_sky_row
;
boolean
[]
ref_blue_sky
=
null
;
// turn off "lma" in the ML output
...
...
@@ -4267,6 +4275,13 @@ public class OpticalFlow {
sky_lim
,
// double sky_lim, // = 15.0; // then expand to product of strength by diff_second below this
sky_shrink
,
// int sky_shrink, // = 4;
sky_expand_extra
,
// int sky_expand_extra, // = 100; // 1?
cold_scale
,
// = 0.2; // <=1.0. 1.0 - disables temperature dependence
cold_frac
,
// = 0.005; // this and lower will scale fom by cold_scale
hot_frac
,
// = 0.9; // this and above will scale fom by 1.0
min_strength
,
// = 0.08;
seed_rows
,
// = 5; // sky should appear in this top rows
lowest_sky_row
,
// = 50;// appears that low - invalid, remove completely
sky_highest_min
,
// = 100; // lowest absolute value should not be higher (requires photometric)
dsi
[
TwoQuadCLT
.
DSI_STRENGTH_AUX
],
// double [] strength,
dsi
[
TwoQuadCLT
.
DSI_SPREAD_AUX
],
// double [] spread,
dsi
[
TwoQuadCLT
.
DSI_DISPARITY_AUX_LMA
],
// double [] spread,
...
...
@@ -4311,6 +4326,13 @@ public class OpticalFlow {
sky_lim
,
// double sky_lim, // = 15.0; // then expand to product of strength by diff_second below this
sky_shrink
,
// int sky_shrink, // = 4;
sky_expand_extra
,
// int sky_expand_extra, // = 100; // 1?
cold_scale
,
// = 0.2; // <=1.0. 1.0 - disables temperature dependence
cold_frac
,
// = 0.005; // this and lower will scale fom by cold_scale
hot_frac
,
// = 0.9; // this and above will scale fom by 1.0
min_strength
,
// = 0.08;
seed_rows
,
// = 5; // sky should appear in this top rows
lowest_sky_row
,
// = 50;// appears that low - invalid, remove completely
sky_highest_min
,
// = 100; // lowest absolute value should not be higher (requires photometric)
dsi
[
TwoQuadCLT
.
DSI_STRENGTH_AUX
],
// double [] strength,
dsi
[
TwoQuadCLT
.
DSI_SPREAD_AUX
],
// double [] spread,
dsi
[
TwoQuadCLT
.
DSI_DISPARITY_AUX_LMA
],
//double [] disp_lma,
...
...
src/main/java/com/elphel/imagej/tileprocessor/QuadCLTCPU.java
View file @
ad8191c2
...
...
@@ -153,6 +153,7 @@ public class QuadCLTCPU {
boolean
is_aux
=
false
;
double
[]
lwir_offsets
=
null
;
// per image subtracted values
double
[]
lwir_scales
=
null
;
// per image scales
//double [] lwir_scales2 = null; // per image quadratic scales
@Deprecated
double
lwir_offset
=
Double
.
NaN
;
// average of lwir_offsets[]
// hot and cold are calculated during autoranging (when generating 4 images for restored (added lwir_offset)
...
...
@@ -442,6 +443,13 @@ public class QuadCLTCPU {
double
sky_lim
,
// = 15.0; // then expand to product of strength by diff_second below this
int
sky_shrink
,
// = 4;
int
sky_expand_extra
,
// = 100; // 1?
double
cold_scale
,
// = 0.2; // <=1.0. 1.0 - disables temperature dependence
double
cold_frac
,
// = 0.005; // this and lower will scale fom by cold_scale
double
hot_frac
,
// = 0.9; // this and above will scale fom by 1.0
double
min_strength
,
// = 0.08;
int
seed_rows
,
// = 5; // sky should appear in this top rows
int
lowest_sky_row
,
// = 50;// appears that low - invalid, remove completely
double
sky_highest_min
,
// = -50; // 100; // lowest absolute value should not be higher (requires photometric)
int
width
,
double
[]
strength
,
double
[]
spread
,
...
...
@@ -452,15 +460,16 @@ public class QuadCLTCPU {
return
null
;
}
double
[]
temp_scales
=
null
;
/*
double cold_scale = 0.2; // <=1.0. 1.0 - disables temperature dependence
double cold_frac = 0.005; // this and lower will scale fom by cold_scale
double hot_frac = 0.9; // this and above will scale fom by 1.0
double min_strength = 0.08;
int seed_rows = 5; // sky should appear in this top rows
int
num_bins
=
1000
;
*/
boolean
failure
=
false
;
if
(
avg_val
!=
null
)
{
int
num_bins
=
1000
;
double
min_temp
=
Double
.
NaN
,
max_temp
=
Double
.
NaN
,
avg_temp
=
0
;
int
num_def
=
0
;
for
(
int
i
=
0
;
i
<
avg_val
.
length
;
i
++)
{
...
...
@@ -513,6 +522,10 @@ public class QuadCLTCPU {
break
;
}
}
if
(
temp_cold
>
sky_highest_min
)
{
System
.
out
.
println
(
"getBlueSky(): Coldest offset value "
+
temp_cold
+
" > "
+
sky_highest_min
+
" - invalid sky"
);
failure
=
true
;
}
temp_scales
=
new
double
[
avg_val
.
length
];
Arrays
.
fill
(
temp_scales
,
Double
.
NaN
);
double
kscale
=
(
1.0
-
cold_scale
)/(
temp_hot
-
temp_cold
);
...
...
@@ -607,7 +620,16 @@ public class QuadCLTCPU {
"sky_selection"
,
dbg_titles
);
// dsrbg_titles);
}
for
(
int
i
=
lowest_sky_row
*
width
;
i
<
sky_tiles
.
length
;
i
++)
{
if
(
sky_tiles
[
i
])
{
System
.
out
.
println
(
"getBlueSky(): sky area appeared too low - at row "
+(
i
/
width
)+
" >= "
+
lowest_sky_row
+
" removing blue sky"
);
failure
=
true
;
break
;
}
}
if
(
failure
)
{
// Will still show in debug images !!!
Arrays
.
fill
(
sky_tiles
,
false
);
}
return
sky_tiles
;
}
...
...
@@ -625,6 +647,13 @@ public class QuadCLTCPU {
double
sky_lim
,
// = 15.0; // then expand to product of strength by diff_second below this
int
sky_shrink
,
// = 4;
int
sky_expand_extra
,
// = 100; // 1?
double
cold_scale
,
// = 0.2; // <=1.0. 1.0 - disables temperature dependence
double
cold_frac
,
// = 0.005; // this and lower will scale fom by cold_scale
double
hot_frac
,
// = 0.9; // this and above will scale fom by 1.0
double
min_strength
,
// = 0.08;
int
seed_rows
,
// = 5; // sky should appear in this top rows
int
lowest_sky_row
,
// = 50;// appears that low - invalid, remove completely
double
sky_highest_max
,
// = 100; // lowest absolute value should not be higher (requires photometric)
double
[]
strength
,
double
[]
spread
,
double
[]
disp_lma
,
...
...
@@ -637,6 +666,13 @@ public class QuadCLTCPU {
sky_lim
,
// = 15.0; // then expand to product of strength by diff_second below this
sky_shrink
,
// = 4;
sky_expand_extra
,
// = 100; // 1?
cold_scale
,
// = 0.2; // <=1.0. 1.0 - disables temperature dependence
cold_frac
,
// = 0.005; // this and lower will scale fom by cold_scale
hot_frac
,
// = 0.9; // this and above will scale fom by 1.0
min_strength
,
// = 0.08;
seed_rows
,
// = 5; // sky should appear in this top rows
lowest_sky_row
,
// = 50;// appears that low - invalid, remove completely
sky_highest_max
,
// = 100; // lowest absolute value should not be higher (requires photometric)
width
,
strength
,
spread
,
...
...
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