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
388be26d
Commit
388be26d
authored
Jun 26, 2024
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented saving parameters with the model version, fixed bugs
parent
a8fe8f68
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
113 additions
and
29 deletions
+113
-29
CLTParameters.java
src/main/java/com/elphel/imagej/cameras/CLTParameters.java
+1
-1
Eyesis_Correction.java
.../java/com/elphel/imagej/correction/Eyesis_Correction.java
+46
-26
MultipleExtensionsFileFilter.java
...lphel/imagej/correction/MultipleExtensionsFileFilter.java
+38
-0
ErsCorrection.java
...n/java/com/elphel/imagej/tileprocessor/ErsCorrection.java
+1
-1
IntersceneMatchParameters.java
...lphel/imagej/tileprocessor/IntersceneMatchParameters.java
+1
-1
OpticalFlow.java
...ain/java/com/elphel/imagej/tileprocessor/OpticalFlow.java
+11
-0
QuadCLTCPU.java
...main/java/com/elphel/imagej/tileprocessor/QuadCLTCPU.java
+15
-0
No files found.
src/main/java/com/elphel/imagej/cameras/CLTParameters.java
View file @
388be26d
...
@@ -504,7 +504,7 @@ public class CLTParameters {
...
@@ -504,7 +504,7 @@ public class CLTParameters {
public
double
gmap_discard_rdisp
=
0.02
;
// discard above/below this fraction of average height
public
double
gmap_discard_rdisp
=
0.02
;
// discard above/below this fraction of average height
public
double
gmap_pix_size
=
0.005
;
// hdr_x0y0, // in meters
public
double
gmap_pix_size
=
0.005
;
// hdr_x0y0, // in meters
public
int
gmap_max_image_width
=
4000
;
// 3200; // increase pixel size as a power of 2 until image fits
public
int
gmap_max_image_width
=
4000
;
// 3200; // increase pixel size as a power of 2 until image fits
public
double
gmap_min_sfm
=
10.0
;
// minimal SfM gain to keep ground map
public
double
gmap_min_sfm
=
2.0
;
//
10.0; // minimal SfM gain to keep ground map
public
double
gmap_frac_sfm
=
0.25
;
// Disregard SfM mask if lower good SfM area
public
double
gmap_frac_sfm
=
0.25
;
// Disregard SfM mask if lower good SfM area
public
boolean
gmap_crop_empty
=
true
;
public
boolean
gmap_crop_empty
=
true
;
public
int
gmap_crop_extra
=
20
;
public
int
gmap_crop_extra
=
20
;
...
...
src/main/java/com/elphel/imagej/correction/Eyesis_Correction.java
View file @
388be26d
This diff is collapsed.
Click to expand it.
src/main/java/com/elphel/imagej/correction/MultipleExtensionsFileFilter.java
0 → 100644
View file @
388be26d
package
com
.
elphel
.
imagej
.
correction
;
import
java.io.File
;
import
javax.swing.filechooser.FileFilter
;
public
class
MultipleExtensionsFileFilter
extends
FileFilter
{
protected
String
[]
patterns
;
protected
String
description
=
"JP4 files"
;
public
MultipleExtensionsFileFilter
(
String
[]
patterns
,
String
description
)
{
this
.
description
=
description
;
this
.
patterns
=
patterns
.
clone
();
}
public
MultipleExtensionsFileFilter
(
String
[]
patterns
)
{
this
.
patterns
=
patterns
.
clone
();
}
@Override
public
boolean
accept
(
File
file
)
{
int
i
;
String
name
=
file
.
getName
();
if
(
file
.
isDirectory
())
return
true
;
for
(
i
=
0
;
i
<
patterns
.
length
;
i
++)
{
if
(
name
.
toLowerCase
().
endsWith
(
patterns
[
i
].
toLowerCase
()))
return
true
;
}
return
false
;
}
@Override
public
String
getDescription
()
{
return
description
;
}
}
src/main/java/com/elphel/imagej/tileprocessor/ErsCorrection.java
View file @
388be26d
...
@@ -1075,7 +1075,7 @@ public class ErsCorrection extends GeometryCorrection {
...
@@ -1075,7 +1075,7 @@ public class ErsCorrection extends GeometryCorrection {
System
.
arraycopy
(
deltas0
,
0
,
deltas
,
0
,
deltas0
.
length
);
System
.
arraycopy
(
deltas0
,
0
,
deltas
,
0
,
deltas0
.
length
);
System
.
arraycopy
(
deltas0
,
3
,
deltas
,
deltas0
.
length
,
deltas0
.
length
-
3
);
System
.
arraycopy
(
deltas0
,
3
,
deltas
,
deltas0
.
length
,
deltas0
.
length
-
3
);
for
(
int
i
=
0
;
i
<
deltas
.
length
;
i
++)
deltas
[
i
]
*=
scale_delta
;
for
(
int
i
=
0
;
i
<
deltas
.
length
;
i
++)
deltas
[
i
]
*=
scale_delta
;
int
dbg_tile
=
7508
;
// 56:23 // 16629;
int
dbg_tile
=
-
7508
;
// 56:23 // 16629;
ErsCorrection
scene_ers
=
scene_QuadClt
.
getErsCorrection
();
ErsCorrection
scene_ers
=
scene_QuadClt
.
getErsCorrection
();
TileProcessor
tp
=
reference_QuadClt
.
getTileProcessor
();
TileProcessor
tp
=
reference_QuadClt
.
getTileProcessor
();
int
tilesX
=
tp
.
getTilesX
();
int
tilesX
=
tp
.
getTilesX
();
...
...
src/main/java/com/elphel/imagej/tileprocessor/IntersceneMatchParameters.java
View file @
388be26d
...
@@ -65,7 +65,7 @@ public class IntersceneMatchParameters {
...
@@ -65,7 +65,7 @@ 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
=
0.6
;
// 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
=
3
.0
;
// 5.0; // Minimal SfM gain to apply SfM to the depth map
public
double
sfm_min_gain
=
2
.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
...
...
src/main/java/com/elphel/imagej/tileprocessor/OpticalFlow.java
View file @
388be26d
...
@@ -6492,6 +6492,17 @@ public class OpticalFlow {
...
@@ -6492,6 +6492,17 @@ public class OpticalFlow {
start_ref_pointers
[
0
]
=
earliest_scene
;
start_ref_pointers
[
0
]
=
earliest_scene
;
start_ref_pointers
[
1
]
=
ref_index
;
start_ref_pointers
[
1
]
=
ref_index
;
}
}
// temporary fix save/restore linkedModels, sourceDirectory, sourcePaths
// that are copied main-> aux in EyesisCorrectionParameters.updateAuxFromMain()
// quadCLT_main.correctionsParameters
String
bkp_linkedModels
=
quadCLT_main
.
correctionsParameters
.
linkedModels
;
String
bkp_sourceDirectory
=
quadCLT_main
.
correctionsParameters
.
sourceDirectory
;
String
[]
bkp_sourcePaths
=
quadCLT_main
.
correctionsParameters
.
sourcePaths
;
quadCLTs
[
ref_index
].
saveConfInModelDirectory
();
// save all (global) configurations in model/version directory
quadCLT_main
.
correctionsParameters
.
linkedModels
=
bkp_linkedModels
;
quadCLT_main
.
correctionsParameters
.
sourceDirectory
=
bkp_sourceDirectory
;
quadCLT_main
.
correctionsParameters
.
sourcePaths
=
bkp_sourcePaths
;
System
.
out
.
println
(
"buildSeries(): DONE"
);
//
System
.
out
.
println
(
"buildSeries(): DONE"
);
//
return
quadCLTs
[
ref_index
].
getX3dTopDirectory
();
return
quadCLTs
[
ref_index
].
getX3dTopDirectory
();
}
}
...
...
src/main/java/com/elphel/imagej/tileprocessor/QuadCLTCPU.java
View file @
388be26d
...
@@ -4979,6 +4979,21 @@ public class QuadCLTCPU {
...
@@ -4979,6 +4979,21 @@ public class QuadCLTCPU {
return
file_path
;
return
file_path
;
}
}
public
String
saveConfInModelDirectory
()
{
String
x3d_path
=
getX3dDirectory
();
String
file_name
=
image_name
+
"-SETTINGS"
;
String
file_path
=
x3d_path
+
Prefs
.
getFileSeparator
()
+
file_name
;
Properties
properties
=
new
Properties
();
Eyesis_Correction
.
saveProperties
(
file_path
,
null
,
true
,
properties
,
0
);
// DEBUG_LEVEL >-3);
return
file_path
;
}
public
String
saveAVIInModelDirectory
(
public
String
saveAVIInModelDirectory
(
boolean
dry_run
,
boolean
dry_run
,
...
...
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