mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 07:43:03 +04:00
fixed segfault at ORB::compute() near image's border
This commit is contained in:
committed by
Alexander Alekhin
parent
22df206e1f
commit
8444c23803
@@ -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 )
|
||||
|
||||
Reference in New Issue
Block a user