dist_point_to_segment

kgpy.img.mask.dist_point_to_segment(p, s0, s1)
Get the distance of a point to a segment.

p, s0, s1 are xy sequences

This algorithm from http://geomalgorithms.com/a02-_lines.html