title: ORB Demo code errors out with cv2.error: Unknown C++ exception from OpenCV code
body: <p>ORB Demo code at <a href="https://opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_feature2d/py_orb/py_orb.html" rel="nofollow noreferrer">https://opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_feature2d/py_orb/py_orb.html</a></p>
  <pre><code>import numpy as np
  import cv2
  from matplotlib import pyplot as plt
  
  img = cv2.imread('simple.jpg',0)
  
  # Initiate STAR detector
  orb = cv2.ORB()
  
  # find the keypoints with ORB
  kp = orb.detect(img,None)
  
  # compute the descriptors with ORB
  kp, des = orb.compute(img, kp)
  
  # draw only keypoints location,not size and orientation
  img2 = cv2.drawKeypoints(img,kp,color=(0,255,0), flags=0)
  plt.imshow(img2),plt.show()
  </code></pre>
  <p>at <code>kp = orb.detect(img,None)</code></p>
  <ul>
  <li>in Python3.6 errors out with <code>[WinError 10054] An existing connection was forcibly closed by the remote host</code></li>
  <li>in Python3.8 errors out with <code>cv2.error: Unknown C++ exception from OpenCV code</code></li>
  </ul>
  <p><strong>Note:</strong></p>
  <ul>
  <li>In Python 3.6, running in the terminal, or running in the debugger, simply exits the script with no error. Only when stopping at <code>kp = orb.detect(img,None)</code> in the debugger and running that line in the debugger does the error appear <code>[WinError 10054] An existing connection was forcibly closed by the remote host</code></li>
  <li>In Python 3.8, running in terminal or the debugger gives the error <code>cv2.error: Unknown C++ exception from OpenCV code</code></li>
  </ul>
  <p><strong>Environment:</strong> Windows 10, Python 3.6, VSCode</p>
  <p>Does anyone have a clue?</p>