title: R/ImageJ: Measuring shortest distance between points and curves
body: <p>I have some experience with R as a statistics platform, but am inexperienced in image based maths. I have a series of photographs (tiff format, px/µm is known) with holes and irregular curves. I'd like to measure the shortest distance between a hole and the closest curve for that particular hole. I'd like to do this for each hole in a photograph. The holes are not regular either, so maybe I'd need to tell the program what are holes and what are curves (ImageJ has a point and segmented line functions).</p>
  
  <p>Any ideas how to do this? Which package should I use in R? Would you recommend another program for this kind of task? </p>
  
  <p><img src="https://i.stack.imgur.com/RRw3m.jpg" alt="Example image"></p>