title: TypeError: Incorrect type of self (must be 'DescriptorMatcher' or its derivative) with ORB_create()
body: <p>I would like to compute the homography matrix using cv2. For that, I was using <code>ORB_create()</code> first and followed the discussion in <a href="https://stackoverflow.com/questions/47496287/how-would-i-use-orb-detector-with-image-homography">How would I use Orb detector with image homography?</a>.</p>
  <p>However, while doing  <code>matches = bf.match(descs1, descs2)</code>, I am getting an error</p>
  <pre><code>File &quot;/var/folders/_s/sk0g6rrx3_v_fl0y8zybdb8c0000gn/T/ipykernel_32180/2073887229.py&quot;, line 2, in &lt;module&gt;
      matches = bf.match(descs1, descs2)
  
  TypeError: Incorrect type of self (must be 'DescriptorMatcher' or its derivative)
  </code></pre>
  <p>What causes this issue and how can I resolve it?</p>
  <p><strong>EDIT</strong></p>
  <p>Here is the part that worked for me:</p>
  <pre><code>MIN_MATCH_COUNT = 20
  kpts1, descs1 = orb.detectAndCompute(img1,None)
  kpts2, descs2 = orb.detectAndCompute(img2,None)
  
  ## match descriptors and sort them in the order of their distance
  bf = cv2.BFMatcher(cv2.NORM_HAMMING, crossCheck=True)
  matches = bf.match(descs1, descs2)
  </code></pre>
  <p><strong>img1</strong> and <strong>img2</strong> are grayscale images and type of numpy array of shape 128x128. After <code>bf.match</code> I am getting the error above.</p>