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
9a4d969e
Commit
9a4d969e
authored
May 25, 2026
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Profiling and convenience features
parent
5961834e
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
215 additions
and
120 deletions
+215
-120
CuasMotion.java
src/main/java/com/elphel/imagej/cuas/CuasMotion.java
+149
-98
CuasMotionLMA.java
src/main/java/com/elphel/imagej/cuas/CuasMotionLMA.java
+17
-16
IntersceneMatchParameters.java
...lphel/imagej/tileprocessor/IntersceneMatchParameters.java
+49
-6
No files found.
src/main/java/com/elphel/imagej/cuas/CuasMotion.java
View file @
9a4d969e
This diff is collapsed.
Click to expand it.
src/main/java/com/elphel/imagej/cuas/CuasMotionLMA.java
View file @
9a4d969e
...
...
@@ -160,28 +160,29 @@ public class CuasMotionLMA {
public
static
final
String
EXTRA_SLICE_DISCARD_ON_LOAD
=
"Targets"
;
public
static
final
int
FAIL_PENDING
=
-
1
;
// By Claude on 05/07/2026: motion sentinel — tile tracked but not yet processed by LMA
public
static
final
int
FAIL_NONE
=
0
;
public
static
final
int
FAIL_MOTION
=
1
;
// motion strength/fraction too low
public
static
final
int
FAIL_MOTION
=
1
;
// motion strength/fraction too low
, also - motion score too low
public
static
final
int
FAIL_NO_MAX
=
2
;
// no suitable local maximum
public
static
final
int
FAIL_CENT_STR
=
3
;
// centroid amplitude is too low
public
static
final
int
FAIL_CENT_FRAC
=
4
;
// centroid fraction (energy in the peak fraction of all) is too low
public
static
final
int
FAIL_LMA
=
5
;
// LMA fail to converge
public
static
final
int
FAIL_A_PRE
=
6
;
// amplitude is too low at preliminary filter (just after LMA)
public
static
final
int
FAIL_A_LOW
=
7
;
// amplitude is too low
public
static
final
int
FAIL_ACENT
=
8
;
// ratio of maximal pixel to amplitude is too low
public
static
final
int
FAIL_RMSE
=
9
;
// RMSE is too high
public
static
final
int
FAIL_RMSE_R
=
10
;
// BOTH RMSE is not sufficient and RMSE/A is too high
public
static
final
int
FAIL_R0_HIGH
=
11
;
// Full radius (including negative overshoot) is too high
public
static
final
int
FAIL_R1_LOW
=
12
;
// Inner (positive) peak radius is too low
public
static
final
int
FAIL_K_LOW
=
13
;
// Overshoot is too low (not used, it can be down to 0)
public
static
final
int
FAIL_K_HIGH
=
14
;
// Overshoot is too high
public
static
final
int
FAIL_FAR
=
15
;
// Peak is too far from the center
public
static
final
int
FAIL_VCORR
=
16
;
// MV refinement (fine pass) resulted in a too high correction (not yet checked)
public
static
final
int
FAIL_HORIZON
=
17
;
// Peak is below horizon
public
static
final
int
FAIL_MISMATCH
=
18
;
// Mismatch on both ends is too high
public
static
final
int
FAIL_NEIGHBOR
=
19
;
// failed because some neighbor is stronger
public
static
final
int
FAIL_DUPLICATE
=
20
;
// coordinate are (almost) the same as those of a stronger tile
public
static
final
int
FAIL_USED
=
21
;
// non-centered used to generate centered, remove this
public
static
final
int
FAIL_FL_ONLY
=
22
;
// Flight log data only, no target detected here
public
static
final
int
FAIL_Q_LOW
=
8
;
// score too low
public
static
final
int
FAIL_ACENT
=
9
;
// ratio of maximal pixel to amplitude is too low
public
static
final
int
FAIL_RMSE
=
10
;
// RMSE is too high
public
static
final
int
FAIL_RMSE_R
=
11
;
// BOTH RMSE is not sufficient and RMSE/A is too high
public
static
final
int
FAIL_R0_HIGH
=
12
;
// Full radius (including negative overshoot) is too high
public
static
final
int
FAIL_R1_LOW
=
13
;
// Inner (positive) peak radius is too low
public
static
final
int
FAIL_K_LOW
=
14
;
// Overshoot is too low (not used, it can be down to 0)
public
static
final
int
FAIL_K_HIGH
=
15
;
// Overshoot is too high
public
static
final
int
FAIL_FAR
=
16
;
// Peak is too far from the center
public
static
final
int
FAIL_VCORR
=
17
;
// MV refinement (fine pass) resulted in a too high correction (not yet checked)
public
static
final
int
FAIL_HORIZON
=
18
;
// Peak is below horizon
public
static
final
int
FAIL_MISMATCH
=
19
;
// Mismatch on both ends is too high
public
static
final
int
FAIL_NEIGHBOR
=
20
;
// failed because some neighbor is stronger
public
static
final
int
FAIL_DUPLICATE
=
21
;
// coordinate are (almost) the same as those of a stronger tile
public
static
final
int
FAIL_USED
=
22
;
// non-centered used to generate centered, remove this
public
static
final
int
FAIL_FL_ONLY
=
23
;
// Flight log data only, no target detected here
public
static
final
int
CENTERED_NO
=
0
;
public
static
final
int
CENTERED_YES
=
1
;
...
...
src/main/java/com/elphel/imagej/tileprocessor/IntersceneMatchParameters.java
View file @
9a4d969e
...
...
@@ -823,9 +823,15 @@ min_str_neib_fpn 0.35
public
int
cuas_num_cycles
=
25
;
// number of cycles of testing and removing bad targets // will get out earlier
public
int
cuas_trim_first
=
5
;
// Trim targets after first (non-centered) pass (if > 0)
public
boolean
cuas_early_en
=
true
;
// Apply early fail filter after phase 1
public
double
cuas_early_mscore
=
0.0015
;
// Minimal motion score (RSLT_MSCORE)
public
double
cuas_early_vstr
=
0.007
;
// Minimal MV confidence (RSLT_VSTR)
public
double
cuas_early_score
=
0.32
;
// Minimal score (RSLT_QSCORE)
public
double
cuas_early_amp
=
0.35
;
// Minimal amplitude (RSLT_A)
// Recalculate Motion Vectors before centered \"tracking camera\"
public
boolean
cuas_recalc_mv
=
true
;
// Recalculate motion vectors before centered targets accumulation by masking far-from target areas
//
public boolean cuas_recalc_mv = true; // Recalculate motion vectors before centered targets accumulation by masking far-from target areas
public
int
cuas_recalc_mv_num
=
2
;
// Number of recalculations of the motion vectors before centered targets accumulation by masking far-from target areas
public
double
cuas_recalc_mv_boost
=
4.0
;
// Scale default number of correlation pairs for motion vectors calculation
public
double
cuas_recalc_mv_corr
=
4.0
;
// Scale corr_offset for refinement pass (will use (int)Math.round()
...
...
@@ -908,7 +914,8 @@ min_str_neib_fpn 0.35
public
boolean
cuas_slow_en
=
true
;
// enable slow (almost static) target detection // verify temporal offset with fast
public
double
cuas_slow_ra
=
50.0
;
// running averaging for slow targets
public
double
cuas_slow_score
=
1.0
;
// scale scores for slow target mode
public
double
cuas_score_mv
=
0.0
;
// minimal score for the motion vectors
//70: Phase1-mscore Rectangle(51, 38, 10, 1) scenes:[0, 235] min = 0.001979102846235037, max = 0.1058499738574028
public
double
cuas_score_mv
=
0.0015
;
// minimal score for the motion vectors
public
double
cuas_score_lma
=
1.6
;
// minimal score for the target LMA
public
double
cuas_factor_lim
=
5.0
;
// limit each individual score factor
public
double
cuas_factor_pow
=
1.0
;
// raise score factor to this power before combining
...
...
@@ -2771,9 +2778,19 @@ min_str_neib_fpn 0.35
gd
.
addNumericField
(
"Trim targets after non-centered pass"
,
this
.
cuas_trim_first
,
0
,
3
,
""
,
"Trim targets after first (non-centered) pass (if > 0)."
);
gd
.
addMessage
(
"=== Early Fail Filters (after phase 1) ==="
);
gd
.
addCheckbox
(
"Apply early fail filters"
,
this
.
cuas_early_en
,
"Reduce number of target candidates after phase 1."
);
gd
.
addNumericField
(
"Motion score (RSLT_MSCORE)"
,
this
.
cuas_early_mscore
,
5
,
8
,
""
,
"Minimal motion score (RSLT_MSCORE)."
);
gd
.
addNumericField
(
"Motion confidence (RSLT_VSTR)"
,
this
.
cuas_early_vstr
,
5
,
8
,
""
,
"Minimal MV confidence (RSLT_VSTR)."
);
gd
.
addNumericField
(
"Score (RSLT_QSCORE)"
,
this
.
cuas_early_score
,
5
,
8
,
""
,
"Minimal score (RSLT_QSCORE)."
);
gd
.
addNumericField
(
"Amplitude (RSLT_A)"
,
this
.
cuas_early_amp
,
5
,
8
,
""
,
"Minimal amplitude (RSLT_A)."
);
gd
.
addMessage
(
"=== Recalculate Motion Vectors before centered \"tracking camera\" ==="
);
// gd.addCheckbox ("Refine motion vectors", this.cuas_recalc_mv,
// "Recalculate motion vectors before centered targets accumulation by masking far-from target areas.");
gd
.
addNumericField
(
"Refine morion vector passes"
,
this
.
cuas_recalc_mv_num
,
0
,
3
,
""
,
"Number of MV refinement passes: 0 - no refinement, 1 - coarse, 2 coarse+fine."
);
gd
.
addNumericField
(
"Boost number of correlation pairs"
,
this
.
cuas_recalc_mv_boost
,
5
,
8
,
"x"
,
...
...
@@ -2915,6 +2932,9 @@ min_str_neib_fpn 0.35
"Maximal ratio of the overshoot radius to the first 0 radius (typical 3.0)."
);
gd
.
addNumericField
(
"Minimal max pixel to amplitude ratio"
,
this
.
cuas_lma_a2a
,
5
,
8
,
""
,
"Minimal ratio of the maximal pixel near fitted maximum to the LMA amplitude."
);
gd
.
addMessage
(
"=== Reuse already calculated targets ==="
);
gd
.
addMessage
(
"=== Slow targets detection ==="
);
gd
.
addCheckbox
(
"Enable slow targets detection"
,
this
.
cuas_slow_en
,
...
...
@@ -4453,8 +4473,13 @@ min_str_neib_fpn 0.35
this
.
cuas_fin_range
=
(
int
)
gd
.
getNextNumber
();
this
.
cuas_num_cycles
=
(
int
)
gd
.
getNextNumber
();
this
.
cuas_trim_first
=
(
int
)
gd
.
getNextNumber
();
this
.
cuas_early_en
=
gd
.
getNextBoolean
();
this
.
cuas_early_mscore
=
gd
.
getNextNumber
();
this
.
cuas_early_vstr
=
gd
.
getNextNumber
();
this
.
cuas_early_score
=
gd
.
getNextNumber
();
this
.
cuas_early_amp
=
gd
.
getNextNumber
();
// this.cuas_recalc_mv = gd.getNextBoolean();
this
.
cuas_recalc_mv_num
=
(
int
)
gd
.
getNextNumber
();
this
.
cuas_recalc_mv_boost
=
gd
.
getNextNumber
();
this
.
cuas_recalc_mv_corr
=
gd
.
getNextNumber
();
...
...
@@ -5777,6 +5802,12 @@ min_str_neib_fpn 0.35
properties
.
setProperty
(
prefix
+
"cuas_num_cycles"
,
this
.
cuas_num_cycles
+
""
);
// int
properties
.
setProperty
(
prefix
+
"cuas_trim_first"
,
this
.
cuas_trim_first
+
""
);
// int
properties
.
setProperty
(
prefix
+
"cuas_early_en"
,
this
.
cuas_early_en
+
""
);
// boolean
properties
.
setProperty
(
prefix
+
"cuas_early_mscore"
,
this
.
cuas_early_mscore
+
""
);
// double
properties
.
setProperty
(
prefix
+
"cuas_early_vstr"
,
this
.
cuas_early_vstr
+
""
);
// double
properties
.
setProperty
(
prefix
+
"cuas_early_score"
,
this
.
cuas_early_score
+
""
);
// double
properties
.
setProperty
(
prefix
+
"cuas_early_amp"
,
this
.
cuas_early_amp
+
""
);
// double
properties
.
setProperty
(
prefix
+
"cuas_recalc_mv_num"
,
this
.
cuas_recalc_mv_num
+
""
);
// int
properties
.
setProperty
(
prefix
+
"cuas_recalc_mv_boost"
,
this
.
cuas_recalc_mv_boost
+
""
);
// double
properties
.
setProperty
(
prefix
+
"cuas_recalc_mv_corr"
,
this
.
cuas_recalc_mv_corr
+
""
);
// double
...
...
@@ -7033,7 +7064,13 @@ min_str_neib_fpn 0.35
if
(
properties
.
getProperty
(
prefix
+
"cuas_fin_range"
)!=
null
)
this
.
cuas_fin_range
=
Integer
.
parseInt
(
properties
.
getProperty
(
prefix
+
"cuas_fin_range"
));
if
(
properties
.
getProperty
(
prefix
+
"cuas_num_cycles"
)!=
null
)
this
.
cuas_num_cycles
=
Integer
.
parseInt
(
properties
.
getProperty
(
prefix
+
"cuas_num_cycles"
));
if
(
properties
.
getProperty
(
prefix
+
"cuas_trim_first"
)!=
null
)
this
.
cuas_trim_first
=
Integer
.
parseInt
(
properties
.
getProperty
(
prefix
+
"cuas_trim_first"
));
if
(
properties
.
getProperty
(
prefix
+
"cuas_early_en"
)!=
null
)
this
.
cuas_early_en
=
Boolean
.
parseBoolean
(
properties
.
getProperty
(
prefix
+
"cuas_early_en"
));
if
(
properties
.
getProperty
(
prefix
+
"cuas_early_mscore"
)!=
null
)
this
.
cuas_early_mscore
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"cuas_early_mscore"
));
if
(
properties
.
getProperty
(
prefix
+
"cuas_early_vstr"
)!=
null
)
this
.
cuas_early_vstr
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"cuas_early_vstr"
));
if
(
properties
.
getProperty
(
prefix
+
"cuas_early_score"
)!=
null
)
this
.
cuas_early_score
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"cuas_early_score"
));
if
(
properties
.
getProperty
(
prefix
+
"cuas_early_amp"
)!=
null
)
this
.
cuas_early_amp
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"cuas_early_amp"
));
if
(
properties
.
getProperty
(
prefix
+
"cuas_recalc_mv_num"
)!=
null
)
this
.
cuas_recalc_mv_num
=
Integer
.
parseInt
(
properties
.
getProperty
(
prefix
+
"cuas_recalc_mv_num"
));
if
(
properties
.
getProperty
(
prefix
+
"cuas_recalc_mv_boost"
)!=
null
)
this
.
cuas_recalc_mv_boost
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"cuas_recalc_mv_boost"
));
if
(
properties
.
getProperty
(
prefix
+
"cuas_recalc_mv_corr"
)!=
null
)
this
.
cuas_recalc_mv_corr
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"cuas_recalc_mv_corr"
));
...
...
@@ -8307,6 +8344,12 @@ min_str_neib_fpn 0.35
imp
.
cuas_fin_range
=
this
.
cuas_fin_range
;
imp
.
cuas_num_cycles
=
this
.
cuas_num_cycles
;
imp
.
cuas_trim_first
=
this
.
cuas_trim_first
;
imp
.
cuas_early_en
=
this
.
cuas_early_en
;
imp
.
cuas_early_mscore
=
this
.
cuas_early_mscore
;
imp
.
cuas_early_vstr
=
this
.
cuas_early_vstr
;
imp
.
cuas_early_score
=
this
.
cuas_early_score
;
imp
.
cuas_early_amp
=
this
.
cuas_early_amp
;
imp
.
cuas_recalc_mv_num
=
this
.
cuas_recalc_mv_num
;
imp
.
cuas_recalc_mv_boost
=
this
.
cuas_recalc_mv_boost
;
...
...
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