0

I've install opencv-python but it still have this problem.

python version:3.7.7

opencv-python version:4.4.0.46

opencv-contrib-python version:4.4.0.46

and here's my code

import cv2 as cv


def GetPicture():
    cv.namedWindow('camera', 1)
    cap = cv.VideoCapture(0)
    ret, frame = cap.read()
    cv.imwrite('C:/person.jpg', frame)
    cap.release()

I've tried different version of opencv, this problem can't be solved.

icimence
  • 1
  • 1
  • Most likely some installation issue, see [here](https://stackoverflow.com/questions/57427233/module-cv2-cv2-has-no-attribute-ximgproc) for example. – HansHirse Dec 17 '20 at 08:55

1 Answers1

0

nameWindow doesn't exist. namedWindow does.

your code as you posted it could not have thrown that error.

Christoph Rackwitz
  • 11,317
  • 4
  • 27
  • 36