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
f2fc939c
Commit
f2fc939c
authored
May 19, 2026
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
working snapshot
parent
66969e94
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
215 additions
and
67 deletions
+215
-67
CuasMotion.java
src/main/java/com/elphel/imagej/cuas/CuasMotion.java
+165
-61
CuasRanging.java
src/main/java/com/elphel/imagej/cuas/CuasRanging.java
+11
-0
IntersceneMatchParameters.java
...lphel/imagej/tileprocessor/IntersceneMatchParameters.java
+12
-6
TileNeibs.java
src/main/java/com/elphel/imagej/tileprocessor/TileNeibs.java
+27
-0
No files found.
src/main/java/com/elphel/imagej/cuas/CuasMotion.java
View file @
f2fc939c
This diff is collapsed.
Click to expand it.
src/main/java/com/elphel/imagej/cuas/CuasRanging.java
View file @
f2fc939c
...
...
@@ -249,18 +249,29 @@ public class CuasRanging {
uasLogReader
,
// UasLogReader uasLogReader,
debugLevel
);
// int debugLevel)
if
(
save_noise_map
)
{
/*
ImagePlus imp_noise_map = ShowDoubleFloatArrays.makeArrays(
cuasMotion.getNoiseMap(), // float[][] pixels,
cuasMotion.getTilesX(), // int width,
cuasMotion.getTilesY(), // int height,
center_CLT.getImageName()+"-NOISE-MAP"); //String [] titles)
center_CLT.saveImagePlusInModelDirectory(imp_noise_map); // ImagePlus imp)
*/
ImagePlus
imp_noise_map8
=
ShowDoubleFloatArrays
.
makeArrays
(
cuasMotion
.
getNoiseMap8
(),
// float[][] pixels,
cuasMotion
.
getTilesX
(),
// int width,
cuasMotion
.
getTilesY
(),
// int height,
center_CLT
.
getImageName
()+
"-NOISE-MAP8"
);
//String [] titles)
center_CLT
.
saveImagePlusInModelDirectory
(
imp_noise_map8
);
// ImagePlus imp)
ImagePlus
imp_noise_neibs
=
ShowDoubleFloatArrays
.
makeArrays
(
cuasMotion
.
getNoiseNeibs
(),
// float[][] pixels,
cuasMotion
.
getTilesX
(),
// int width,
cuasMotion
.
getTilesY
(),
// int height,
center_CLT
.
getImageName
()+
"-NOISE-NEIBS"
);
//String [] titles)
center_CLT
.
saveImagePlusInModelDirectory
(
imp_noise_neibs
);
// ImagePlus imp)
}
...
...
src/main/java/com/elphel/imagej/tileprocessor/IntersceneMatchParameters.java
View file @
f2fc939c
...
...
@@ -816,6 +816,8 @@ min_str_neib_fpn 0.35
public
int
cuas_max_range
=
2
;
// how far to extend local max: 1 3x3 neighbors, 2 - 5x5 neighbs
public
int
cuas_fin_range
=
2
;
// for final filtering
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)
// 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
...
...
@@ -858,6 +860,7 @@ min_str_neib_fpn 0.35
public
double
cuas_target_radius
=
2.0
;
// target centroids center radius
public
double
cuas_target_strength
=
0.2
;
// target centroids strength
public
double
cuas_target_strength2
=
0.2
;
// target centroids strength
public
double
[][]
cuas_target_frac
=
{{
0
,
0.04
},{
2.5
,
0.1
},{
5
,
0.3
}};
public
boolean
cuas_no_border
=
true
;
// exclude targets with centers on the 16x16 tile edges
// CUAS Motion LMA parameters
...
...
@@ -2718,9 +2721,9 @@ min_str_neib_fpn 0.35
"Do not boost if motion vector faster than this (before in code equiv 1.8 pix)."
);
gd
.
addNumericField
(
"Increase tracking camera exposure"
,
this
.
cuas_boost_accum
,
5
,
8
,
""
,
"If >1 increase tracking camera exposure (later - conditional)."
);
gd
.
addCheckbox
(
"Accumulate tracking base exposu
er
"
,
this
.
cuas_accum_base
,
gd
.
addCheckbox
(
"Accumulate tracking base exposu
re
"
,
this
.
cuas_accum_base
,
"Accumulate centered targets with base \"exposure\"."
);
gd
.
addCheckbox
(
"Accumulate tracking boosted exposu
er
"
,
this
.
cuas_accum_boosted
,
gd
.
addCheckbox
(
"Accumulate tracking boosted exposu
re
"
,
this
.
cuas_accum_boosted
,
"Accumulate centered targets with boosted \"exposure\"."
);
gd
.
addNumericField
(
"Boost pairs for weak targets"
,
this
.
cuas_boost_mstr
,
5
,
8
,
""
,
"Scale corr_pairs if motion strength is below, regardless of speed."
);
...
...
@@ -2751,7 +2754,9 @@ min_str_neib_fpn 0.35
gd
.
addNumericField
(
"Local final max range"
,
this
.
cuas_fin_range
,
0
,
3
,
""
,
"While filtering local correlation maximums: 0 - 1x1 (ignore neighbors), 1 - 3x3 neighbors, 2 - 5x5 ones."
);
gd
.
addNumericField
(
"Number of enhancement cycles"
,
this
.
cuas_num_cycles
,
0
,
3
,
""
,
"Number of cycles of testing and removing bad targets from compoetition with weaker neighbors."
);
"Number of cycles of testing and removing bad targets from competition with weaker neighbors."
);
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
(
"=== Recalculate Motion Vectors before centered \"tracking camera\" ==="
);
// gd.addCheckbox ("Refine motion vectors", this.cuas_recalc_mv,
...
...
@@ -4431,6 +4436,7 @@ min_str_neib_fpn 0.35
this
.
cuas_max_range
=
(
int
)
gd
.
getNextNumber
();
this
.
cuas_fin_range
=
(
int
)
gd
.
getNextNumber
();
this
.
cuas_num_cycles
=
(
int
)
gd
.
getNextNumber
();
this
.
cuas_trim_first
=
(
int
)
gd
.
getNextNumber
();
// this.cuas_recalc_mv = gd.getNextBoolean();
this
.
cuas_recalc_mv_num
=
(
int
)
gd
.
getNextNumber
();
...
...
@@ -5750,8 +5756,8 @@ min_str_neib_fpn 0.35
properties
.
setProperty
(
prefix
+
"cuas_max_range"
,
this
.
cuas_max_range
+
""
);
// int
properties
.
setProperty
(
prefix
+
"cuas_fin_range"
,
this
.
cuas_fin_range
+
""
);
// int
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_recalc_mv", this.cuas_recalc_mv+""); // boolean
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
...
...
@@ -7004,8 +7010,8 @@ min_str_neib_fpn 0.35
if
(
properties
.
getProperty
(
prefix
+
"cuas_max_range"
)!=
null
)
this
.
cuas_max_range
=
Integer
.
parseInt
(
properties
.
getProperty
(
prefix
+
"cuas_max_range"
));
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_recalc_mv")!=null) this.cuas_recalc_mv=Boolean.parseBoolean(properties.getProperty(prefix+"cuas_recalc_mv"));
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"
));
...
...
@@ -8275,8 +8281,8 @@ min_str_neib_fpn 0.35
imp
.
cuas_max_range
=
this
.
cuas_max_range
;
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_recalc_mv = this.cuas_recalc_mv;
imp
.
cuas_recalc_mv_num
=
this
.
cuas_recalc_mv_num
;
imp
.
cuas_recalc_mv_boost
=
this
.
cuas_recalc_mv_boost
;
imp
.
cuas_recalc_mv_corr
=
this
.
cuas_recalc_mv_corr
;
...
...
src/main/java/com/elphel/imagej/tileprocessor/TileNeibs.java
View file @
f2fc939c
...
...
@@ -212,6 +212,33 @@ public class TileNeibs{
default
:
return
indx
;
}
}
public
static
int
getDir
(
double
dx
,
double
dy
,
double
thresh
)
{
if
(
dy
<
-
thresh
)
{
if
(
dx
<
-
thresh
)
{
return
7
;
}
else
if
(
dx
>
thresh
)
{
return
1
;
}
else
{
// dx ~= 0;
return
0
;
}
}
else
if
(
dy
>
thresh
)
{
if
(
dx
<
-
thresh
)
{
return
5
;
}
else
if
(
dx
>
thresh
)
{
return
3
;
}
else
{
// dx ~= 0;
return
4
;
}
}
else
{
// dy == 0
if
(
dx
<
-
thresh
)
{
return
6
;
}
else
if
(
dx
>
thresh
)
{
return
2
;
}
else
{
// dx ~= 0;
return
8
;
}
}
}
public
static
int
getDX
(
int
dir
)
{
...
...
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