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
c09cca3b
Commit
c09cca3b
authored
May 12, 2026
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Starting dual-boost centered processing
parent
a86749dc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
186 additions
and
179 deletions
+186
-179
CuasMotion.java
src/main/java/com/elphel/imagej/cuas/CuasMotion.java
+186
-179
No files found.
src/main/java/com/elphel/imagej/cuas/CuasMotion.java
View file @
c09cca3b
...
@@ -2674,6 +2674,7 @@ public class CuasMotion {
...
@@ -2674,6 +2674,7 @@ public class CuasMotion {
double
k
=
Math
.
PI
/
2
/(
half_range_boosted
+
0.5
);
double
k
=
Math
.
PI
/
2
/(
half_range_boosted
+
0.5
);
for
(
int
i
=
1
;
i
<=
half_range_boosted
;
i
++)
{
for
(
int
i
=
1
;
i
<=
half_range_boosted
;
i
++)
{
window_full
[
half_range_boosted
+
i
]
=
smooth
?
(
Math
.
cos
(
i
*
k
)):
1.0
;
window_full
[
half_range_boosted
+
i
]
=
smooth
?
(
Math
.
cos
(
i
*
k
)):
1.0
;
window_full
[
half_range_boosted
-
i
]
=
smooth
?
(
Math
.
cos
(
i
*
k
)):
1.0
;
// By Claude on 05/11/2026
s0
+=
2
*
window_full
[
half_range_boosted
+
i
];
s0
+=
2
*
window_full
[
half_range_boosted
+
i
];
}
}
for
(
int
i
=
0
;
i
<
window_full
.
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
window_full
.
length
;
i
++)
{
...
@@ -2754,7 +2755,7 @@ public class CuasMotion {
...
@@ -2754,7 +2755,7 @@ public class CuasMotion {
// may be faster if process only where vector_field[nseq][ntile] is not null
// may be faster if process only where vector_field[nseq][ntile] is not null
for
(
int
nSeq
=
ai
.
getAndIncrement
();
nSeq
<
frames_accum
.
length
;
nSeq
=
ai
.
getAndIncrement
())
{
for
(
int
nSeq
=
ai
.
getAndIncrement
();
nSeq
<
frames_accum
.
length
;
nSeq
=
ai
.
getAndIncrement
())
{
for
(
int
i
=
0
;
i
<
frames_accum
[
nSeq
].
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
frames_accum
[
nSeq
].
length
;
i
++)
{
frames_accum
[
nSeq
][
i
]
*=-
1
;
frames_accum
[
nSeq
][
i
]
*=-
0.625
;
// By Claude on 05/11/2026: restore pre-fix amplitude (window fix doubled it)
if
(
zero_fill
&&
Double
.
isNaN
(
frames_accum
[
nSeq
][
i
])){
if
(
zero_fill
&&
Double
.
isNaN
(
frames_accum
[
nSeq
][
i
])){
frames_accum
[
nSeq
][
i
]
=
0
f
;
frames_accum
[
nSeq
][
i
]
=
0
f
;
}
}
...
@@ -8242,6 +8243,9 @@ public class CuasMotion {
...
@@ -8242,6 +8243,9 @@ public class CuasMotion {
cuasMotion
.
tilesX
);
// int tilesX) {
cuasMotion
.
tilesX
);
// int tilesX) {
parentCLT
.
saveImagePlusInModelDirectory
(
imp_ext
);
parentCLT
.
saveImagePlusInModelDirectory
(
imp_ext
);
}
}
// double [][][][] targets_new_multi = null;
int
num_new
=
0
;
{
// perform new accumulations of shifted non-conflicting tiles
// perform new accumulations of shifted non-conflicting tiles
float
[][]
fpixels_accumulated
=
cuasMotion
.
shiftAndRenderAccumulate
(
float
[][]
fpixels_accumulated
=
cuasMotion
.
shiftAndRenderAccumulate
(
clt_parameters
,
// CLTParameters clt_parameters,
clt_parameters
,
// CLTParameters clt_parameters,
...
@@ -8351,7 +8355,6 @@ public class CuasMotion {
...
@@ -8351,7 +8355,6 @@ public class CuasMotion {
}
}
parentCLT
.
saveImagePlusInModelDirectory
(
imp_acc
);
// ImagePlus imp)
parentCLT
.
saveImagePlusInModelDirectory
(
imp_acc
);
// ImagePlus imp)
}
}
// no need to to evaluate scores now - can be done all at once when all non-centered will be replaced by centered, removed (almost) duplicates
// no need to to evaluate scores now - can be done all at once when all non-centered will be replaced by centered, removed (almost) duplicates
// evaluating scores, but it is not needed
// evaluating scores, but it is not needed
// new results are sorted by decreasing amplitude, there should be only one - test it. If not still use only the first
// new results are sorted by decreasing amplitude, there should be only one - test it. If not still use only the first
...
@@ -8424,7 +8427,8 @@ public class CuasMotion {
...
@@ -8424,7 +8427,8 @@ public class CuasMotion {
parentCLT
.
saveImagePlusInModelDirectory
(
imp_new_scores
);
// ImagePlus imp)
parentCLT
.
saveImagePlusInModelDirectory
(
imp_new_scores
);
// ImagePlus imp)
}
}
int
num_new
=
addNewResults
(
//int
num_new
+=
addNewResults
(
target_sequence_multi
,
// final double [][][] target_sequence, // will only process non-nulls here
target_sequence_multi
,
// final double [][][] target_sequence, // will only process non-nulls here
targets_new_multi
,
// final double [][][] new_sequence,
targets_new_multi
,
// final double [][][] new_sequence,
// add just one best here?
// add just one best here?
...
@@ -8435,6 +8439,9 @@ public class CuasMotion {
...
@@ -8435,6 +8439,9 @@ public class CuasMotion {
if
(
debugLevel
>
-
4
)
{
if
(
debugLevel
>
-
4
)
{
System
.
out
.
println
(
"Added "
+
num_new
+
" new tiles as good/bad at iteration "
+
niter
+
"."
);
System
.
out
.
println
(
"Added "
+
num_new
+
" new tiles as good/bad at iteration "
+
niter
+
"."
);
}
}
}
if
(
save_filtered_low
)
{
if
(
save_filtered_low
)
{
String
title
=
model_prefix
+
"-ADDED_NEW_CENTERED_MULTI-n"
+
niter
;
String
title
=
model_prefix
+
"-ADDED_NEW_CENTERED_MULTI-n"
+
niter
;
if
(
boost_accum_pairs
>
1.0
)
{
if
(
boost_accum_pairs
>
1.0
)
{
...
...
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