WHAT I'M TRYING TO DO?
I am trying to select the cordinates points on mouse click using
cv2.setMouseCallback() function and printing the cordinates of every mouse click. I have put on the condition that the cordinates will be printed only until the counter and counterm is less than equal to 5 for two different functons, namely
clickEventCTscanImage(event, x, y, flags, param) and
clickEventMRIscanImage(event, x, y, flags, param)respectively.
WHAT I WANT TO ACHIEVE? I want to achieve that when I have selected the 5 points in totall the specific image should get closed and the second image should get automatically open ups and asks to perform the same function. that means the CT Scan image after achieving 5 points should get closed automatically and MRI image should open up for selecting the points and on selecting the points it should also get closed and then further code should executed aftewr printing in a following way:
Output to achieve:
[![enter image description here](https://i.stack.