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
b3ad74ea
Commit
b3ad74ea
authored
Nov 08, 2024
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
restored loading initial LMA parameters from the previously saved ones
parent
a8718162
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
495 additions
and
373 deletions
+495
-373
IntersceneMatchParameters.java
...lphel/imagej/tileprocessor/IntersceneMatchParameters.java
+40
-16
VegetationLMA.java
...main/java/com/elphel/imagej/vegetation/VegetationLMA.java
+303
-276
VegetationModel.java
...in/java/com/elphel/imagej/vegetation/VegetationModel.java
+150
-81
VegetationSegment.java
.../java/com/elphel/imagej/vegetation/VegetationSegment.java
+2
-0
No files found.
src/main/java/com/elphel/imagej/tileprocessor/IntersceneMatchParameters.java
View file @
b3ad74ea
...
@@ -723,6 +723,9 @@ min_str_neib_fpn 0.35
...
@@ -723,6 +723,9 @@ min_str_neib_fpn 0.35
public
String
terr_model_path
=
"/media/elphel/SSD3-4GB/lwir16-proc/berdich3/models/models_1697875868-1697879449-b/1697877487_245877/v35"
;
public
String
terr_model_path
=
"/media/elphel/SSD3-4GB/lwir16-proc/berdich3/models/models_1697875868-1697879449-b/1697877487_245877/v35"
;
public
String
terr_model_state
=
"1697877487_245877-TERR-VEG-STATE"
;
public
String
terr_model_state
=
"1697877487_245877-TERR-VEG-STATE"
;
public
String
terr_segments_dir
=
"sections"
;
public
String
terr_segments_dir
=
"sections"
;
public
String
terr_par_dir
=
""
;
// directory path to intermediate parameters
public
String
terr_par_file
=
""
;
// file name of the intermediate parameters
public
boolean
terr_par_restore
=
false
;
// restore parameters from file
// terrain/vegetation parameters
// terrain/vegetation parameters
public
boolean
terr_um_en
=
true
;
public
boolean
terr_um_en
=
true
;
public
double
terr_um_sigma
=
1.0
;
public
double
terr_um_sigma
=
1.0
;
...
@@ -1995,7 +1998,11 @@ min_str_neib_fpn 0.35
...
@@ -1995,7 +1998,11 @@ min_str_neib_fpn 0.35
gd
.
addTab
(
"Vegetation"
,
"See through foliage parameters"
);
gd
.
addTab
(
"Vegetation"
,
"See through foliage parameters"
);
gd
.
addStringField
(
"Model path"
,
terr_model_path
,
120
,
"Model directory path with version."
);
gd
.
addStringField
(
"Model path"
,
terr_model_path
,
120
,
"Model directory path with version."
);
gd
.
addStringField
(
"Model state file"
,
terr_model_state
,
50
,
"Model vegetation source data (w/o extension)."
);
gd
.
addStringField
(
"Model state file"
,
terr_model_state
,
50
,
"Model vegetation source data (w/o extension)."
);
gd
.
addStringField
(
"Segments subdir"
,
terr_segments_dir
,
50
,
"Model vegetation source data (w/o extension)."
);
gd
.
addStringField
(
"Segments subdir"
,
terr_segments_dir
,
50
,
"Model vegetation source data (w/o extension)."
);
gd
.
addStringField
(
"Restore directory"
,
terr_par_dir
,
120
,
"Directory to resore initial parameters from."
);
gd
.
addStringField
(
"Restore file"
,
terr_par_file
,
120
,
"Filename to resore initial parameters from."
);
gd
.
addCheckbox
(
"Restore parameters"
,
terr_par_restore
,
"Restore initial parameters from file before running LMA."
);
gd
.
addMessage
(
"Unsharp mask filter of the input data (currently not used as both DC and HF fitting are implemented simultaneously)."
);
gd
.
addMessage
(
"Unsharp mask filter of the input data (currently not used as both DC and HF fitting are implemented simultaneously)."
);
gd
.
addCheckbox
(
"Enable UM"
,
terr_um_en
,
"Enable unsharp mask filter."
);
gd
.
addCheckbox
(
"Enable UM"
,
terr_um_en
,
"Enable unsharp mask filter."
);
...
@@ -2717,19 +2724,24 @@ min_str_neib_fpn 0.35
...
@@ -2717,19 +2724,24 @@ min_str_neib_fpn 0.35
terr_model_path
=
gd
.
getNextString
();
terr_model_path
=
gd
.
getNextString
();
terr_model_state
=
gd
.
getNextString
();
terr_model_state
=
gd
.
getNextString
();
terr_segments_dir
=
gd
.
getNextString
();
terr_segments_dir
=
gd
.
getNextString
();
terr_um_en
=
gd
.
getNextBoolean
();
// boolean
terr_um_sigma
=
gd
.
getNextNumber
();
// double
terr_par_dir
=
gd
.
getNextString
();
terr_um_weight
=
gd
.
getNextNumber
();
// double
terr_par_file
=
gd
.
getNextString
();
terr_nan_tolerance
=
gd
.
getNextNumber
();
// double
terr_par_restore
=
gd
.
getNextBoolean
();
// boolean
terr_nan_grow
=
(
int
)
gd
.
getNextNumber
();
// int
terr_um_en
=
gd
.
getNextBoolean
();
// boolean
terr_shrink_veget
=
(
int
)
gd
.
getNextNumber
();
// int
terr_um_sigma
=
gd
.
getNextNumber
();
// double
terr_shrink_terrain
=(
int
)
gd
.
getNextNumber
();
// int
terr_um_weight
=
gd
.
getNextNumber
();
// double
terr_vegetation_over
=
gd
.
getNextNumber
();
// double
terr_nan_tolerance
=
gd
.
getNextNumber
();
// double
terr_filter_veget
=
(
int
)
gd
.
getNextNumber
();
// int
terr_nan_grow
=
(
int
)
gd
.
getNextNumber
();
// int
terr_tile_woi
=
gd
.
getNextBoolean
();
// boolean
terr_shrink_veget
=
(
int
)
gd
.
getNextNumber
();
// int
terr_continue
=
gd
.
getNextBoolean
();
// boolean
terr_shrink_terrain
=(
int
)
gd
.
getNextNumber
();
// int
terr_vegetation_over
=
gd
.
getNextNumber
();
// double
terr_filter_veget
=
(
int
)
gd
.
getNextNumber
();
// int
terr_tile_woi
=
gd
.
getNextBoolean
();
// boolean
terr_continue
=
gd
.
getNextBoolean
();
// boolean
terr_woi_enclos
=
stringToRectangle
(
gd
.
getNextString
());
// Rectangle
terr_woi_enclos
=
stringToRectangle
(
gd
.
getNextString
());
// Rectangle
terr_woi_step
=
stringToRectangle
(
gd
.
getNextString
());
// Rectangle
terr_woi_step
=
stringToRectangle
(
gd
.
getNextString
());
// Rectangle
terr_woi_last
=
stringToRectangle
(
gd
.
getNextString
());
// Rectangle
terr_woi_last
=
stringToRectangle
(
gd
.
getNextString
());
// Rectangle
...
@@ -3395,6 +3407,10 @@ min_str_neib_fpn 0.35
...
@@ -3395,6 +3407,10 @@ min_str_neib_fpn 0.35
properties
.
setProperty
(
prefix
+
"terr_model_state"
,
terr_model_state
+
""
);
// String
properties
.
setProperty
(
prefix
+
"terr_model_state"
,
terr_model_state
+
""
);
// String
properties
.
setProperty
(
prefix
+
"terr_segments_dir"
,
terr_segments_dir
+
""
);
// String
properties
.
setProperty
(
prefix
+
"terr_segments_dir"
,
terr_segments_dir
+
""
);
// String
properties
.
setProperty
(
prefix
+
"terr_par_dir"
,
terr_par_dir
+
""
);
// String
properties
.
setProperty
(
prefix
+
"terr_par_file"
,
terr_par_file
+
""
);
// String
properties
.
setProperty
(
prefix
+
"terr_par_restore"
,
terr_par_restore
+
""
);
// boolean
properties
.
setProperty
(
prefix
+
"terr_um_en"
,
terr_um_en
+
""
);
// boolean
properties
.
setProperty
(
prefix
+
"terr_um_en"
,
terr_um_en
+
""
);
// boolean
properties
.
setProperty
(
prefix
+
"terr_um_sigma"
,
terr_um_sigma
+
""
);
// double
properties
.
setProperty
(
prefix
+
"terr_um_sigma"
,
terr_um_sigma
+
""
);
// double
properties
.
setProperty
(
prefix
+
"terr_um_weight"
,
terr_um_weight
+
""
);
// double
properties
.
setProperty
(
prefix
+
"terr_um_weight"
,
terr_um_weight
+
""
);
// double
...
@@ -4095,6 +4111,10 @@ min_str_neib_fpn 0.35
...
@@ -4095,6 +4111,10 @@ min_str_neib_fpn 0.35
if
(
properties
.
getProperty
(
prefix
+
"terr_model_state"
)!=
null
)
terr_model_state
=(
String
)
properties
.
getProperty
(
prefix
+
"terr_model_state"
);
if
(
properties
.
getProperty
(
prefix
+
"terr_model_state"
)!=
null
)
terr_model_state
=(
String
)
properties
.
getProperty
(
prefix
+
"terr_model_state"
);
if
(
properties
.
getProperty
(
prefix
+
"terr_segments_dir"
)!=
null
)
terr_segments_dir
=(
String
)
properties
.
getProperty
(
prefix
+
"terr_segments_dir"
);
if
(
properties
.
getProperty
(
prefix
+
"terr_segments_dir"
)!=
null
)
terr_segments_dir
=(
String
)
properties
.
getProperty
(
prefix
+
"terr_segments_dir"
);
if
(
properties
.
getProperty
(
prefix
+
"terr_par_dir"
)!=
null
)
terr_par_dir
=(
String
)
properties
.
getProperty
(
prefix
+
"terr_par_dir"
);
if
(
properties
.
getProperty
(
prefix
+
"terr_par_file"
)!=
null
)
terr_par_file
=(
String
)
properties
.
getProperty
(
prefix
+
"terr_par_file"
);
if
(
properties
.
getProperty
(
prefix
+
"terr_par_restore"
)!=
null
)
terr_par_restore
=
Boolean
.
parseBoolean
(
properties
.
getProperty
(
prefix
+
"terr_par_restore"
));
if
(
properties
.
getProperty
(
prefix
+
"terr_um_en"
)!=
null
)
terr_um_en
=
Boolean
.
parseBoolean
(
properties
.
getProperty
(
prefix
+
"terr_um_en"
));
if
(
properties
.
getProperty
(
prefix
+
"terr_um_en"
)!=
null
)
terr_um_en
=
Boolean
.
parseBoolean
(
properties
.
getProperty
(
prefix
+
"terr_um_en"
));
if
(
properties
.
getProperty
(
prefix
+
"terr_um_sigma"
)!=
null
)
terr_um_sigma
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"terr_um_sigma"
));
if
(
properties
.
getProperty
(
prefix
+
"terr_um_sigma"
)!=
null
)
terr_um_sigma
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"terr_um_sigma"
));
if
(
properties
.
getProperty
(
prefix
+
"terr_um_weight"
)!=
null
)
terr_um_weight
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"terr_um_weight"
));
if
(
properties
.
getProperty
(
prefix
+
"terr_um_weight"
)!=
null
)
terr_um_weight
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"terr_um_weight"
));
...
@@ -4762,6 +4782,10 @@ min_str_neib_fpn 0.35
...
@@ -4762,6 +4782,10 @@ min_str_neib_fpn 0.35
imp
.
terr_model_state
=
this
.
terr_model_state
;
imp
.
terr_model_state
=
this
.
terr_model_state
;
imp
.
terr_segments_dir
=
this
.
terr_segments_dir
;
imp
.
terr_segments_dir
=
this
.
terr_segments_dir
;
imp
.
terr_par_dir
=
this
.
terr_par_dir
;
imp
.
terr_par_file
=
this
.
terr_par_file
;
imp
.
terr_par_restore
=
this
.
terr_par_restore
;
imp
.
terr_um_en
=
this
.
terr_um_en
;
imp
.
terr_um_en
=
this
.
terr_um_en
;
imp
.
terr_um_sigma
=
this
.
terr_um_sigma
;
imp
.
terr_um_sigma
=
this
.
terr_um_sigma
;
imp
.
terr_um_weight
=
this
.
terr_um_weight
;
imp
.
terr_um_weight
=
this
.
terr_um_weight
;
...
...
src/main/java/com/elphel/imagej/vegetation/VegetationLMA.java
View file @
b3ad74ea
This diff is collapsed.
Click to expand it.
src/main/java/com/elphel/imagej/vegetation/VegetationModel.java
View file @
b3ad74ea
This diff is collapsed.
Click to expand it.
src/main/java/com/elphel/imagej/vegetation/VegetationSegment.java
View file @
b3ad74ea
...
@@ -3,10 +3,12 @@ package com.elphel.imagej.vegetation;
...
@@ -3,10 +3,12 @@ package com.elphel.imagej.vegetation;
import
java.awt.Rectangle
;
import
java.awt.Rectangle
;
public
class
VegetationSegment
{
public
class
VegetationSegment
{
public
Rectangle
woi_veg
;
public
Rectangle
woi
;
public
Rectangle
woi
;
public
double
[]
scene_offsets
;
public
double
[]
scene_offsets
;
public
double
[][]
tva
;
public
double
[][]
tva
;
public
VegetationSegment
(
public
VegetationSegment
(
Rectangle
woi_veg
,
Rectangle
woi
,
Rectangle
woi
,
double
[]
scene_offsets
,
// has NaNs
double
[]
scene_offsets
,
// has NaNs
double
[][]
tva
)
{
double
[][]
tva
)
{
...
...
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