Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
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_contrib
Commits
9677bd7f
Commit
9677bd7f
authored
Mar 18, 2016
by
Bleach666
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix vs2010 samples build
parent
fb55f29f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
knn_matching.cpp
modules/line_descriptor/samples/knn_matching.cpp
+1
-1
optical_flow_evaluation.cpp
modules/optflow/samples/optical_flow_evaluation.cpp
+3
-2
No files found.
modules/line_descriptor/samples/knn_matching.cpp
View file @
9677bd7f
...
...
@@ -111,7 +111,7 @@ uchar invertSingleBits( uchar dividend_char, int numBits )
/* reconvert to decimal */
uchar
result
=
0
;
for
(
int
i
=
(
int
)
bin_vector
.
size
()
-
1
;
i
>=
0
;
i
--
)
result
+=
(
uchar
)
(
bin_vector
[
i
]
*
pow
(
2
,
i
)
);
result
+=
(
uchar
)
(
bin_vector
[
i
]
*
(
1
<<
i
)
);
return
result
;
}
...
...
modules/optflow/samples/optical_flow_evaluation.cpp
View file @
9677bd7f
...
...
@@ -2,6 +2,7 @@
#include "opencv2/video.hpp"
#include "opencv2/optflow.hpp"
#include <fstream>
#include <limits>
using
namespace
std
;
using
namespace
cv
;
...
...
@@ -40,7 +41,7 @@ static Mat endpointError( const Mat_<Point2f>& flow1, const Mat_<Point2f>& flow2
const
Point2f
diff
=
u1
-
u2
;
result
.
at
<
float
>
(
i
,
j
)
=
sqrt
((
float
)
diff
.
ddot
(
diff
));
//distance
}
else
result
.
at
<
float
>
(
i
,
j
)
=
NAN
;
result
.
at
<
float
>
(
i
,
j
)
=
std
::
numeric_limits
<
float
>::
quiet_NaN
()
;
}
}
return
result
;
...
...
@@ -61,7 +62,7 @@ static Mat angularError( const Mat_<Point2f>& flow1, const Mat_<Point2f>& flow2
if
(
isFlowCorrect
(
u1
)
&&
isFlowCorrect
(
u2
)
)
result
.
at
<
float
>
(
i
,
j
)
=
acos
((
float
)(
u1
.
ddot
(
u2
)
/
norm
(
u1
)
*
norm
(
u2
)));
else
result
.
at
<
float
>
(
i
,
j
)
=
NAN
;
result
.
at
<
float
>
(
i
,
j
)
=
std
::
numeric_limits
<
float
>::
quiet_NaN
()
;
}
}
return
result
;
...
...
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