projects
/
platform
/
upstream
/
opencv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
72728b4
)
- fix possible crash introduced by cvRound
author
Vincent Rabaud
<no@email>
Mon, 23 May 2011 20:03:16 +0000
(20:03 +0000)
committer
Vincent Rabaud
<no@email>
Mon, 23 May 2011 20:03:16 +0000
(20:03 +0000)
modules/features2d/src/orb.cpp
patch
|
blob
|
history
diff --git
a/modules/features2d/src/orb.cpp
b/modules/features2d/src/orb.cpp
index
a25ae7d
..
8cf752c
100644
(file)
--- a/
modules/features2d/src/orb.cpp
+++ b/
modules/features2d/src/orb.cpp
@@
-388,7
+388,8
@@
public:
private:
static inline int angle2Wedge(float angle)
{
- return cvRound((angle / 360) * kNumAngles);
+ static float scale = float(kNumAngles) / 360.0f;
+ return std::min(int(std::floor(angle * scale)), kNumAngles - 1);
}
void generateRelativePattern(int angle_idx, int /*sz*/, cv::Mat & relative_pattern)