I have this code which allows you to upload an image onto the canvas and mark out segments on the canvas. When the canvas is double clicked, the coordinates of the segments