问题:

锁定问题所在的代码:

右击空白处,点击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

Logo

一站式 AI 云服务平台

更多推荐