opencv读取网络图片

#include <iostream>
#include <opencv2/opencv.hpp>

using namespace std;
using namespace cv;

int main()
{
    VideoCapture videoCapture("https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fjunshi-pic.china.com%2Fhandcover%2F202101%2F27%2F1611710230_78708400.jpg&refer=http%3A%2F%2Fjunshi-pic.china.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1614339658&t=ee65a9a5a9d07469ebfa8d70f87b244b");
    Mat img1;
    videoCapture.read(img1);

    if (img1.empty())
    {
        return -1;
    }
    imshow("win1", img1);

    waitKey(0);
    return 0;
}

opencv读取网络图片

 

相关文章:

  • 2021-12-01
  • 2021-12-27
  • 2021-12-12
  • 2021-12-23
  • 2022-12-23
  • 2021-09-08
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-06
  • 2021-10-02
  • 2022-12-23
  • 2021-11-24
  • 2022-12-23
  • 2022-12-23
  • 2021-11-10
相关资源
相似解决方案