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
86e73701
Commit
86e73701
authored
Jun 11, 2025
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Trying row/col FPN correction
parent
c3f2181a
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
487 additions
and
263 deletions
+487
-263
CorrectionFPN.java
src/main/java/com/elphel/imagej/cuas/CorrectionFPN.java
+425
-0
OpticalFlow.java
...ain/java/com/elphel/imagej/tileprocessor/OpticalFlow.java
+29
-7
QuadCLTCPU.java
...main/java/com/elphel/imagej/tileprocessor/QuadCLTCPU.java
+33
-256
No files found.
src/main/java/com/elphel/imagej/cuas/CorrectionFPN.java
0 → 100644
View file @
86e73701
This diff is collapsed.
Click to expand it.
src/main/java/com/elphel/imagej/tileprocessor/OpticalFlow.java
View file @
86e73701
...
@@ -54,6 +54,7 @@ import com.elphel.imagej.common.DoubleGaussianBlur;
...
@@ -54,6 +54,7 @@ import com.elphel.imagej.common.DoubleGaussianBlur;
import
com.elphel.imagej.common.PolynomialApproximation
;
import
com.elphel.imagej.common.PolynomialApproximation
;
import
com.elphel.imagej.common.ShowDoubleFloatArrays
;
import
com.elphel.imagej.common.ShowDoubleFloatArrays
;
import
com.elphel.imagej.correction.CorrectionColorProc
;
import
com.elphel.imagej.correction.CorrectionColorProc
;
import
com.elphel.imagej.cuas.CorrectionFPN
;
import
com.elphel.imagej.cuas.Cuas
;
import
com.elphel.imagej.cuas.Cuas
;
import
com.elphel.imagej.cuas.CuasCenterLma
;
import
com.elphel.imagej.cuas.CuasCenterLma
;
import
com.elphel.imagej.gpu.GPUTileProcessor
;
import
com.elphel.imagej.gpu.GPUTileProcessor
;
...
@@ -5184,7 +5185,7 @@ public class OpticalFlow {
...
@@ -5184,7 +5185,7 @@ public class OpticalFlow {
}
}
}
}
double
[][][]
fpn
=
center_CLT
.
readImageFPN
(
-
1
);
// int sens_mask);
double
[][][]
fpn
=
center_CLT
.
getCorrectionFPN
().
readImageFPN
(
-
1
);
// int sens_mask);
if
((
fpn
==
null
)
||
cuas_calc_fpn
)
{
if
((
fpn
==
null
)
||
cuas_calc_fpn
)
{
if
(
debugLevel
>-
3
)
{
if
(
debugLevel
>-
3
)
{
System
.
out
.
println
(
"Calculating FPN."
);
System
.
out
.
println
(
"Calculating FPN."
);
...
@@ -5193,7 +5194,7 @@ public class OpticalFlow {
...
@@ -5193,7 +5194,7 @@ public class OpticalFlow {
int
rot_periods
=
(
int
)
Math
.
floor
(
num_scenes
/
cuas_rot_period
);
int
rot_periods
=
(
int
)
Math
.
floor
(
num_scenes
/
cuas_rot_period
);
int
rot_scenes
=
(
int
)
Math
.
floor
(
rot_periods
*
cuas_rot_period
);
int
rot_scenes
=
(
int
)
Math
.
floor
(
rot_periods
*
cuas_rot_period
);
int
[]
rot_range
=
{
0
,
rot_scenes
-
1
};
int
[]
rot_range
=
{
0
,
rot_scenes
-
1
};
fpn
=
QuadCLT
.
calculateFPN
(
fpn
=
CorrectionFPN
.
calculateFPN
(
quadCLTs
,
// final QuadCLT [] quadCLTs,
quadCLTs
,
// final QuadCLT [] quadCLTs,
rot_range
,
// final int [] range, // required
rot_range
,
// final int [] range, // required
-
1
,
// final int sensor_mask,
-
1
,
// final int sensor_mask,
...
@@ -5201,11 +5202,13 @@ public class OpticalFlow {
...
@@ -5201,11 +5202,13 @@ public class OpticalFlow {
int
dbg_sens
=
12
;
int
dbg_sens
=
12
;
if
(
cuas_debug
&&
(
dbg_sens
>=
0
))
{
if
(
cuas_debug
&&
(
dbg_sens
>=
0
))
{
center_CLT
.
debugFPN
(
double
um_sigma_fpn
=
10.0
;
center_CLT
.
getCorrectionFPN
().
debugFPN
(
quadCLTs
,
// QuadCLT [] quadCLTs,
quadCLTs
,
// QuadCLT [] quadCLTs,
fpn
,
// double [][][] fpn,
fpn
,
// double [][][] fpn,
rot_range
,
// int [] range,
rot_range
,
// int [] range,
dbg_sens
,
// int nsens,
dbg_sens
,
// int nsens,
um_sigma_fpn
,
// double um_sigma = 10.0;
show_fpn
);
// boolean show) {
show_fpn
);
// boolean show) {
}
}
...
@@ -5215,12 +5218,12 @@ public class OpticalFlow {
...
@@ -5215,12 +5218,12 @@ public class OpticalFlow {
}
}
}
}
// center_CLT.setImageData(fpn); // included in center_CLT.setApplyFPN(). // setting FPN images to the virtual (center) scene
// center_CLT.setImageData(fpn); // included in center_CLT.setApplyFPN(). // setting FPN images to the virtual (center) scene
center_CLT
.
saveShowFPN
(
center_CLT
.
getCorrectionFPN
().
saveShowFPN
(
fpn
,
// double [][][] fpn,
fpn
,
// double [][][] fpn,
fpn_width
,
// int width,
fpn_width
,
// int width,
true
,
// boolean save,
true
,
// boolean save,
show_fpn
);
// boolean show) {
show_fpn
);
// boolean show) {
center_CLT
.
setApplyFPN
(
center_CLT
.
getCorrectionFPN
().
setApplyFPN
(
quadCLTs
,
// QuadCLT [] quadCLTs,
quadCLTs
,
// QuadCLT [] quadCLTs,
fpn
);
// double [][][] fpn)
fpn
);
// double [][][] fpn)
}
else
{
}
else
{
...
@@ -5228,7 +5231,7 @@ public class OpticalFlow {
...
@@ -5228,7 +5231,7 @@ public class OpticalFlow {
System
.
out
.
println
(
"Skipping FPN."
);
System
.
out
.
println
(
"Skipping FPN."
);
}
}
// center_CLT.setImageData(null);
// center_CLT.setImageData(null);
center_CLT
.
setApplyFPN
(
center_CLT
.
getCorrectionFPN
().
setApplyFPN
(
quadCLTs
,
// QuadCLT [] quadCLTs,
quadCLTs
,
// QuadCLT [] quadCLTs,
null
);
// double [][][] fpn)
null
);
// double [][][] fpn)
}
}
...
@@ -8621,8 +8624,27 @@ public class OpticalFlow {
...
@@ -8621,8 +8624,27 @@ public class OpticalFlow {
imp_scenes
.
getProcessor
().
resetMinAndMax
();
imp_scenes
.
getProcessor
().
resetMinAndMax
();
return
imp_scenes
;
return
imp_scenes
;
}
}
public
static
void
applyUMDouble
(
final
double
[]
data
,
final
int
width
,
final
double
um_sigma
,
final
double
um_weight
)
{
double
[]
blurred
=
data
.
clone
();
(
new
DoubleGaussianBlur
()).
blurDouble
(
blurred
,
// double[] pixels,
width
,
// int width,
blurred
.
length
/
width
,
// int height,
um_sigma
,
// double sigmaX,
um_sigma
,
// double sigmaY,
0.01
);
// double accuracy)
for
(
int
i
=
0
;
i
<
data
.
length
;
i
++)
{
data
[
i
]
-=
blurred
[
i
]*
um_weight
;
}
}
public
static
double
[][]
getSceneSZXY
(
public
static
double
[][]
getSceneSZXY
(
QuadCLT
scene
,
QuadCLT
scene
,
...
...
src/main/java/com/elphel/imagej/tileprocessor/QuadCLTCPU.java
View file @
86e73701
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