Made small change which fixes the situation, when ORB does not find any descriptors...
authorLeonid Beynenson <no@email>
Fri, 23 Mar 2012 12:06:49 +0000 (12:06 +0000)
committerLeonid Beynenson <no@email>
Fri, 23 Mar 2012 12:06:49 +0000 (12:06 +0000)
modules/features2d/src/orb.cpp

index 4255cce..d6c59de 100644 (file)
@@ -932,7 +932,12 @@ void ORB::operator()( InputArray _image, InputArray _mask, vector<KeyPoint>& _ke
         // Compute the descriptors
         if (do_descriptors)
         {
-            Mat desc = descriptors.rowRange(offset, offset + nkeypoints);
+            Mat desc;
+            if (!descriptors.empty()) 
+            {
+                desc = descriptors.rowRange(offset, offset + nkeypoints);
+            } 
+
             offset += nkeypoints;
             // preprocess the resized image
             Mat& workingMat = imagePyramid[level];