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
278bb738
Commit
278bb738
authored
May 28, 2025
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Debugging correlateInterscene for cuas
parent
f6017348
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
2037 additions
and
430 deletions
+2037
-430
ImageDtt.java
src/main/java/com/elphel/imagej/tileprocessor/ImageDtt.java
+25
-0
Interscene.java
...main/java/com/elphel/imagej/tileprocessor/Interscene.java
+20
-4
OpticalFlow.java
...ain/java/com/elphel/imagej/tileprocessor/OpticalFlow.java
+1963
-426
QuadCLTCPU.java
...main/java/com/elphel/imagej/tileprocessor/QuadCLTCPU.java
+16
-0
TwoQuadCLT.java
...main/java/com/elphel/imagej/tileprocessor/TwoQuadCLT.java
+13
-0
No files found.
src/main/java/com/elphel/imagej/tileprocessor/ImageDtt.java
View file @
278bb738
...
...
@@ -812,6 +812,27 @@ public class ImageDtt extends ImageDttCPU {
}
public
void
updateTasksGPU
(
TpTask
[]
tp_tasks
)
{
gpuQuad
.
setTasks
(
// copy tp_tasks to the GPU memory
tp_tasks
,
// TpTask [] tile_tasks,
false
,
// use_aux); // boolean use_aux)
imgdtt_params
.
gpu_verify
);
// boolean verify
// used alternative method to prepare tasks, not centered in the tile centers
// FIXME: change back to false !!!!
// Testing, remove when done
// gpuQuad.resetGeometryCorrection();
// gpuQuad.setConvolutionKernels(true); // set kernels if they are not set already
// gpuQuad.setBayerImages(true); // set Bayer images if this.quadCLT instance has new ones
// Why always NON-UNIFORM grid? Already set in tp_tasks
gpuQuad
.
execSetTilesOffsets
(
false
);
// false); // prepare tiles offsets in GPU memory, using NON-UNIFORM grid (pre-calculated)
// update tp_tasks
gpuQuad
.
updateTasks
(
tp_tasks
,
false
);
// boolean use_aux // while is it in class member? - just to be able to free
}
public
void
quadCorrTD
(
final
ImageDttParameters
imgdtt_params
,
// Now just extra correlation parameters, later will include, most others
final
TpTask
[]
tp_tasks
,
...
...
@@ -3052,6 +3073,10 @@ public class ImageDtt extends ImageDttCPU {
// This version obeys tp_task order and fills fcorr_td gaps (should be none_) with zeros.
int
[]
corr_indices
;
if
(
tp_tasks
==
null
)
{
System
.
out
.
println
(
"BUG: clt_process_tl_correlations() tp_tasks=null"
);
return
;
}
if
(
num_acc
!=
null
)
{
// version with float [][][] num_acc, // number of accumulated tiles [tilesY][tilesX][pair] (or null)
corr_indices
=
gpuQuad
.
setCorrTilesTd
(
// .length = 295866 should set num_corr_tiles!
tp_tasks
,
// final TpTask [] tp_tasks, // data from the reference frame - will be applied to LMW for the integrated correlations
...
...
src/main/java/com/elphel/imagej/tileprocessor/Interscene.java
View file @
278bb738
...
...
@@ -181,10 +181,14 @@ public class Interscene {
boolean
reused_overlap
=
false
;
if
(
overlap_sequences
)
{
int
adjusted_scene_index
=
ref_index
-
1
;
boolean
changed
=
quadCLTs
[
ref_index
].
isPhotometricUpdatedAndReset
();
if
(
debugLevel
>
-
3
)
{
System
.
out
.
println
(
"SetInitialOrientationsCenterIms(): Before spawnNoModelQuadCLT() changed = "
+
changed
);
}
for
(;
adjusted_scene_index
>=
0
;
adjusted_scene_index
--)
{
// to include ref scene photometric calibration
// added 05.21.2024: skip if was spawn already
if
(
quadCLTs
[
adjusted_scene_index
]
==
null
)
{
if
(
changed
||
(
quadCLTs
[
adjusted_scene_index
]
==
null
)
)
{
quadCLTs
[
adjusted_scene_index
]
=
quadCLTs
[
ref_index
].
spawnNoModelQuadCLT
(
set_channels
[
adjusted_scene_index
].
set_name
,
clt_parameters
,
...
...
@@ -910,10 +914,14 @@ public class Interscene {
false
);
// boolean use_ERS_roll);
int
[]
fail_reason
=
new
int
[
1
];
// null or int[1]: 0 - OK, 2 - LMA, 3 - min, 4 - max
boolean
changed
=
quadCLTs
[
ref_index
].
isPhotometricUpdatedAndReset
();
if
(
debugLevel
>
-
3
)
{
System
.
out
.
println
(
"SetInitialOrientationsIms(): Before spawnNoModelQuadCLT() changed = "
+
changed
);
}
for
(
int
scene_index
=
ref_index
-
1
;
scene_index
>=
0
;
scene_index
--)
{
// to include ref scene photometric calibration
// added 05.21.2024: skip if was spawn already
if
(
quadCLTs
[
scene_index
]
==
null
)
{
if
(
changed
||
(
quadCLTs
[
scene_index
]
==
null
)
)
{
quadCLTs
[
scene_index
]
=
quadCLTs
[
ref_index
].
spawnNoModelQuadCLT
(
set_channels
[
scene_index
].
set_name
,
clt_parameters
,
...
...
@@ -1487,10 +1495,14 @@ public class Interscene {
false
);
// boolean use_ERS_roll);
int
[]
fail_reason
=
new
int
[
1
];
// null or int[1]: 0 - OK, 2 - LMA, 3 - min, 4 - max
boolean
changed
=
center_CLT
.
isPhotometricUpdatedAndReset
();
if
(
debugLevel
>
-
3
)
{
System
.
out
.
println
(
"SetInitialOrientationsCuas(): Before spawnNoModelQuadCLT() changed = "
+
changed
);
}
for
(
int
scene_index
=
last_index
;
scene_index
>=
0
;
scene_index
--)
{
// to include ref scene photometric calibration
// added 05.21.2024: skip if was spawn already
if
(
quadCLTs
[
scene_index
]
==
null
)
{
if
(
changed
||
(
quadCLTs
[
scene_index
]
==
null
)
)
{
// quadCLTs[scene_index] = quadCLTs[last_index].spawnNoModelQuadCLT(
quadCLTs
[
scene_index
]
=
center_CLT
.
spawnNoModelQuadCLT
(
set_channels
[
scene_index
].
set_name
,
...
...
@@ -2079,10 +2091,14 @@ public class Interscene {
boolean
fpn_rematch
=
clt_parameters
.
imp
.
fpn_rematch
;
// if false - keep previous
double
[]
min_max
=
{
min_offset
,
max_offset
,
0.0
}
;
// {min, max, actual rms)
int
[]
fail_reason
=
new
int
[
1
];
// null or int[1]: 0 - OK, 2 - LMA, 3 - min, 4 - max
boolean
changed
=
quadCLTs
[
ref_index
].
isPhotometricUpdatedAndReset
();
if
(
debugLevel
>
-
3
)
{
System
.
out
.
println
(
"SetInitialOrientations(): Before spawnNoModelQuadCLT() changed = "
+
changed
);
}
for
(
int
scene_index
=
ref_index
-
1
;
scene_index
>=
0
;
scene_index
--)
{
// to include ref scene photometric calibration
// added 05.21.2024: skip if was spawn already
if
(
quadCLTs
[
scene_index
]
==
null
)
{
if
(
changed
||
(
quadCLTs
[
scene_index
]
==
null
)
)
{
quadCLTs
[
scene_index
]
=
quadCLTs
[
ref_index
].
spawnNoModelQuadCLT
(
set_channels
[
scene_index
].
set_name
,
clt_parameters
,
...
...
src/main/java/com/elphel/imagej/tileprocessor/OpticalFlow.java
View file @
278bb738
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/main/java/com/elphel/imagej/tileprocessor/QuadCLTCPU.java
View file @
278bb738
...
...
@@ -171,6 +171,7 @@ public class QuadCLTCPU {
double
[]
lwir_offsets
=
null
;
// per image subtracted values
double
[]
lwir_scales
=
null
;
// per image scales
double
[]
lwir_scales2
=
null
;
// per image quadratic scales
boolean
photometric_updated
=
true
;
// first time - as if updated
@Deprecated
double
lwir_offset
=
Double
.
NaN
;
// average of lwir_offsets[]
// hot and cold are calculated during autoranging (when generating 4 images for restored (added lwir_offset)
...
...
@@ -214,6 +215,21 @@ public class QuadCLTCPU {
public
int
[]
center_clt_num
=
null
;
// same size as combo_clt - number of accumulated scenes for this point
public
int
center_clt_width
=
0
;
// image width to save combo_clt (and combo_clt_num) as image
public
boolean
isPhotometricUpdated
()
{
return
photometric_updated
;
}
public
boolean
isPhotometricUpdatedAndReset
()
{
boolean
changed
=
photometric_updated
;
photometric_updated
=
false
;
return
changed
;
}
public
void
setPhotometricUpdated
(
boolean
updated
)
{
photometric_updated
=
updated
;
}
public
String
getImagePath
()
{
return
image_path
;
}
...
...
src/main/java/com/elphel/imagej/tileprocessor/TwoQuadCLT.java
View file @
278bb738
...
...
@@ -9390,6 +9390,7 @@ if (debugLevel > -100) return true; // temporarily !
-
1
);
// debug_level); // int debugLevel)
}
// Does not need to specify reference scene - it is always the last even if out of timestamp order
/*
OpticalFlow.intersceneExport(
clt_parameters, // CLTParameters clt_parameters,
false, // boolean compensate_dsi,
...
...
@@ -9399,6 +9400,18 @@ if (debugLevel > -100) return true; // temporarily !
colorProcParameters, // ColorProcParameters colorProcParameters,
clt_parameters.inp.noise_debug_level // clt_parameters.ofp.debug_level_optical - 1); // 1); // -1); // int debug_level);
);
*/
OpticalFlow
.
intersceneExport
(
// result indexed by COMBO_DSN_TITLES, COMBO_DSN_INDX_***
true
,
// boolean save_result, // false - do not save
null
,
// int [] scene_range, // if null -> {0,scenes_in.length-1}
clt_parameters
,
// CLTParameters clt_parameters,
false
,
// boolean compensate_dsi,
//// ref_index, // int ref_index,
scenes
[
indx_ref
],
// QuadCLT ref_scene,
scenes
,
// QuadCLT [] scenes,
colorProcParameters
,
// ColorProcParameters colorProcParameters,
debugLevel
);
// int debug_level
if
(
ref_step
==
0
)
{
break
;
}
...
...
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