[opencv] 87/89: fixed segfault at ORB::compute() near image's border
Nobuhiro Iwamatsu
iwamatsu at moszumanska.debian.org
Sat May 13 09:57:28 UTC 2017
This is an automated email from the git hooks/post-receive script.
iwamatsu pushed a commit to annotated tag 2.4.13.2
in repository opencv.
commit 8444c2380371c8f27cf906ab419aeb12667bac30
Author: Rostislav Vasilikhin <rostislav.vasilikhin at intel.com>
Date: Wed Dec 14 12:55:00 2016 +0300
fixed segfault at ORB::compute() near image's border
---
modules/features2d/src/orb.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/modules/features2d/src/orb.cpp b/modules/features2d/src/orb.cpp
index b69354b..cfee52c 100644
--- a/modules/features2d/src/orb.cpp
+++ b/modules/features2d/src/orb.cpp
@@ -736,7 +736,9 @@ void ORB::operator()( InputArray _image, InputArray _mask, vector<KeyPoint>& _ke
//ROI handling
const int HARRIS_BLOCK_SIZE = 9;
int halfPatchSize = patchSize / 2;
- int border = std::max(edgeThreshold, std::max(halfPatchSize, HARRIS_BLOCK_SIZE/2))+1;
+ // sqrt(2.0) is for handling patch rotation
+ int descPatchSize = cvCeil(halfPatchSize*sqrt(2.0));
+ int border = std::max(edgeThreshold, std::max(descPatchSize, HARRIS_BLOCK_SIZE/2))+1;
Mat image = _image.getMat(), mask = _mask.getMat();
if( image.type() != CV_8UC1 )
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/opencv.git
More information about the debian-science-commits
mailing list