mirror of
https://github.com/opencv/opencv.git
synced 2024-11-25 03:30:34 +08:00
bug fix for a crash when input image is small
This commit is contained in:
parent
50c9367d7a
commit
b14f7c99d2
@ -471,6 +471,10 @@ bool FeatureEvaluator::setImage( InputArray _image, const std::vector<float>& _s
|
||||
bool recalcOptFeatures = updateScaleData(imgsz, _scales);
|
||||
|
||||
size_t i, nscales = scaleData->size();
|
||||
if (nscales == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
Size sz0 = scaleData->at(0).szi;
|
||||
sz0 = Size(std::max(rbuf.cols, (int)alignSize(sz0.width, 16)), std::max(rbuf.rows, sz0.height));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user