We present a new approach to the algorithmic study of planar curves, with applications to estimations of contours in images. We construct spaces of curves satisfying constraints suited to specific problems, exploit their geometric structure to quantify properties of contours, and solve optimization and inference problems. Applications include new algorithms for computing planar elasticae, with enhanced performance and speed, and geometric algorithms for the estimation of contours of partially occluded objects in images.