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.