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
1e773119
Commit
1e773119
authored
Nov 02, 2021
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implementing multiple variant of the same noise for intra
parent
05e7dbd3
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
819 additions
and
151 deletions
+819
-151
Eyesis_Correction.java
.../java/com/elphel/imagej/correction/Eyesis_Correction.java
+1
-0
InterIntraLMA.java
...n/java/com/elphel/imagej/tileprocessor/InterIntraLMA.java
+407
-43
OpticalFlow.java
...ain/java/com/elphel/imagej/tileprocessor/OpticalFlow.java
+13
-5
QuadCLTCPU.java
...main/java/com/elphel/imagej/tileprocessor/QuadCLTCPU.java
+35
-7
TwoQuadCLT.java
...main/java/com/elphel/imagej/tileprocessor/TwoQuadCLT.java
+363
-96
No files found.
src/main/java/com/elphel/imagej/correction/Eyesis_Correction.java
View file @
1e773119
...
...
@@ -7255,6 +7255,7 @@ private Panel panel1,
EQUIRECTANGULAR_PARAMETERS
,
// EyesisCorrectionParameters.EquirectangularParameters equirectangularParameters,
PROPERTIES
,
// Properties properties,
bayer_artifacts_debug
,
// boolean bayer_artifacts_debug
-
1
,
// int noise_variant, // <0 - no-variants, compatible with old code
THREADS_MAX
,
// final int threadsMax, // maximal number of threads to launch
UPDATE_STATUS
,
// final boolean updateStatus,
DEBUG_LEVEL
);
...
...
src/main/java/com/elphel/imagej/tileprocessor/InterIntraLMA.java
View file @
1e773119
This diff is collapsed.
Click to expand it.
src/main/java/com/elphel/imagej/tileprocessor/OpticalFlow.java
View file @
1e773119
...
...
@@ -3168,8 +3168,7 @@ public class OpticalFlow {
ColorProcParameters
colorProcParameters
,
QuadCLT
.
SetChannels
[]
set_channels
,
QuadCLT
ref_scene
,
// ordered by increasing timestamps
// double []
NoiseParameters
noise_sigma_level
,
NoiseParameters
noise_sigma_level
,
// only comes with no-noise here
int
debug_level
)
{
...
...
@@ -3197,7 +3196,8 @@ public class OpticalFlow {
scene_names
[
i
],
clt_parameters
,
colorProcParameters
,
//
noise_sigma_level
,
// double [] noise_sigma_level,
noise_sigma_level
,
// double [] noise_sigma_level,only comes with non-noise here, so noise_variant is not needed
-
1
,
// int noise_variant, // <0 - no-variants, compatible with old code
ref_scene
,
// QuadCLTCPU ref_scene, // may be null if scale_fpn <= 0
threadsMax
,
-
1
);
// debug_level);
...
...
@@ -3774,6 +3774,7 @@ public class OpticalFlow {
QuadCLT
ref_scene
,
// ordered by increasing timestamps
// double []
NoiseParameters
noise_sigma_level
,
int
noise_variant
,
// <0 - no-variants, compatible with old code
int
debug_level
)
{
...
...
@@ -3792,6 +3793,7 @@ public class OpticalFlow {
clt_parameters
,
colorProcParameters
,
//
noise_sigma_level
,
// double [] noise_sigma_level,
noise_variant
,
// int noise_variant, // <0 - no-variants, compatible with old code
ref_scene
,
// QuadCLTCPU ref_scene, // may be null if scale_fpn <= 0
threadsMax
,
-
1
);
// debug_level);
...
...
@@ -3832,7 +3834,7 @@ public class OpticalFlow {
}
}
else
{
combo_dsn
=
ref_scene
.
readDoubleArrayFromModelDirectory
(
//"disp", "strength","disp_lma","num_valid"
combo_dsn
=
ref_scene
.
readDoubleArrayFromModelDirectory
(
//"disp", "strength","disp_lma","num_valid"
"-results-nonoise"
+
(
read_nonoise_lma
?
"-lma"
:
"-nolma"
),
// String suffix,
combo_dsn_titles
.
length
-
1
,
// 4
null
);
// int [] wh);
...
...
@@ -3845,7 +3847,7 @@ public class OpticalFlow {
final
int
margin
=
8
;
final
int
tilesX
=
ref_scene
.
getTileProcessor
().
getTilesX
();
final
int
tilesY
=
ref_scene
.
getTileProcessor
().
getTilesY
();
if
(
debug_level
>
-
1
)
{
if
(
debug_level
>
0
)
{
int
extra
=
10
;
// pixels around largest outline
int
scale
=
4
;
...
...
@@ -4011,6 +4013,12 @@ public class OpticalFlow {
//rslt_suffix +="-mask"+clt_parameters.img_dtt.dbg_pair_mask;
}
rslt_suffix
+=
(
clt_parameters
.
correlate_lma
?
"-lma"
:
"-nolma"
);
if
(
noise_variant
>=
0
)
{
rslt_suffix
+=
"-variant"
+
noise_variant
;
}
// int noise_variant, // <0 - no-variants, compatible with old code
ref_scene
.
saveDoubleArrayInModelDirectory
(
rslt_suffix
,
// String suffix,
refine_titles
,
// null, // String [] labels, // or null
...
...
src/main/java/com/elphel/imagej/tileprocessor/QuadCLTCPU.java
View file @
1e773119
...
...
@@ -224,6 +224,7 @@ public class QuadCLTCPU {
double
[][][][][][]
getCltKernels
()
{
return
clt_kernels
;
}
@Deprecated
public
QuadCLT
spawnQuadCLTWithNoise
(
String
set_name
,
CLTParameters
clt_parameters
,
...
...
@@ -239,6 +240,7 @@ public class QuadCLTCPU {
clt_parameters
,
colorProcParameters
,
noise_sigma_level
,
// double [] noise_sigma_level,
-
1
,
// int noise_variant, // <0 - no-variants, compatible with old code
ref_scene
,
// QuadCLTCPU ref_scene, // may be null if scale_fpn <= 0
threadsMax
,
debugLevel
);
...
...
@@ -246,6 +248,32 @@ public class QuadCLTCPU {
return
quadCLT
;
}
public
QuadCLT
spawnQuadCLTWithNoise
(
String
set_name
,
CLTParameters
clt_parameters
,
ColorProcParameters
colorProcParameters
,
NoiseParameters
noise_sigma_level
,
int
noise_variant
,
// <0 - no-variants, compatible with old code
QuadCLTCPU
ref_scene
,
// may be null if scale_fpn <= 0
int
threadsMax
,
int
debugLevel
)
{
QuadCLT
quadCLT
=
new
QuadCLT
(
this
,
set_name
);
quadCLT
.
restoreFromModel
(
clt_parameters
,
colorProcParameters
,
noise_sigma_level
,
// double [] noise_sigma_level,
noise_variant
,
//int noise_variant, // <0 - no-variants, compatible with old code
ref_scene
,
// QuadCLTCPU ref_scene, // may be null if scale_fpn <= 0
threadsMax
,
debugLevel
);
return
quadCLT
;
}
/*
public QuadCLT spawnQuadCLT(
String set_name,
...
...
@@ -285,6 +313,7 @@ public class QuadCLTCPU {
clt_parameters
,
colorProcParameters
,
null
,
// double [] noise_sigma_level,
-
1
,
// noise_variant, // <0 - no-variants, compatible with old code
null
,
// final QuadCLTCPU ref_scene, // may be null if scale_fpn <= 0
threadsMax
,
debugLevel
);
...
...
@@ -611,14 +640,11 @@ public class QuadCLTCPU {
return
rgba
;
}
public
QuadCLTCPU
restoreFromModel
(
CLTParameters
clt_parameters
,
ColorProcParameters
colorProcParameters
,
// double []
NoiseParameters
noise_sigma_level
,
int
noise_variant
,
// <0 - no-variants, compatible with old code
QuadCLTCPU
ref_scene
,
// may be null if scale_fpn <= 0
int
threadsMax
,
int
debugLevel
)
...
...
@@ -661,6 +687,7 @@ public class QuadCLTCPU {
"-NOISE"
,
ref_scene
,
// final QuadCLTCPU ref_scene, // may be null if scale_fpn <= 0
noise_sigma_level
,
noise_variant
,
//final int noise_variant, // <0 - no-variants, compatible with old code
threadsMax
,
1
);
// debugLevel); // final int debug_level)
}
...
...
@@ -691,16 +718,17 @@ public class QuadCLTCPU {
// If file with the same sigma already exists in the model directory - just use it, multiply by noise_sigma_level[0] and add to the non-zero Bayer
public
void
generateAddNoise
(
final
String
suffix
,
final
String
suffix
_novar
,
final
QuadCLTCPU
ref_scene
,
// may be null if scale_fpn <= 0
// final double []
final
NoiseParameters
noise_sigma_level
,
final
int
noise_variant
,
// <0 - no-variants, compatible with old code
final
int
threadsMax
,
final
int
debug_level
)
{
final
double
scale_random
=
noise_sigma_level
.
scale_random
;
// _sigma_level[0];
final
double
scale_fpn
=
noise_sigma_level
.
scale_fpn
;
// noise_sigma_level[0];
final
double
sigma
=
noise_sigma_level
.
sigma
;
// [1];
final
String
suffix
=
suffix_novar
+
((
noise_variant
>=
0
)
?
(
"-"
+
noise_variant
+
"-"
):
""
);
ImagePlus
imp
=
generateAddNoise
(
suffix
,
// final String suffix,
sigma
,
// final double sigma,
...
...
src/main/java/com/elphel/imagej/tileprocessor/TwoQuadCLT.java
View file @
1e773119
This diff is collapsed.
Click to expand it.
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