I'm having a quite big issue with fitellipse and opencv-python.
I know that I have to install opencv-contrib-python to get some functions but it doesn't work with fitellips function.
when using :
import cv2
cv2.fitEllipse()
here is the result:
TypeError: fitEllipse() missing required argument 'points' (pos 1)
but if now I try it using, for example, contour detection from an image:
img = cv2.imread('messi5.jpg',0)
retz,bawgray=cv2.threshold(img , 110,255,cv2.THRESH_BINARY)
contours,hierarchy = cv2.findContours(bawgray,1,1)
cnt = contours
big_contour = []
maxop = 0
for i in cnt:
areas = cv2.contourArea(i)
if areas > maxop:
maxop = areas
big_contour = i
img=cv2.drawContours(img, big_contour, -1, (0,255,0), 3)
cv2.FitEllipse(big_contour)
here is the result:
AttributeError: module 'cv2.cv2' has no attribute 'FitEllipse'
I use opencv-python 4.2.0.34 and opencv-contrib-python 4.2.0.34