0

I have a 2D numpy array (image) which I visualise using plt.imshow().

What I want: a user to be able to click on a given pixel on this image (matrix/2D array) and the indices of this particular element to be saved as variables - for example i = 200 and j = 150.

The end goal is for the user to be able to crop a part of the image for further processing of this part of the array.

If anyone knows how to apply a region of interest (by dragging the mouse along the image/2D array), even better.

Cris Luengo
  • 55,762
  • 10
  • 62
  • 120
ISquared
  • 364
  • 4
  • 22

0 Answers0