代码调试小技巧以及填坑 error: (-2) could not find a writer for the specified extension in function imwrite_
问题:锁定问题所在的代码:右击空白处,点击Debug可以看到具体参数值,以及问题所在点。复制错误提示,不断搜索错误提示: error: (-2) could not find a writer for the specified extension in function imwrite_原因:出现这个错误的可能原因是,你要写入文件系统所使用的名字没有后缀jpg!原代码:cv2.imwrite(f
·
问题:

锁定问题所在的代码:

右击空白处,点击Debug

可以看到具体参数值,以及问题所在点。

复制错误提示,不断搜索
- 错误提示: error: (-2) could not find a writer for the specified extension in function imwrite_
- 原因:出现这个错误的可能原因是,你要写入文件系统所使用的名字没有后缀jpg!
- 原代码:cv2.imwrite(f'/home/pi/xg_openpose_fall_detect-master/human_pose', I)
- 改为: cv2.imwrite(f'/home/pi/xg_openpose_fall_detect-master/human_pose/{t}.jpg', I)
参考:http://blog.sina.com.cn/s/blog_765488390101b6z6.html
更多推荐




所有评论(0)