1 | initial version |
Using VideoCapture class you can open web image as we open video file. See the example below.
VideoCapture cap;
if(!cap.open("http://docs.opencv.org/trunk/_downloads/opencv-logo.png")){
cout<<"Cannot open image"<<endl;
return -1;
}
Mat src;
cap>>src;
imshow("src",src);
imwrite("image.jpg",src);
waitKey();
2 | No.2 Revision |
Using VideoCapture class you can open web image as we open video file. See the example below.
VideoCapture cap;
if(!cap.open("http://docs.opencv.org/trunk/_downloads/opencv-logo.png")){
cout<<"Cannot open image"<<endl;
return -1;
}
Mat src;
cap>>src;
imshow("src",src);
imwrite("image.jpg",src);
waitKey();