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
4342fd2a
Commit
4342fd2a
authored
Jul 30, 2025
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more working code for moving targets
parent
da579ebb
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
616 additions
and
128 deletions
+616
-128
CuasMotion.java
src/main/java/com/elphel/imagej/cuas/CuasMotion.java
+554
-125
IntersceneMatchParameters.java
...lphel/imagej/tileprocessor/IntersceneMatchParameters.java
+62
-3
No files found.
src/main/java/com/elphel/imagej/cuas/CuasMotion.java
View file @
4342fd2a
This diff is collapsed.
Click to expand it.
src/main/java/com/elphel/imagej/tileprocessor/IntersceneMatchParameters.java
View file @
4342fd2a
...
...
@@ -700,7 +700,7 @@ min_str_neib_fpn 0.35
public
double
cuas_reliable_str
=
0.8
;
// use for relaible tiles if INTER-INTRA-LMA is available, not just DSI_MAIN
public
double
cuas_fat_zero
=
1000.0
;
// phase correlation fat zero
public
double
cuas_cent_radius
=
4
.0
;
// centroids center radius
public
double
cuas_cent_radius
=
3
.0
;
// centroids center radius
public
int
cuas_n_recenter
=
2
;
// when cosine window, re-center window these many times
public
double
cuas_rstr
=
0.001
;
// minimal phase correlation maximums relative to max str
public
boolean
cuas_smooth
=
true
;
// used cosine window when averaging correlations
...
...
@@ -712,6 +712,11 @@ min_str_neib_fpn 0.35
public
double
cuas_speed_min
=
0.2
;
// minimal pixels per range (per cuas_corr_offset)
public
double
cuas_speed_pref
=
0.5
;
// preferable speed (boost weights for faster targets)
public
double
cuas_speed_boost
=
2.5
;
// speed boost limit
// target filtering after constant velocity accumulation
public
double
cuas_target_radius
=
3.0
;
// target centroids center radius
public
double
cuas_target_strength
=
0.8
;
// target centroids center radius
public
double
[][]
cuas_target_frac
=
{{
0
,
0.15
},{
2
,
0.3
},{
5
,
0.4
}};
public
boolean
cuas_debug
=
false
;
// save debug images (and show them if not in batch mode)
public
boolean
cuas_step_debug
=
false
;
// save debug images during per-step cuas recalculation (and show them if not in batch mode)
...
...
@@ -2139,12 +2144,19 @@ min_str_neib_fpn 0.35
gd
.
addNumericField
(
"Local max range"
,
this
.
cuas_max_range
,
0
,
3
,
""
,
"While filtering local correlation maximums: 1 - 3x3 neighbors, 2 - 5x5 ones."
);
gd
.
addMessage
(
"=== Moving target filtering ==="
);
gd
.
addNumericField
(
"Minimal speed"
,
this
.
cuas_speed_min
,
5
,
8
,
"ppr"
,
"Minimal target speed in pixels per range (per cuas_corr_offset)."
);
gd
.
addNumericField
(
"Preferable speed"
,
this
.
cuas_speed_pref
,
5
,
8
,
"ppr"
,
"Boost effective strength when speed is above this."
);
gd
.
addNumericField
(
"Maximal speed boost"
,
this
.
cuas_speed_boost
,
5
,
8
,
""
,
"Maximal speed-caused effective strength boost."
);
gd
.
addNumericField
(
"Target radius"
,
this
.
cuas_target_radius
,
5
,
8
,
"pix"
,
"Target radius, also used to calculate fraction of totals inside (windowed) to all positive values."
);
gd
.
addNumericField
(
"Minimal target strength"
,
this
.
cuas_target_strength
,
5
,
8
,
""
,
"Minimal value of the target image."
);
gd
.
addStringField
(
"Fraction for strengths"
,
double2dToString
(
this
.
cuas_target_frac
),
100
,
"Variable number of (strength, fraction) pairs separated by \":\". Each pair of strength, minimal fraction is separated by \",\"."
);
gd
.
addMessage
(
"=== Debug ==="
);
gd
.
addCheckbox
(
"Save/show debug images"
,
this
.
cuas_debug
,
...
...
@@ -3110,6 +3122,10 @@ min_str_neib_fpn 0.35
this
.
cuas_speed_pref
=
gd
.
getNextNumber
();
this
.
cuas_speed_boost
=
gd
.
getNextNumber
();
this
.
cuas_target_radius
=
gd
.
getNextNumber
();
this
.
cuas_target_strength
=
gd
.
getNextNumber
();
this
.
cuas_target_frac
=
stringToDouble2d
(
gd
.
getNextString
());
this
.
cuas_debug
=
gd
.
getNextBoolean
();
this
.
cuas_step_debug
=
gd
.
getNextBoolean
();
...
...
@@ -3999,6 +4015,10 @@ min_str_neib_fpn 0.35
properties
.
setProperty
(
prefix
+
"cuas_speed_pref"
,
this
.
cuas_speed_pref
+
""
);
// double
properties
.
setProperty
(
prefix
+
"cuas_speed_boost"
,
this
.
cuas_speed_boost
+
""
);
// double
properties
.
setProperty
(
prefix
+
"cuas_target_radius"
,
this
.
cuas_target_radius
+
""
);
// double
properties
.
setProperty
(
prefix
+
"cuas_target_strength"
,
this
.
cuas_target_strength
+
""
);
// double
properties
.
setProperty
(
prefix
+
"cuas_target_frac"
,
double2dToString
(
cuas_target_frac
)+
""
);
// double[][]
properties
.
setProperty
(
prefix
+
"cuas_debug"
,
this
.
cuas_debug
+
""
);
// boolean
properties
.
setProperty
(
prefix
+
"cuas_step_debug"
,
this
.
cuas_step_debug
+
""
);
// boolean
...
...
@@ -4860,7 +4880,9 @@ min_str_neib_fpn 0.35
if
(
properties
.
getProperty
(
prefix
+
"cuas_speed_pref"
)!=
null
)
this
.
cuas_speed_pref
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"cuas_speed_pref"
));
if
(
properties
.
getProperty
(
prefix
+
"cuas_speed_boost"
)!=
null
)
this
.
cuas_speed_boost
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"cuas_speed_boost"
));
if
(
properties
.
getProperty
(
prefix
+
"cuas_target_radius"
)!=
null
)
this
.
cuas_target_radius
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"cuas_target_radius"
));
if
(
properties
.
getProperty
(
prefix
+
"cuas_target_strength"
)!=
null
)
this
.
cuas_target_strength
=
Double
.
parseDouble
(
properties
.
getProperty
(
prefix
+
"cuas_target_strength"
));
if
(
properties
.
getProperty
(
prefix
+
"cuas_target_frac"
)!=
null
)
cuas_target_frac
=
stringToDouble2d
((
String
)
properties
.
getProperty
(
prefix
+
"cuas_target_frac"
));
if
(
properties
.
getProperty
(
prefix
+
"cuas_debug"
)!=
null
)
this
.
cuas_debug
=
Boolean
.
parseBoolean
(
properties
.
getProperty
(
prefix
+
"cuas_debug"
));
if
(
properties
.
getProperty
(
prefix
+
"cuas_step_debug"
)!=
null
)
this
.
cuas_step_debug
=
Boolean
.
parseBoolean
(
properties
.
getProperty
(
prefix
+
"cuas_step_debug"
));
...
...
@@ -5722,6 +5744,10 @@ min_str_neib_fpn 0.35
imp
.
cuas_speed_min
=
this
.
cuas_speed_min
;
imp
.
cuas_speed_pref
=
this
.
cuas_speed_pref
;
imp
.
cuas_speed_boost
=
this
.
cuas_speed_boost
;
imp
.
cuas_target_frac
=
new
double
[
this
.
cuas_target_frac
.
length
][];
for
(
int
i
=
0
;
i
<
this
.
cuas_target_frac
.
length
;
i
++)
{
imp
.
cuas_target_frac
[
i
]
=
this
.
cuas_target_frac
[
i
].
clone
();
}
imp
.
cuas_debug
=
this
.
cuas_debug
;
imp
.
cuas_step_debug
=
this
.
cuas_step_debug
;
...
...
@@ -6118,6 +6144,39 @@ min_str_neib_fpn 0.35
}
public
static
String
double2dToString
(
double
[][]
d
)
{
String
s
=
""
;
for
(
int
i
=
0
;
i
<
d
.
length
;
i
++)
{
for
(
int
j
=
0
;
j
<
d
[
i
].
length
;
j
++)
{
Double
D
=
d
[
i
][
j
];
s
+=
D
.
toString
();
if
(
j
<(
d
[
i
].
length
-
1
))
{
s
+=
","
;
}
}
if
(
i
<
(
d
.
length
-
1
))
{
s
+=
":"
;
}
}
return
s
;
}
public
static
double
[][]
stringToDouble2d
(
String
s
)
{
String
[]
srows
=
s
.
split
(
":"
);
double
[][]
d
=
new
double
[
srows
.
length
][];
for
(
int
i
=
0
;
i
<
d
.
length
;
i
++)
{
String
[]
scols
=
srows
[
i
].
split
(
","
);
d
[
i
]
=
new
double
[
scols
.
length
];
for
(
int
j
=
0
;
j
<
d
[
i
].
length
;
j
++)
{
try
{
d
[
i
][
j
]
=
Double
.
valueOf
(
scols
[
j
]);
}
catch
(
NumberFormatException
e
){
d
[
i
][
j
]
=
0.0
;
}
}
}
return
d
;
}
public
static
String
rectangleToString
(
Rectangle
r
)
{
return
intsToString
(
new
int
[]{
r
.
x
,
r
.
y
,
r
.
width
,
r
.
height
});
...
...
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