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
788cab17
Commit
788cab17
authored
Jul 15, 2018
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed problem with rig adjustment when the same tile is measured with
NaN
parent
65bac413
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
GeometryCorrection.java
src/main/java/GeometryCorrection.java
+15
-1
No files found.
src/main/java/GeometryCorrection.java
View file @
788cab17
...
@@ -540,6 +540,10 @@ public class GeometryCorrection {
...
@@ -540,6 +540,10 @@ public class GeometryCorrection {
diff_x
,
// used only with target_disparity == 0
diff_x
,
// used only with target_disparity == 0
diff_y
,
diff_y
,
target_disparity
);
target_disparity
);
if
(
Double
.
isNaN
(
rms
))
{
System
.
out
.
println
(
"rms= NaN"
);
}
if
(
debugLevel
>-
4
)
{
if
(
debugLevel
>-
4
)
{
System
.
out
.
println
(
"getRigCorrection(): Current RMS = "
+
rms
+
"(debugLevel= "
+
debugLevel
+
")"
);
System
.
out
.
println
(
"getRigCorrection(): Current RMS = "
+
rms
+
"(debugLevel= "
+
debugLevel
+
")"
);
};
};
...
@@ -651,6 +655,11 @@ public class GeometryCorrection {
...
@@ -651,6 +655,11 @@ public class GeometryCorrection {
int
tileY
=
nTile
/
tilesX
;
int
tileY
=
nTile
/
tilesX
;
int
tileX
=
nTile
%
tilesX
;
int
tileX
=
nTile
%
tilesX
;
double
w
=
strength
[
nTile
];
double
w
=
strength
[
nTile
];
if
(
Double
.
isNaN
(
diff_y
[
nTile
]))
{
System
.
out
.
println
(
"==== setupYW(): diff_y["
+
nTile
+
"]= NaN (can happen if the same tile is now measured differently)"
);
w
=
0.0
;
diff_y
[
nTile
]
=
0.0
;
}
double
inf_w_corr
=
1.0
;
double
inf_w_corr
=
1.0
;
if
((
dx_max
>
0
)
&&
(
dx_pow
>
0
)){
if
((
dx_max
>
0
)
&&
(
dx_pow
>
0
)){
inf_w_corr
=
(
dx_max
-
diff_x
[
nTile
])/
dx_max
;
inf_w_corr
=
(
dx_max
-
diff_x
[
nTile
])/
dx_max
;
...
@@ -661,6 +670,11 @@ public class GeometryCorrection {
...
@@ -661,6 +670,11 @@ public class GeometryCorrection {
}
}
if
(
target_disparity
[
nTile
]
==
infinity_disparity
)
{
// only for infinity tiles
if
(
target_disparity
[
nTile
]
==
infinity_disparity
)
{
// only for infinity tiles
w
*=
inf_w_corr
;
w
*=
inf_w_corr
;
if
(
Double
.
isNaN
(
diff_x
[
nTile
]))
{
System
.
out
.
println
(
"==== setupYW(): diff_x["
+
nTile
+
"]= NaN (can happen if the same tile is now measured differently)"
);
w
=
0.0
;
diff_x
[
nTile
]
=
0.0
;
}
y_vector
[
2
*
i
+
0
]
=
diff_x
[
nTile
];
y_vector
[
2
*
i
+
0
]
=
diff_x
[
nTile
];
w_vector
[
2
*
i
+
0
]
=
w
;
w_vector
[
2
*
i
+
0
]
=
w
;
y_vector
[
2
*
i
+
1
]
=
diff_y
[
nTile
];
y_vector
[
2
*
i
+
1
]
=
diff_y
[
nTile
];
...
@@ -692,7 +706,7 @@ public class GeometryCorrection {
...
@@ -692,7 +706,7 @@ public class GeometryCorrection {
infinity_importance
=
0.0
;
infinity_importance
=
0.0
;
k_near
=
(
1.0
-
infinity_importance
)/
sumw_near
;
k_near
=
(
1.0
-
infinity_importance
)/
sumw_near
;
}
}
System
.
out
.
println
(
"setupYW(): k_inf="
+
k_inf
+
" k_near="
+
k_near
);
System
.
out
.
println
(
"setupYW(): k_inf="
+
k_inf
+
" k_near="
+
k_near
+
" (sum2_inf="
+
sum2_inf
+
", sum2_near="
+
sum2_near
+
")"
);
double
sum2
=
k_inf
*
sum2_inf
+
k_near
*
sum2_near
;
double
sum2
=
k_inf
*
sum2_inf
+
k_near
*
sum2_near
;
...
...
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