Opening an url in opencv 3.0 with VS 12 C++
I want to put a mouse click event when I click on the picture a pop up a window and open an internet URL (not an image from the net and not for IP camera). My code for the mouseclick event for left button is as shown.
if ( event == EVENT_LBUTTONDOWN )
{ import urllib;
cout << "Left button of the mouse is clicked - position (" << x << ", " << y << ")" << endl;
//Create a window
namedWindow("My Browser", 1);
stream=urllib.urlopen('http://google.com')
imshow("My Browser", stream);
}
I thought of using the urlopen function but I am not sure if it is only for opening images from an url. I would like to ask, can i use this method? I hope someone can help me. Thank you.
dear, urllib is a python library, you can't use that from c++ ;(
(also, imshow() does not render webpages)
@berak oh my, i didnt know.. thank you for telling me. Is there a possible way to do it in C++ of VS 12?? =(
the short answer is: NO.
the long answer is: ofc. there are libraries like libcurl to retrieve internet content from c++, but please, how is this related to opencv (which is a computer-vision library) ?
i somehow think, you're on the wrong path alltogether.
what are you trying to achieve ?
@berak as i would later consolidate this mouse click with eye tracking program which controls the cursor and with a click on an image, i would need to link it to the internet by going to a url.
@berak I added opencv so reduce the delay to the program
lol, i see. good luck ;)