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
2c6707fb
Commit
2c6707fb
authored
Oct 11, 2025
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Matching and processing series
parent
d0c338fe
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
1374 additions
and
301 deletions
+1374
-301
Eyesis_Correction.java
.../java/com/elphel/imagej/correction/Eyesis_Correction.java
+31
-17
CuasMotion.java
src/main/java/com/elphel/imagej/cuas/CuasMotion.java
+80
-3
CuasMotionLMA.java
src/main/java/com/elphel/imagej/cuas/CuasMotionLMA.java
+4
-3
CuasMultiSeries.java
src/main/java/com/elphel/imagej/cuas/CuasMultiSeries.java
+873
-0
CuasRanging.java
src/main/java/com/elphel/imagej/cuas/CuasRanging.java
+1
-0
IntersceneMatchParameters.java
...lphel/imagej/tileprocessor/IntersceneMatchParameters.java
+89
-11
QuadCLTCPU.java
...main/java/com/elphel/imagej/tileprocessor/QuadCLTCPU.java
+18
-0
TwoQuadCLT.java
...main/java/com/elphel/imagej/tileprocessor/TwoQuadCLT.java
+278
-267
No files found.
src/main/java/com/elphel/imagej/correction/Eyesis_Correction.java
View file @
2c6707fb
...
...
@@ -876,6 +876,7 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
jpanelLWIRWorld
=
new
JPanel
();
jpanelLWIRWorld
.
setLayout
(
new
GridLayout
(
1
,
0
,
5
,
5
));
// rows, columns, vgap, hgap
addJButton
(
"Aux Build Series"
,
jpanelLWIRWorld
,
color_stop
);
addJButton
(
"CUAS Combine"
,
jpanelLWIRWorld
,
color_stop
);
addJButton
(
"Build World"
,
jpanelLWIRWorld
,
color_process
);
addJButton
(
"Test IMX5"
,
jpanelLWIRWorld
,
color_process
);
addJButton
(
"Show mice"
,
jpanelLWIRWorld
,
color_process
);
...
...
@@ -1283,6 +1284,7 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
panelLWIRWorld
=
new
Panel
();
panelLWIRWorld
.
setLayout
(
new
GridLayout
(
1
,
0
,
5
,
5
));
// rows, columns, vgap, hgap
addButton
(
"Aux Build Series"
,
panelLWIRWorld
,
color_stop
);
addButton
(
"CUAS Combine"
,
panelLWIRWorld
,
color_stop
);
addButton
(
"Build World"
,
panelLWIRWorld
,
color_process
);
addButton
(
"Test IMX5"
,
panelLWIRWorld
,
color_process
);
addButton
(
"Show mice"
,
panelLWIRWorld
,
color_process
);
...
...
@@ -5688,9 +5690,21 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
CLT_PARAMETERS
.
batch_run
=
true
;
buildSeries
(
true
);
buildSeries
(
true
,
0
);
// int cuas_proc_mode); // 0 - old, 1 combine scene series) {);
return
;
/* ======================================================================== */
}
else
if
(
label
.
equals
(
"CUAS Combine"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
CLT_PARAMETERS
.
batch_run
=
true
;
buildSeries
(
true
,
1
);
// int cuas_proc_mode); // 0 - old, 1 combine scene series) {);
return
;
//"CUAS Combine"
/* ======================================================================== */
}
else
if
(
label
.
equals
(
"Aux Inter Test"
))
{
DEBUG_LEVEL
=
MASTER_DEBUG_LEVEL
;
EYESIS_CORRECTIONS
.
setDebug
(
DEBUG_LEVEL
);
...
...
@@ -7832,7 +7846,9 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
}
public
boolean
buildSeries
(
boolean
use_aux
)
{
public
boolean
buildSeries
(
boolean
use_aux
,
int
cuas_proc_mode
)
{
// 0 - old, 1 combine scene series) {
long
startTime
=
System
.
nanoTime
();
// load needed sensor and kernels files
if
(!
prepareRigImages
())
...
...
@@ -7893,23 +7909,21 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
try
{
TwoQuadCLT
.
buildSeriesTQ
(
0
,
// int cuas_proc_mode, // 0 - old, 1 combine scene series
quadCLT
,
// QUAD_CLT, // QuadCLT quadCLT_main,
-
1
,
// int ref_index,
0
,
// int ref_step,
// QUAD_CLT_AUX, // QuadCLT quadCLT_aux,
CLT_PARAMETERS
,
// EyesisCorrectionParameters.DCTParameters dct_parameters,
DEBAYER_PARAMETERS
,
// EyesisCorrectionParameters.DebayerParameters debayerParameters,
colorProcParameters
,
// COLOR_PROC_PARAMETERS, //EyesisCorrectionParameters.ColorProcParameters
// colorProcParameters,
CHANNEL_GAINS_PARAMETERS
,
// CorrectionColorProc.ColorGainsParameters channelGainParameters,
RGB_PARAMETERS
,
// EyesisCorrectionParameters.RGBParameters rgbParameters,
cuas_proc_mode
,
// int cuas_proc_mode, // 0 - old, 1 combine scene series
quadCLT
,
// QUAD_CLT, // QuadCLT quadCLT_main,
-
1
,
// int ref_index,
0
,
// int ref_step,
CLT_PARAMETERS
,
// EyesisCorrectionParameters.DCTParameters dct_parameters,
DEBAYER_PARAMETERS
,
// EyesisCorrectionParameters.DebayerParameters debayerParameters,
colorProcParameters
,
// COLOR_PROC_PARAMETERS, //EyesisCorrectionParameters.ColorProcParameters
CHANNEL_GAINS_PARAMETERS
,
// CorrectionColorProc.ColorGainsParameters channelGainParameters,
RGB_PARAMETERS
,
// EyesisCorrectionParameters.RGBParameters rgbParameters,
EQUIRECTANGULAR_PARAMETERS
,
// EyesisCorrectionParameters.EquirectangularParameters
// equirectangularParameters,
PROPERTIES
,
// Properties properties,
true
,
// false, // boolean reset_from_extrinsics,
THREADS_MAX
,
// final int threadsMax, // maximal number of threads to launch
UPDATE_STATUS
,
// final boolean updateStatus,
PROPERTIES
,
// Properties properties,
true
,
// false, // boolean reset_from_extrinsics,
THREADS_MAX
,
// final int threadsMax, // maximal number of threads to launch
UPDATE_STATUS
,
// final boolean updateStatus,
DEBUG_LEVEL
);
}
catch
(
Exception
e
)
{
// TODO Auto-generated catch block
...
...
src/main/java/com/elphel/imagej/cuas/CuasMotion.java
View file @
2c6707fb
...
...
@@ -131,9 +131,16 @@ public class CuasMotion {
public
int
getSeqLength
()
{
return
clt_parameters
.
imp
.
cuas_corr_offset
+
clt_parameters
.
imp
.
cuas_corr_pairs
;
}
public
int
getCorrInc
()
{
// == frame_step;
public
static
int
getCorrInc
(
CLTParameters
clt_parameters
)
{
return
clt_parameters
.
imp
.
cuas_half_step
?
(
clt_parameters
.
imp
.
cuas_corr_offset
/
2
)
:
clt_parameters
.
imp
.
cuas_corr_offset
;
}
public
int
getCorrInc
()
{
// == frame_step;
return
getCorrInc
(
clt_parameters
);
// return clt_parameters.imp.cuas_half_step ? (clt_parameters.imp.cuas_corr_offset/2) : clt_parameters.imp.cuas_corr_offset;
}
public
int
getNumCorrSamples
()
{
return
slice_titles
.
length
;
}
...
...
@@ -148,6 +155,26 @@ public class CuasMotion {
return
0.5
*
getCorrInc
()/
corr_offset
;
}
/**
* Multiply RESULT_VX,RESULT_VX to get pixel offset per scene (at ~60Hz)
* @param clt_parameters
* @return coefficient for VX, VY
*/
public
static
double
getFrameVelocityScale
(
CLTParameters
clt_parameters
)
{
return
1.0
/
clt_parameters
.
imp
.
cuas_corr_offset
;
}
/**
* Multiply RESULT_VX,RESULT_VX to get pixel offset per key frame (now ~6Hz)
* @param clt_parameters
* @return coefficient for VX, VY
*/
public
static
double
getKeyFrameVelocityScale
(
CLTParameters
clt_parameters
)
{
return
getCorrInc
(
clt_parameters
)/
clt_parameters
.
imp
.
cuas_corr_offset
;
}
public
String
[]
getSceneTitles
()
{
return
scene_titles
;
}
...
...
@@ -1914,7 +1941,7 @@ public class CuasMotion {
return
vf
;
}
public
static
double
[][][]
getTargetsFromHyperAugment
(
public
static
double
[][][]
getTargetsFromHyperAugment
_old
(
String
path
){
// add empty fields to the end of each target if shorter than CuasMotionLMA.RSLT_LEN
int
[]
wh
=
new
int
[
2
];
String
[][]
pvf_top_titles
=
new
String
[
1
][];
...
...
@@ -1952,6 +1979,56 @@ public class CuasMotion {
return
target_sequence
;
}
public
static
double
[][][]
getTargetsFromHyperAugment
(
String
path
)
{
return
getTargetsFromHyperAugment
(
null
,
// String [][] pvf_top_titles,
null
,
// String [][] pvf_titles,
path
);
//String path)
}
public
static
double
[][][]
getTargetsFromHyperAugment
(
String
[][]
pvf_top_titles
,
String
[][]
pvf_titles
,
String
path
){
// add empty fields to the end of each target if shorter than CuasMotionLMA.RSLT_LEN
int
[]
wh
=
new
int
[
2
];
if
(
pvf_top_titles
==
null
)
pvf_top_titles
=
new
String
[
1
][];
if
(
pvf_titles
==
null
)
pvf_titles
=
new
String
[
1
][];
double
[][][]
targets_file
=
ShowDoubleFloatArrays
.
readDoubleHyperstack
(
path
,
// String path,
wh
,
// int [] wh, // should be null or int[2]
pvf_top_titles
,
// String [][] ptop_titles, // should be null or String [1][]
pvf_titles
);
// String [][] pslice_titles){// should be null or String [1][]
if
(
targets_file
==
null
)
{
return
null
;
}
int
num_fields
=
targets_file
.
length
;
// fix - discarding last slice if it is called CuasMotionLMA.EXTRA_SLICE_DISCARD_ON_LOAD ("Targets")
if
(
pvf_top_titles
[
0
][
pvf_top_titles
[
0
].
length
-
1
].
equals
(
CuasMotionLMA
.
EXTRA_SLICE_DISCARD_ON_LOAD
))
{
System
.
out
.
println
(
"getTargetsFromHyperAugment(): removing last slice called "
+
pvf_top_titles
[
0
][
pvf_top_titles
[
0
].
length
-
1
]);
num_fields
--;
String
[]
ss
=
new
String
[
num_fields
];
System
.
arraycopy
(
pvf_top_titles
[
0
],
0
,
ss
,
0
,
num_fields
);
pvf_top_titles
[
0
]
=
ss
;
}
int
num_fields_augmented
=
Math
.
max
(
num_fields
,
CuasMotionLMA
.
RSLT_LEN
);
int
num_seq
=
targets_file
[
0
].
length
;
int
num_tiles
=
targets_file
[
0
][
0
].
length
;
double
[][][]
target_sequence
=
new
double
[
num_seq
][
num_tiles
][];
for
(
int
nseq
=
0
;
nseq
<
num_seq
;
nseq
++)
{
for
(
int
ntile
=
0
;
ntile
<
num_tiles
;
ntile
++)
if
(!
Double
.
isNaN
(
targets_file
[
0
][
nseq
][
ntile
])){
double
[]
v
=
new
double
[
num_fields_augmented
];
// cut to originally calculated fields
for
(
int
i
=
0
;
i
<
num_fields
;
i
++)
{
v
[
i
]
=
targets_file
[
i
][
nseq
][
ntile
];
}
for
(
int
i
=
num_fields
;
i
<
num_fields_augmented
;
i
++)
{
v
[
i
]
=
Double
.
NaN
;
}
target_sequence
[
nseq
][
ntile
]
=
v
;
}
}
return
target_sequence
;
}
...
...
@@ -6101,7 +6178,7 @@ public class CuasMotion {
}
/**
* Same for singl-layer targets (one target per tile)
* Same for singl
e
-layer targets (one target per tile)
* @param targets_single [num_sequences][num_tiles][CuasMotionLMA.RSLT_LEN] source targets array
* @return variable-length (may be empty) arrays following targets
*/
...
...
src/main/java/com/elphel/imagej/cuas/CuasMotionLMA.java
View file @
2c6707fb
...
...
@@ -98,8 +98,8 @@ public class CuasMotionLMA {
public
static
final
int
RSLT_FL_DISP
=
56
;
// flight log true disparity
public
static
final
int
RSLT_FL_RANGE
=
57
;
// flight log range (meters)
public
static
final
int
RSLT_INFINITY
=
58
;
// disparity at infinity used for range calculation
public
static
final
int
RSLT_LEN
=
RSLT_
INFINITY
+
1
;
public
static
final
int
RSLT_TARGET_ID
=
59
;
// unique target id for the whole sequence of segments. 1 is reserved for the UAS
public
static
final
int
RSLT_LEN
=
RSLT_
TARGET_ID
+
1
;
public
static
final
String
[]
LMA_TITLES
=
{
"X-OFFS"
,
"Y-OFFS"
,
"AMPLITUDE"
,
"RADIUS"
,
"RAD_POS"
,
"OVERSHOOT"
,
"OFFSET"
,
"RMSE"
,
"RMSE/A"
,
"MAX2A"
,
"ITERATIONS"
,
...
...
@@ -117,7 +117,8 @@ public class CuasMotionLMA {
"WHEN"
,
"FAILURE"
,
"Disparity"
,
"Disparity-Diff"
,
"Strength"
,
"Range"
,
"Global-index"
,
"segment-length"
,
"segment-disparity"
,
"segment_disp-diff"
,
"segment-strength"
,
"segment-range"
,
"FLOG-px"
,
"FLOG-pY"
,
"FLOG-DISP"
,
"FLOG-range"
,
"infinity"
};
"FLOG-px"
,
"FLOG-pY"
,
"FLOG-DISP"
,
"FLOG-range"
,
"infinity"
,
"GTarget-ID"
};
public
static
final
String
EXTRA_SLICE_DISCARD_ON_LOAD
=
"Targets"
;
public
static
final
int
FAIL_NONE
=
0
;
public
static
final
int
FAIL_MOTION
=
1
;
// motion strength/fraction too low
...
...
src/main/java/com/elphel/imagej/cuas/CuasMultiSeries.java
0 → 100644
View file @
2c6707fb
This diff is collapsed.
Click to expand it.
src/main/java/com/elphel/imagej/cuas/CuasRanging.java
View file @
2c6707fb
...
...
@@ -27,6 +27,7 @@ public class CuasRanging {
public
static
final
String
TARGET_RANGING_LOGS_SUFFIX
=
"-TARGET_RANGING.log"
;
public
static
final
String
TARGET_RANGING_LOGS_FULL_SUFFIX
=
"-TARGET_RANGING_FULL.log"
;
public
static
final
String
TARGET_DISPARITIES_SUFFIX
=
"-TARGET_DISPARITIES"
;
public
static
final
String
TARGET_GLOBALS_SUFFIX
=
"-TARGET_GLOBALS"
;
public
static
final
String
TARGET_STATS_SUFFIX
=
"-TARGETS"
;
// *.csv
...
...
src/main/java/com/elphel/imagej/tileprocessor/IntersceneMatchParameters.java
View file @
2c6707fb
This diff is collapsed.
Click to expand it.
src/main/java/com/elphel/imagej/tileprocessor/QuadCLTCPU.java
View file @
2c6707fb
...
...
@@ -72,6 +72,7 @@ import com.elphel.imagej.correction.Eyesis_Correction;
import
com.elphel.imagej.cuas.CorrectionFPN
;
import
com.elphel.imagej.cuas.Cuas
;
import
com.elphel.imagej.cuas.CuasData
;
import
com.elphel.imagej.gpu.GPUTileProcessor
;
import
com.elphel.imagej.gpu.GpuQuad
;
import
com.elphel.imagej.gpu.TpTask
;
import
com.elphel.imagej.ims.Did_gps_pos
;
...
...
@@ -3125,13 +3126,30 @@ public class QuadCLTCPU {
*/
public
int
getTileSize
()
{
if
(
tp
==
null
)
{
return
GPUTileProcessor
.
DTT_SIZE
;
}
return
tp
.
getTileSize
();
}
public
int
getTilesX
()
{
if
(
tp
==
null
)
{
// if (geometryCorrection == null) {
// if QuadCLT use gpuQuad
// } else {
return
geometryCorrection
.
getSensorWH
()[
0
]/
GPUTileProcessor
.
DTT_SIZE
;
// }
}
return
tp
.
getTilesX
();
}
public
int
getTilesY
()
{
if
(
tp
==
null
)
{
// if (geometryCorrection == null) {
// if QuadCLT use gpuQuad
// } else {
return
geometryCorrection
.
getSensorWH
()[
1
]/
GPUTileProcessor
.
DTT_SIZE
;
// }
}
return
tp
.
getTilesY
();
}
public
int
getNumColors
(){
...
...
src/main/java/com/elphel/imagej/tileprocessor/TwoQuadCLT.java
View file @
2c6707fb
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