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
952177ec
Commit
952177ec
authored
May 19, 2025
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor clean up
parent
3494b1d7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
15 deletions
+22
-15
ImageDtt.java
src/main/java/com/elphel/imagej/tileprocessor/ImageDtt.java
+16
-1
OpticalFlow.java
...ain/java/com/elphel/imagej/tileprocessor/OpticalFlow.java
+6
-14
No files found.
src/main/java/com/elphel/imagej/tileprocessor/ImageDtt.java
View file @
952177ec
...
@@ -1545,7 +1545,22 @@ public class ImageDtt extends ImageDttCPU {
...
@@ -1545,7 +1545,22 @@ public class ImageDtt extends ImageDttCPU {
}
}
/**
* Converts pairs of images for MB correction, keeping results in transform domain. Works with selected
* main or reference buffers.
* @param erase_clt erase CLT data. Only needed before execImcltRbgAll() if not all the
* tiles are converted. <0 - do not erase, 0 - erase to 0, 1 - erase to NaN
* @param wh null (use sensor dimensions) or pair {width, height} in pixels
* @param imgdtt_params now just extra correlation parameters, later will include, most others
* @param use_reference_buffer true for reference buffer, false for the main one
* @param tp_tasks a pair of TpTask arrays: [0] - main image, [1] shifted to subtract motion blur
* @param gpu_sigma_r LPF sigma for red
* @param gpu_sigma_b LPF sigma for blue
* @param gpu_sigma_g LPF sigma for green
* @param gpu_sigma_m LPF sigma for monochrome (LWIR)
* @param threadsMax maximal number of threads to launch
* @param globalDebugLevel debug level
*/
public
void
setReferenceTDMotionBlur
(
// updates tasks
public
void
setReferenceTDMotionBlur
(
// updates tasks
final
int
erase_clt
,
final
int
erase_clt
,
final
int
[]
wh
,
// null (use sensor dimensions) or pair {width, height} in pixels
final
int
[]
wh
,
// null (use sensor dimensions) or pair {width, height} in pixels
...
...
src/main/java/com/elphel/imagej/tileprocessor/OpticalFlow.java
View file @
952177ec
...
@@ -2958,7 +2958,7 @@ public class OpticalFlow {
...
@@ -2958,7 +2958,7 @@ public class OpticalFlow {
final
double
[]
scene_xyz
,
// camera center in world (reference) coordinates
final
double
[]
scene_xyz
,
// camera center in world (reference) coordinates
final
double
[]
scene_atr
,
// camera orientation relative to world (reference) frame
final
double
[]
scene_atr
,
// camera orientation relative to world (reference) frame
final
QuadCLT
reference_QuadClt
,
final
QuadCLT
reference_QuadClt
,
final
QuadCLT
scene_QuadClt
)
//
final
QuadCLT
scene_QuadClt
)
{
{
boolean
debug_ers
=
false
;
// true; // false; // true; // true; //11.01.2022
boolean
debug_ers
=
false
;
// true; // false; // true; // true; //11.01.2022
boolean
ignore_ers
=
false
;
// false;
boolean
ignore_ers
=
false
;
// false;
...
@@ -2995,6 +2995,7 @@ public class OpticalFlow {
...
@@ -2995,6 +2995,7 @@ public class OpticalFlow {
disparity
=
1.0
*
disparity
;
// 0.0;
disparity
=
1.0
*
disparity
;
// 0.0;
}
}
pXpYD
[
nTile
]
=
ersReferenceCorrection
.
getImageCoordinatesERS
(
// ersCorrection - reference
pXpYD
[
nTile
]
=
ersReferenceCorrection
.
getImageCoordinatesERS
(
// ersCorrection - reference
// important to have scene, not reference here!
scene_QuadClt
,
// scene_QuadClt, // QuadCLT cameraQuadCLT, // camera station that got image to be to be matched
scene_QuadClt
,
// scene_QuadClt, // QuadCLT cameraQuadCLT, // camera station that got image to be to be matched
centerX
,
// double px, // pixel coordinate X in the reference view
centerX
,
// double px, // pixel coordinate X in the reference view
centerY
,
// double py, // pixel coordinate Y in the reference view
centerY
,
// double py, // pixel coordinate Y in the reference view
...
@@ -3026,7 +3027,6 @@ public class OpticalFlow {
...
@@ -3026,7 +3027,6 @@ public class OpticalFlow {
public
static
double
[][]
transformFromVirtual
(
public
static
double
[][]
transformFromVirtual
(
double
[][]
ref_pXpYD_0
,
double
[]
disparity_ref
,
double
[]
disparity_ref
,
final
double
[]
scene_xyz
,
// camera center in world (reference) coordinates
final
double
[]
scene_xyz
,
// camera center in world (reference) coordinates
final
double
[]
scene_atr
,
// camera orientation relative to world (reference) frame
final
double
[]
scene_atr
,
// camera orientation relative to world (reference) frame
...
@@ -3058,8 +3058,7 @@ public class OpticalFlow {
...
@@ -3058,8 +3058,7 @@ public class OpticalFlow {
for
(
int
i
=
0
;
i
<=
num_refines
;
i
++)
{
for
(
int
i
=
0
;
i
<=
num_refines
;
i
++)
{
debug_titles
[
i
]=
i
+
""
;
debug_titles
[
i
]=
i
+
""
;
}
}
// final double [][][] debug_data = debug ? new double [3][num_refines+1][tiles]:null;
final
double
[][][]
debug_data
=
debug
?
new
double
[
3
][
num_refines
+
1
][
tiles
]:
null
;
final
double
[][][]
debug_data
=
debug
?
new
double
[
3
][
num_refines
+
2
][
tiles
]:
null
;
if
(
debug
)
{
if
(
debug
)
{
for
(
int
f
=
0
;
f
<
debug_data
.
length
;
f
++)
{
for
(
int
f
=
0
;
f
<
debug_data
.
length
;
f
++)
{
for
(
int
i
=
0
;
i
<
debug_data
[
f
].
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
debug_data
[
f
].
length
;
i
++)
{
...
@@ -3239,12 +3238,6 @@ public class OpticalFlow {
...
@@ -3239,12 +3238,6 @@ public class OpticalFlow {
}
}
}
}
if
(
debug
)
{
if
(
debug
)
{
for
(
int
nTile
=
0
;
nTile
<
tiles
;
nTile
++)
if
(
reference_pXpYD
[
nTile
]
!=
null
)
{
debug_data
[
0
][
num_refines
+
1
][
nTile
]
=
ref_pXpYD_0
[
nTile
][
0
];
debug_data
[
1
][
num_refines
+
1
][
nTile
]
=
ref_pXpYD_0
[
nTile
][
1
];
debug_data
[
2
][
num_refines
+
1
][
nTile
]
=
ref_pXpYD_0
[
nTile
][
2
];
}
ShowDoubleFloatArrays
.
showArraysHyperstack
(
ShowDoubleFloatArrays
.
showArraysHyperstack
(
debug_data
,
// double[][][] pixels,
debug_data
,
// double[][][] pixels,
tilesX
,
// int width,
tilesX
,
// int width,
...
@@ -7866,6 +7859,7 @@ public class OpticalFlow {
...
@@ -7866,6 +7859,7 @@ public class OpticalFlow {
double
[][]
ref_pXpYD
;
double
[][]
ref_pXpYD
;
double
[][]
ref_pXpYD_or_null
=
null
;
// debugging cuas mode keeping old
double
[][]
ref_pXpYD_or_null
=
null
;
// debugging cuas mode keeping old
if
(
mode_cuas
)
{
// && (dbg_scene > 0)) {
if
(
mode_cuas
)
{
// && (dbg_scene > 0)) {
/*
double [][] ref_pXpYD_0 = transformToScenePxPyD( // now should work with offset ref_scene
double [][] ref_pXpYD_0 = transformToScenePxPyD( // now should work with offset ref_scene
fov_tiles, // final Rectangle [] extra_woi, // show larger than sensor WOI (or null)
fov_tiles, // final Rectangle [] extra_woi, // show larger than sensor WOI (or null)
ref_disparity, // final double [] disparity_ref, // invalid tiles - NaN in disparity
ref_disparity, // final double [] disparity_ref, // invalid tiles - NaN in disparity
...
@@ -7874,13 +7868,12 @@ public class OpticalFlow {
...
@@ -7874,13 +7868,12 @@ public class OpticalFlow {
quadCLTs[ref_index], // final QuadCLT scene_QuadClt,
quadCLTs[ref_index], // final QuadCLT scene_QuadClt,
quadCLTs[ref_index], // final QuadCLT reference_QuadClt, // now - may be null - for testing if scene is rotated ref
quadCLTs[ref_index], // final QuadCLT reference_QuadClt, // now - may be null - for testing if scene is rotated ref
threadsMax); // int threadsMax)
threadsMax); // int threadsMax)
*/
int
around
=
2
;
int
around
=
2
;
double
around_sigma
=
4.0
;
double
around_sigma
=
4.0
;
int
num_virtual_refines
=
3
;
int
num_virtual_refines
=
2
;
String
debugSuffix
=
null
;
// "virtual";
String
debugSuffix
=
null
;
// "virtual";
ref_pXpYD
=
transformFromVirtual
(
ref_pXpYD
=
transformFromVirtual
(
ref_pXpYD_0
,
// double [][] ref_pXpYD_0,
ref_disparity
,
// double [] disparity_ref,
ref_disparity
,
// double [] disparity_ref,
stereo_xyz
,
// final double [] scene_xyz, // camera center in world (reference) coordinates
stereo_xyz
,
// final double [] scene_xyz, // camera center in world (reference) coordinates
stereo_atr
,
// final double [] scene_atr, // camera orientation relative to world (reference) frame
stereo_atr
,
// final double [] scene_atr, // camera orientation relative to world (reference) frame
...
@@ -7901,7 +7894,6 @@ public class OpticalFlow {
...
@@ -7901,7 +7894,6 @@ public class OpticalFlow {
quadCLTs
[
ref_index
],
// final QuadCLT scene_QuadClt,
quadCLTs
[
ref_index
],
// final QuadCLT scene_QuadClt,
quadCLTs
[
ref_index
],
// final QuadCLT reference_QuadClt, // now - may be null - for testing if scene is rotated ref
quadCLTs
[
ref_index
],
// final QuadCLT reference_QuadClt, // now - may be null - for testing if scene is rotated ref
threadsMax
);
// int threadsMax)
threadsMax
);
// int threadsMax)
// ref_pXpYD_or_null = ref_pXpYD; // remove after debug!. Yes, that spoils!
}
}
for
(
int
nscene
=
0
;
nscene
<
quadCLTs
.
length
;
nscene
++)
if
(
quadCLTs
[
nscene
]
!=
null
){
for
(
int
nscene
=
0
;
nscene
<
quadCLTs
.
length
;
nscene
++)
if
(
quadCLTs
[
nscene
]
!=
null
){
if
(
nscene
==
dbg_scene
)
{
if
(
nscene
==
dbg_scene
)
{
...
...
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