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
f1e78589
Commit
f1e78589
authored
Dec 09, 2023
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed NaN when rendering with zero Motion Blur
parent
a47aabbe
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
10 deletions
+9
-10
GpuQuad.java
src/main/java/com/elphel/imagej/gpu/GpuQuad.java
+9
-10
No files found.
src/main/java/com/elphel/imagej/gpu/GpuQuad.java
View file @
f1e78589
...
...
@@ -3843,7 +3843,7 @@ public class GpuQuad{ // quad camera description
final
int
threadsMax
)
// maximal number of threads to launch
{
final
double
min_sub
=
1
e
-
12
;
final
double
min_len
=
0.
1
;
// pix
final
double
min_len
=
0.
001
;
// pix was 0.1
int
num_pairs
=
Correlation2d
.
getNumPairs
(
num_cams
);
//change to fixed 511?
// final int task_code = ((1 << num_pairs)-1) << GPUTileProcessor.TASK_CORR_BITS; // correlation only
...
...
@@ -3895,18 +3895,17 @@ public class GpuQuad{ // quad camera description
// calculate offset for the secondary tile and weigh
double
dx
=
mb_vectors
[
0
][
nTile
];
double
dy
=
mb_vectors
[
1
][
nTile
];
double
mb_len
=
Math
.
sqrt
(
dx
*
dx
+
dy
*
dy
);
// in pixels/s
dx
/=
mb_len
;
// unit vector
dy
/=
mb_len
;
mb_len
*=
mb_tau
;
// now in pixels
/*
double
mb_len
=
Math
.
sqrt
(
dx
*
dx
+
dy
*
dy
);
// in pixels/s -> 0
double
[]
centerXY_sub
=
centerXY
;
if
(
mb_len
<
min_len
)
{
tp_task
.
setScale
(
1.0
);
tp_task_sub
.
task
=
0
;
// disable
tp_task.setScale(-min_sub);
tp_task_sub
.
setScale
(-
min_sub
);
tp_task_sub
.
setCenterXY
(
centerXY
);
}
else
{
*/
dx
/=
mb_len
;
// unit vector
dy
/=
mb_len
;
mb_len
*=
mb_tau
;
// now in pixels
double
mb_offs
=
1.0
;
// try 1 pixel. Maybe adjust for non-ortho, e.g. sqrt(2) for diagonal?
double
min_offs
=
mb_len_scale
*
mb_len
;
if
(
mb_offs
<
min_offs
)
{
...
...
@@ -3914,7 +3913,7 @@ public class GpuQuad{ // quad camera description
}
dx
*=
mb_offs
;
dy
*=
mb_offs
;
double
[]
centerXY_sub
=
new
double
[]
{
centerXY
[
0
]+
dx
,
centerXY
[
1
]+
dy
};
centerXY_sub
=
new
double
[]
{
centerXY
[
0
]+
dx
,
centerXY
[
1
]+
dy
};
tp_task_sub
.
setCenterXY
(
centerXY_sub
);
double
exp_offs
=
Math
.
exp
(-
mb_offs
/
mb_len
);
double
gain
=
1.0
/(
1.0
-
exp_offs
);
...
...
@@ -3924,7 +3923,7 @@ public class GpuQuad{ // quad camera description
}
tp_task
.
setScale
(
gain
);
tp_task_sub
.
setScale
(
gain_sub
);
//
}
}
boolean
bad_margins
=
false
;
if
(
calcPortsCoordinatesAndDerivatives
)
{
// for non-GPU?
double
[][]
disp_dist
=
new
double
[
quad_main
][];
// used to correct 3D correlations (not yet used here)
...
...
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