0
import cv2
import numpy as np
    
src = cv2.imread("cup.webp")
dst = src.copy()
    
gray = cv2.cvtColor(src, cv2.COLOR_RGB2GRAY)
corners = cv2.goodFeaturesToTrack(gray, 100, 0.01, 5, blockSize=3, useHarrisDetector=True, k=0.03)
    
for i in corners:
    cv2.circle(dst, tuple(i[0]), 3, (0, 0, 255), 2)
    
cv2.imshow("dst", dst)
cv2.waitKey(0)
cv2.destroyAllWindows()

I find the "Can't parse 'center'. Sequence item with index 0 has a wrong type error" when I run the code.

here is the image:

https://076923.github.io/assets/posts/Python/OpenCV/lecture-23/1.webp
Joshua Chung
  • 113
  • 9

0 Answers0