1. A computer implemented method for computer vision, the method comprising: rendering a polygon contour superimposed over a first frame of image data; and iteratively refining the polygon contour to more accurately trace an object within the first frame after each iteration, wherein the refining includes: computing image energies along lengths of contour lines of the polygon contour; adjusting positions of the contour lines based at least in part on the image energies; determining a maximal breaking stress asserted on a given contour line; determining whether the maximal breaking stress exceeds a breaking threshold; and if the maximal breaking stress exceed the breaking threshold, then breaking the given contour line into two contour lines.