Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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.

click to hide/show revision 2
No.2 Revision

updated 2016-02-25 11:26:15 -0600

berak gravatar image

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.