thinkinfi.com

This article is mouse click event OpenCV tutorial, we will use python to get coordinates of mouse click on image. Then using those coordinates we will draw rectangle on image with mouse OpenCV. After that, we will crop that area of interest from that image. In this way, we will check the mouse click event of the image and use this mouse click event OpenCV.

To do that we need to follow below steps:

  1. Create blank matrix to store coordinates of mouse click on image
  2. Store coordinates of mouse click in matrix
  3. Draw circle on image with mouse click
  4. Draw rectangle on image with mouse click
  5. Crop region of interest

Full code with tutorial

https://thinkinfi.com/detect-mouse-click-events-with-python-opencv/

--

--

No responses yet