mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 07:13:02 +04:00
Merge branch 4.x
This commit is contained in:
@@ -1036,7 +1036,11 @@ void ORB_Impl::detectAndCompute( InputArray _image, InputArray _mask,
|
||||
bool useOCL = false;
|
||||
#endif
|
||||
|
||||
Mat image = _image.getMat(), mask = _mask.getMat();
|
||||
Mat image = _image.getMat(), mask;
|
||||
if (!_mask.empty())
|
||||
{
|
||||
threshold(_mask, mask, 0, 255, THRESH_BINARY);
|
||||
}
|
||||
if( image.type() != CV_8UC1 )
|
||||
cvtColor(_image, image, COLOR_BGR2GRAY);
|
||||
|
||||
@@ -1134,7 +1138,7 @@ void ORB_Impl::detectAndCompute( InputArray _image, InputArray _mask,
|
||||
}
|
||||
|
||||
copyMakeBorder(currImg, extImg, border, border, border, border,
|
||||
BORDER_REFLECT_101+BORDER_ISOLATED);
|
||||
BORDER_REFLECT_101 + BORDER_ISOLATED);
|
||||
if (!mask.empty())
|
||||
copyMakeBorder(currMask, extMask, border, border, border, border,
|
||||
BORDER_CONSTANT+BORDER_ISOLATED);
|
||||
|
||||
Reference in New Issue
Block a user