Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
f4e5209d
Commit
f4e5209d
authored
Mar 12, 2012
by
Alexander Shishkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed compilation on Windows (NAN)
parent
d95127c2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
rgbdodometry.cpp
modules/contrib/src/rgbdodometry.cpp
+13
-1
No files found.
modules/contrib/src/rgbdodometry.cpp
View file @
f4e5209d
...
@@ -54,6 +54,11 @@
...
@@ -54,6 +54,11 @@
#include <Eigen/Dense>
#include <Eigen/Dense>
#endif
#endif
#if defined _MSC_VER
#include <limits>
#endif
using
namespace
cv
;
using
namespace
cv
;
inline
static
inline
static
...
@@ -220,11 +225,18 @@ void preprocessDepth( Mat depth0, Mat depth1,
...
@@ -220,11 +225,18 @@ void preprocessDepth( Mat depth0, Mat depth1,
{
{
float
&
d0
=
depth0
.
at
<
float
>
(
y
,
x
);
float
&
d0
=
depth0
.
at
<
float
>
(
y
,
x
);
if
(
!
cvIsNaN
(
d0
)
&&
(
d0
>
maxDepth
||
d0
<
minDepth
||
d0
<=
0
||
(
!
validMask0
.
empty
()
&&
!
validMask0
.
at
<
uchar
>
(
y
,
x
)))
)
if
(
!
cvIsNaN
(
d0
)
&&
(
d0
>
maxDepth
||
d0
<
minDepth
||
d0
<=
0
||
(
!
validMask0
.
empty
()
&&
!
validMask0
.
at
<
uchar
>
(
y
,
x
)))
)
#if defined _MSC_VER
d0
=
std
::
numeric_limits
<
float
>::
quiet_NaN
();
#else
d0
=
NAN
;
d0
=
NAN
;
#endif
float
&
d1
=
depth1
.
at
<
float
>
(
y
,
x
);
float
&
d1
=
depth1
.
at
<
float
>
(
y
,
x
);
if
(
!
cvIsNaN
(
d1
)
&&
(
d1
>
maxDepth
||
d1
<
minDepth
||
d1
<=
0
||
(
!
validMask1
.
empty
()
&&
!
validMask1
.
at
<
uchar
>
(
y
,
x
)))
)
if
(
!
cvIsNaN
(
d1
)
&&
(
d1
>
maxDepth
||
d1
<
minDepth
||
d1
<=
0
||
(
!
validMask1
.
empty
()
&&
!
validMask1
.
at
<
uchar
>
(
y
,
x
)))
)
#if defined _MSC_VER
d1
=
std
::
numeric_limits
<
float
>::
quiet_NaN
();
#else
d1
=
NAN
;
d1
=
NAN
;
#endif
}
}
}
}
}
}
...
...
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