ICode9

精准搜索请尝试: 精确搜索
  • 使用cv2读取网络图片2022-08-08 00:31:52

    在使用cv2加载图片时,发现使用imread方法加载本地图片没有问题,但加载网络图片就无法读取None,显示为None,因此读取不到服务器上存储的图片, 解决方法: 先使用PIL读取网络图片,再将PIL.Image转换成OpenCV格式 response = requests.get(img_path) #图片地址 response = response.content

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有