- Ensure your image is displayed in the appropriate axes within your GUI.
- Use impoint to allow users to select and move points on the image.
- Use "addNewPositionCallback" to update the coordinates whenever a point is moved.
- Update the coordinates in your handles and use them to call your function.
- https://www.mathworks.com/help/images/ref/impoint.html
- https://www.mathworks.com/help/images/ref/imroi.addnewpositioncallback.html