Error could not find a writer....
import cv2
# 0 is refrencing first camera
camera = cv2.VideoCapture(0)
# range is repeating the indented code by whatever is in ()
for i in range(2):
return_value, img = camera.read()
cv2.imshow('opencv'+str(i)+'png',img)
cv2.imwrite('opencv'+str(i)+'png',img)
cv2.waitKey()
del camera
It keeps telling me " error: (-2) could not find a writer for the specified extension in function cv:: imwrite_"
Any ideas why?