Active contours to track spinal deformations during sleep