I get this error after adding the part for saving the images, any idea how to get this error fixed ? This answer it doesn't help and it is in c++
for co in range(1, 5):
fsize = cv2.resize(roi_gray, (100, 100))
...........................................................................
errorTraceback (most recent call last)
<ipython-input-1-86e0bb6aa30e> in <module>()
62
63 if __name__ == "__main__":
---> 64 create()
<ipython-input-1-86e0bb6aa30e> in create()
21 ret, frame = camera.read()
22
---> 23 gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
24
25 faces = faceCascade.detectMultiScale(
error: C:\build\2_4_winpack-bindings-win64-vc14-static\opencv\modules\imgproc\src\color.cpp:3739: error: (-215) scn == 3 || scn == 4 in function cv::cvtColor