文章目录 1、cv2.imwrite和cv2.imencode 1、cv2.imwrite和cv2.imencode imagepath = 'D:/my.jpg' #保存图像失败 cv2.imwrite(imagepath, frame) #保存图像成功 cv2.imencode('.jpg', frame)[1].tofile(imagepath)