System information (version)
- OpenCV => 3.4.1
- Operating System / Platform => Windows 64 Bit
- Compiler => Visual Studio 2017
Detailed description
ORB feature generate wrong image pyramid if set firstLevel > 0. For example firstLevel = 2, create imagePyramid as following image 72 *72. The upscaled image overlaps others.

If firstLevel >= 3, it crashes around line 1051 Mat extImg = imagePyramid(wholeLinfo), extMask;
It seems there is still some issue in code that calculates image pyramid's height.
Steps to reproduce
Mat img = imread("119_10_1_15_31_7086.png");
Ptr<ORB> orbPtr = ORB::create();
orbPtr->setNLevels(5);
orbPtr->setFirstLevel(2);
// orbPtr->setFirstLevel(3); exception
orbPtr->setScaleFactor(1.8);
orbPtr->setPatchSize(8);
orbPtr->setEdgeThreshold(8);
std::vector<KeyPoint> kps;
Mat fv;
orbPtr->detectAndCompute(img, noArray(), kps, fv);
