SIFT::operator() crash for matrices with 1 row or column (Bug #2460)
Description
There's an edge case whereby if an image is passed in with just 1 row or column then the computation of:// line 699 of SIFT.cpp in the 2.4.2 release
int nOctaves = cvRound(log( (double)std::min( base.cols, base.rows ) ) / log(2.) - 2); // nOctaves = -2
causes a nasty crash here:// line 199 of SIFT.cpp in the 2.4.2 release
pyr.resize(nOctaves*(nOctaveLayers + 3));
as std::vector::resize is called with a value of -2.
Associated revisions
Merge pull request #2460 from berak:b_3598_24
History
Updated by Maksim Shabunin over 9 years ago
Issue has been transferred to GitHub: https://github.com/Itseez/opencv/issues/4439