I am getting Corrupt JPEG data: 1 extraneous bytes before marker 0xd3 error while using functions of opencv as mentioned in the code section. I am running this code using python3 in Raspberry Pi 3.
I found that manually updating the kernel resolve this issue in some cases and would like to know how to update it.
video = cv2.VideoCapture(0)
ret, frame=video.read()
if ret == True:
cv2.imwrite(str(time.time()) + '.jpg',frame)
Kindly guide about ways to remove this error.