How to get mouse clicks to draw a rectangle on an image in opencv?
In opencv, I am displaying some image on the screen. I want to be able to click with the mouse and draw a rectangle around an object.
For example, let's say I have an image of a newspaper, and I want to draw a rectangle to connect the 4 corners of the front开发者_StackOverflow中文版-page image of that newspaper to replace it with a different image. How can this be done in opencv?
精彩评论