is there a method to get a picture from web ?
is there have a OpenCV API to get picture from web?the URL is http://192.168.1.200:8080/action=snapshot
is there have a OpenCV API to get picture from web?the URL is http://192.168.1.200:8080/action=snapshot
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();
Asked: 2013-12-23 21:26:33 -0600
Seen: 313 times
Last updated: Dec 26 '13
Saving an image with unset pixels
How to calculate distance between camera and image?
Question about polar or radial angle calculation in the image coordinate system
Access multiple channels in Mat
How can I work with pixels of an image directly?
fingerprint orientation map through gradient method - opencv c++
Why do you want to load image with OpenCV? You can try this: http://stackoverflow.com/questions/2471935/how-to-load-an-imageview-by-url-in-android and then you can convert the bitmap to matrix by doing this: Utils.bitmapToMat(bitmap, matrix);