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
4f7e40a1
Commit
4f7e40a1
authored
Oct 26, 2024
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed wrong elevation sign, testing with various parameters
parent
65a99dbc
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
410 additions
and
181 deletions
+410
-181
IntersceneMatchParameters.java
...lphel/imagej/tileprocessor/IntersceneMatchParameters.java
+9
-6
VegetationLMA.java
...main/java/com/elphel/imagej/vegetation/VegetationLMA.java
+391
-174
VegetationModel.java
...in/java/com/elphel/imagej/vegetation/VegetationModel.java
+10
-1
No files found.
src/main/java/com/elphel/imagej/tileprocessor/IntersceneMatchParameters.java
View file @
4f7e40a1
...
@@ -771,8 +771,7 @@ min_str_neib_fpn 0.35
...
@@ -771,8 +771,7 @@ min_str_neib_fpn 0.35
public
double
terr_difference
=
100.0
;
// vegetation is 100 warmer (target)
public
double
terr_difference
=
100.0
;
// vegetation is 100 warmer (target)
public
double
terr_pull_cold
=
0.001
;
// pull vegetations to warm, terrain to cold
public
double
terr_pull_cold
=
0.001
;
// pull vegetations to warm, terrain to cold
public
double
terr_elevation_radius
=
1.5
;
// Radius of elevation/vegetation influence
public
double
terr_alpha_contrast
=
1.0
;
// initial alpha contrast (>=1.0)
public
double
terr_alpha_contrast
=
1.0
;
// initial alpha contrast (>=1.0)
public
double
terr_alpha_dflt
=
0.5
;
// now unused
public
double
terr_alpha_dflt
=
0.5
;
// now unused
public
double
terr_alpha_loss
=
100.0
;
public
double
terr_alpha_loss
=
100.0
;
...
@@ -2042,6 +2041,8 @@ min_str_neib_fpn 0.35
...
@@ -2042,6 +2041,8 @@ min_str_neib_fpn 0.35
gd
.
addNumericField
(
"Vegetation warmer"
,
terr_difference
,
5
,
7
,
""
,
"Pull vegetation to be this warmer."
);
gd
.
addNumericField
(
"Vegetation warmer"
,
terr_difference
,
5
,
7
,
""
,
"Pull vegetation to be this warmer."
);
gd
.
addNumericField
(
"Pull terrain cold"
,
terr_pull_cold
,
5
,
7
,
""
,
"Pull vegetations to warm, terrain to cold."
);
gd
.
addNumericField
(
"Pull terrain cold"
,
terr_pull_cold
,
5
,
7
,
""
,
"Pull vegetations to warm, terrain to cold."
);
gd
.
addNumericField
(
"Elevation radius"
,
terr_elevation_radius
,
5
,
7
,
"pix"
,
"Radius of elevation/vegetation influence."
);
gd
.
addNumericField
(
"Alpha initial contrast"
,
terr_alpha_contrast
,
5
,
7
,
""
,
"Initial alpha contrast (>= 1.0)."
);
gd
.
addNumericField
(
"Alpha initial contrast"
,
terr_alpha_contrast
,
5
,
7
,
""
,
"Initial alpha contrast (>= 1.0)."
);
gd
.
addNumericField
(
"Defalt alpha"
,
terr_alpha_dflt
,
5
,
7
,
""
,
"Default vegetation alpha."
);
gd
.
addNumericField
(
"Defalt alpha"
,
terr_alpha_dflt
,
5
,
7
,
""
,
"Default vegetation alpha."
);
gd
.
addNumericField
(
"Alpha loss"
,
terr_alpha_loss
,
5
,
7
,
""
,
"Alpha quadratic growing loss for when out of [0,1] range"
);
gd
.
addNumericField
(
"Alpha loss"
,
terr_alpha_loss
,
5
,
7
,
""
,
"Alpha quadratic growing loss for when out of [0,1] range"
);
...
@@ -2073,7 +2074,7 @@ min_str_neib_fpn 0.35
...
@@ -2073,7 +2074,7 @@ min_str_neib_fpn 0.35
gd
.
addNumericField
(
"Lambda scale on good"
,
terr_lambda_scale_good
,
5
,
7
,
""
,
"Scale lambda if RMSE improved."
);
gd
.
addNumericField
(
"Lambda scale on good"
,
terr_lambda_scale_good
,
5
,
7
,
""
,
"Scale lambda if RMSE improved."
);
gd
.
addNumericField
(
"Lambda scale on bad"
,
terr_lambda_scale_bad
,
5
,
7
,
""
,
"Scale lambda if RMSE worsened."
);
gd
.
addNumericField
(
"Lambda scale on bad"
,
terr_lambda_scale_bad
,
5
,
7
,
""
,
"Scale lambda if RMSE worsened."
);
gd
.
addNumericField
(
"Lambda max to fail"
,
terr_lambda_max
,
5
,
7
,
""
,
"Fail if lambda gets larger than that."
);
gd
.
addNumericField
(
"Lambda max to fail"
,
terr_lambda_max
,
5
,
7
,
""
,
"Fail if lambda gets larger than that."
);
gd
.
addNumericField
(
"RMSE difference"
,
terr_rms_diff
,
8
,
10
,
""
,
"Exit if RMSE improvement is lower."
);
gd
.
addNumericField
(
"RMSE difference"
,
terr_rms_diff
,
10
,
12
,
""
,
"Exit if RMSE improvement is lower."
);
gd
.
addNumericField
(
"(Maximal) iterations"
,
terr_num_iter
,
0
,
3
,
""
,
"Maximal number of LMA iterations."
);
gd
.
addNumericField
(
"(Maximal) iterations"
,
terr_num_iter
,
0
,
3
,
""
,
"Maximal number of LMA iterations."
);
gd
.
addMessage
(
"Combining LMA results segments"
);
gd
.
addMessage
(
"Combining LMA results segments"
);
...
@@ -2751,6 +2752,7 @@ min_str_neib_fpn 0.35
...
@@ -2751,6 +2752,7 @@ min_str_neib_fpn 0.35
terr_min_split_frac
=
gd
.
getNextNumber
();
// double
terr_min_split_frac
=
gd
.
getNextNumber
();
// double
terr_difference
=
gd
.
getNextNumber
();
// double
terr_difference
=
gd
.
getNextNumber
();
// double
terr_pull_cold
=
gd
.
getNextNumber
();
// double
terr_pull_cold
=
gd
.
getNextNumber
();
// double
terr_elevation_radius
=
gd
.
getNextNumber
();
// double
terr_alpha_contrast
=
gd
.
getNextNumber
();
// double
terr_alpha_contrast
=
gd
.
getNextNumber
();
// double
terr_alpha_dflt
=
gd
.
getNextNumber
();
// double
terr_alpha_dflt
=
gd
.
getNextNumber
();
// double
terr_alpha_loss
=
gd
.
getNextNumber
();
// double
terr_alpha_loss
=
gd
.
getNextNumber
();
// double
...
@@ -3427,8 +3429,8 @@ min_str_neib_fpn 0.35
...
@@ -3427,8 +3429,8 @@ min_str_neib_fpn 0.35
properties
.
setProperty
(
prefix
+
"terr_difference"
,
terr_difference
+
""
);
// double
properties
.
setProperty
(
prefix
+
"terr_difference"
,
terr_difference
+
""
);
// double
properties
.
setProperty
(
prefix
+
"terr_pull_cold"
,
terr_pull_cold
+
""
);
// double
properties
.
setProperty
(
prefix
+
"terr_pull_cold"
,
terr_pull_cold
+
""
);
// double
properties
.
setProperty
(
prefix
+
"terr_elevation_radius"
,
terr_elevation_radius
+
""
);
// double
properties
.
setProperty
(
prefix
+
"terr_alpha_contrast"
,
terr_alpha_contrast
+
""
);
// double
properties
.
setProperty
(
prefix
+
"terr_alpha_contrast"
,
terr_alpha_contrast
+
""
);
// double
properties
.
setProperty
(
prefix
+
"terr_alpha_dflt"
,
terr_alpha_dflt
+
""
);
// double
properties
.
setProperty
(
prefix
+
"terr_alpha_dflt"
,
terr_alpha_dflt
+
""
);
// double
properties
.
setProperty
(
prefix
+
"terr_alpha_loss"
,
terr_alpha_loss
+
""
);
// double
properties
.
setProperty
(
prefix
+
"terr_alpha_loss"
,
terr_alpha_loss
+
""
);
// double
properties
.
setProperty
(
prefix
+
"terr_alpha_offset"
,
terr_alpha_offset
+
""
);
// double
properties
.
setProperty
(
prefix
+
"terr_alpha_offset"
,
terr_alpha_offset
+
""
);
// double
...
@@ -4125,8 +4127,8 @@ min_str_neib_fpn 0.35
...
@@ -4125,8 +4127,8 @@ min_str_neib_fpn 0.35
if
(
properties
.
getProperty
(
prefix
+
"terr_difference"
)!=
null
)
terr_difference
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"terr_difference"
));
if
(
properties
.
getProperty
(
prefix
+
"terr_difference"
)!=
null
)
terr_difference
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"terr_difference"
));
if
(
properties
.
getProperty
(
prefix
+
"terr_pull_cold"
)!=
null
)
terr_pull_cold
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"terr_pull_cold"
));
if
(
properties
.
getProperty
(
prefix
+
"terr_pull_cold"
)!=
null
)
terr_pull_cold
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"terr_pull_cold"
));
if
(
properties
.
getProperty
(
prefix
+
"terr_elevation_radius"
)!=
null
)
terr_elevation_radius
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"terr_elevation_radius"
));
if
(
properties
.
getProperty
(
prefix
+
"terr_alpha_contrast"
)!=
null
)
terr_alpha_contrast
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"terr_alpha_contrast"
));
if
(
properties
.
getProperty
(
prefix
+
"terr_alpha_contrast"
)!=
null
)
terr_alpha_contrast
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"terr_alpha_contrast"
));
if
(
properties
.
getProperty
(
prefix
+
"terr_alpha_dflt"
)!=
null
)
terr_alpha_dflt
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"terr_alpha_dflt"
));
if
(
properties
.
getProperty
(
prefix
+
"terr_alpha_dflt"
)!=
null
)
terr_alpha_dflt
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"terr_alpha_dflt"
));
if
(
properties
.
getProperty
(
prefix
+
"terr_alpha_loss"
)!=
null
)
terr_alpha_loss
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"terr_alpha_loss"
));
if
(
properties
.
getProperty
(
prefix
+
"terr_alpha_loss"
)!=
null
)
terr_alpha_loss
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"terr_alpha_loss"
));
if
(
properties
.
getProperty
(
prefix
+
"terr_alpha_offset"
)!=
null
)
terr_alpha_offset
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"terr_alpha_offset"
));
if
(
properties
.
getProperty
(
prefix
+
"terr_alpha_offset"
)!=
null
)
terr_alpha_offset
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"terr_alpha_offset"
));
...
@@ -4791,6 +4793,7 @@ min_str_neib_fpn 0.35
...
@@ -4791,6 +4793,7 @@ min_str_neib_fpn 0.35
imp
.
terr_min_split_frac
=
this
.
terr_min_split_frac
;
imp
.
terr_min_split_frac
=
this
.
terr_min_split_frac
;
imp
.
terr_difference
=
this
.
terr_difference
;
imp
.
terr_difference
=
this
.
terr_difference
;
imp
.
terr_pull_cold
=
this
.
terr_pull_cold
;
imp
.
terr_pull_cold
=
this
.
terr_pull_cold
;
imp
.
terr_elevation_radius
=
this
.
terr_elevation_radius
;
imp
.
terr_alpha_contrast
=
this
.
terr_alpha_contrast
;
imp
.
terr_alpha_contrast
=
this
.
terr_alpha_contrast
;
imp
.
terr_alpha_dflt
=
this
.
terr_alpha_dflt
;
imp
.
terr_alpha_dflt
=
this
.
terr_alpha_dflt
;
imp
.
terr_alpha_loss
=
this
.
terr_alpha_loss
;
imp
.
terr_alpha_loss
=
this
.
terr_alpha_loss
;
...
...
src/main/java/com/elphel/imagej/vegetation/VegetationLMA.java
View file @
4f7e40a1
This diff is collapsed.
Click to expand it.
src/main/java/com/elphel/imagej/vegetation/VegetationModel.java
View file @
4f7e40a1
...
@@ -2,7 +2,9 @@ package com.elphel.imagej.vegetation;
...
@@ -2,7 +2,9 @@ package com.elphel.imagej.vegetation;
import
java.awt.Rectangle
;
import
java.awt.Rectangle
;
import
java.io.File
;
import
java.io.File
;
import
java.text.SimpleDateFormat
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.Calendar
;
import
java.util.concurrent.atomic.AtomicInteger
;
import
java.util.concurrent.atomic.AtomicInteger
;
import
org.apache.commons.math3.analysis.interpolation.PiecewiseBicubicSplineInterpolatingFunction
;
import
org.apache.commons.math3.analysis.interpolation.PiecewiseBicubicSplineInterpolatingFunction
;
...
@@ -1394,7 +1396,7 @@ public class VegetationModel {
...
@@ -1394,7 +1396,7 @@ public class VegetationModel {
// double min_split_frac = clt_parameters.imp.terr_min_split_frac;// 0.15;
// double min_split_frac = clt_parameters.imp.terr_min_split_frac;// 0.15;
double
terr_difference
=
clt_parameters
.
imp
.
terr_difference
;
// Pull vegetation to be this warmer
double
terr_difference
=
clt_parameters
.
imp
.
terr_difference
;
// Pull vegetation to be this warmer
double
terr_pull_cold
=
clt_parameters
.
imp
.
terr_pull_cold
;
// pull vegetations to warm, terrain to cold
double
terr_pull_cold
=
clt_parameters
.
imp
.
terr_pull_cold
;
// pull vegetations to warm, terrain to cold
double
elevation_radius
=
clt_parameters
.
imp
.
terr_elevation_radius
;
// Radius of elevation/vegetation influence
double
alpha_initial_contrast
=
clt_parameters
.
imp
.
terr_alpha_contrast
;
// initial alpha contrast (>=1.0)
double
alpha_initial_contrast
=
clt_parameters
.
imp
.
terr_alpha_contrast
;
// initial alpha contrast (>=1.0)
double
default_alpha
=
clt_parameters
.
imp
.
terr_alpha_dflt
;
// 0.5; // 0.8;
double
default_alpha
=
clt_parameters
.
imp
.
terr_alpha_dflt
;
// 0.5; // 0.8;
double
alpha_loss
=
clt_parameters
.
imp
.
terr_alpha_loss
;
//100.0; // 10.0; /// 100.0; // 10.0; // 10000.0; // 1000.0; // 100.; // 10.0; // quadratic loss when alpha reaches -1.0 or 2.0
double
alpha_loss
=
clt_parameters
.
imp
.
terr_alpha_loss
;
//100.0; // 10.0; /// 100.0; // 10.0; // 10000.0; // 1000.0; // 100.; // 10.0; // quadratic loss when alpha reaches -1.0 or 2.0
...
@@ -1933,6 +1935,7 @@ public class VegetationModel {
...
@@ -1933,6 +1935,7 @@ public class VegetationModel {
// min_split_frac, // final double min_frac, // minimal modality fraction to use split by temperature
// min_split_frac, // final double min_frac, // minimal modality fraction to use split by temperature
terr_difference
,
// final double terr_difference, // pull vegetation to be this warmer
terr_difference
,
// final double terr_difference, // pull vegetation to be this warmer
terr_pull_cold
,
// final double terr_pull_cold, // pull vegetations to warm, terrain to cold
terr_pull_cold
,
// final double terr_pull_cold, // pull vegetations to warm, terrain to cold
elevation_radius
,
// final double elevation_radius, // Radius of elevation/vegetation influence.
default_alpha
,
// final double default_alpha,
default_alpha
,
// final double default_alpha,
hifreq_weight
,
//final double hifreq_weight, // 22.5 0 - do not use high-freq. Relative weight of laplacian components
hifreq_weight
,
//final double hifreq_weight, // 22.5 0 - do not use high-freq. Relative weight of laplacian components
fit_terr
,
// final boolean adjust_terr,
fit_terr
,
// final boolean adjust_terr,
...
@@ -2031,6 +2034,12 @@ public class VegetationModel {
...
@@ -2031,6 +2034,12 @@ public class VegetationModel {
last_run
,
// boolean last_run,
last_run
,
// boolean last_run,
null
,
// String dbg_prefix,
null
,
// String dbg_prefix,
debugLevel
);
// int debug_level)
debugLevel
);
// int debug_level)
if
(
debugLevel
>
-
2
)
{
// 1) {
System
.
out
.
println
((
new
SimpleDateFormat
(
"yyyy/MM/dd HH:mm:ss"
).
format
(
Calendar
.
getInstance
().
getTime
()))+
" LMA finished"
);
}
// save results
// save results
if
(
save_par_files
)
{
if
(
save_par_files
)
{
String
restore_dir
=
segments_dir
;
// vegetationLMA.debug_path;
String
restore_dir
=
segments_dir
;
// vegetationLMA.debug_path;
...
...
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