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
009eb8ea
Commit
009eb8ea
authored
Jan 13, 2026
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added disparity filtering to remove NaN to transformFromVirtual()
parent
86106498
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
0 deletions
+27
-0
Cuas.java
src/main/java/com/elphel/imagej/cuas/Cuas.java
+27
-0
No files found.
src/main/java/com/elphel/imagej/cuas/Cuas.java
View file @
009eb8ea
...
...
@@ -1339,6 +1339,33 @@ public class Cuas {
int
initial_capacity
=
4
;
final
int
min_samples
=
1
;
// fill NaN in disparity_ref (not needed for planes)
boolean
had_nans
=
false
;
for
(
int
i
=
0
;
i
<
disparity_ref
.
length
;
i
++)
{
if
(
Double
.
isNaN
(
disparity_ref
[
i
]))
{
had_nans
=
true
;
break
;
}
}
if
(
had_nans
)
{
int
grow_width
=
Math
.
max
(
tilesX
,
tilesY
);
int
num_passes
=
20
;
System
.
out
.
println
(
"transformFromVirtual(): disparity_ref had NaN, filling them from surrounding."
);
double
[]
disparity_ref1
=
TileProcessor
.
fillNaNs
(
disparity_ref
,
// final double [] data,
null
,
// final boolean [] prohibit,
tilesX
,
// int width,
2
*
grow_width
,
// 100, // 2*width, // 16, // final int grow,
0.7
,
// double diagonal_weight, // relative to ortho
num_passes
,
// int num_passes,
0.03
);
// final double max_rchange, // = 0.01 - does not need to be accurate
System
.
arraycopy
(
disparity_ref1
,
0
,
disparity_ref
,
0
,
disparity_ref
.
length
);
}
final
String
debugTitle
=
debug
?
reference_QuadClt
.
getImageName
()+
"-"
+
debugSuffix
:
null
;
String
[]
debug_frame_titles
=
{
"X"
,
"Y"
,
"D"
};
String
[]
debug_titles
=
new
String
[
num_refines
+
1
];
...
...
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