Understanding Active Contour results - Williams and Shah 1992 I have implemented a version of Williams and Shah's 1992 active contour algorithm, which uses the energy function:

Ej = alpha * Econtj + beta * Ecurvj + gamma * Eimagej

where j is a N8 neighbor of a contour point in question. If the energy Ej is minimized by a neighbor, then the contour point in question is replaced by that neighbor.

At this point, the results seem somewhat reasonable, but I am seeing an unexpected sharp edge across the beginning and end points. Following from the paper, I am processing the first point twice to ensure that the contour is closed. However, I have included two GIFs of output: the first one includes the double counting of the first point, and the second one does not. The first point seems to be shooting away from the object in both cases.



The first point is filled in, and the last point is surrounded by a larger circle.

Is there any obvious intuition into why this may be happening?

Thanks!
Annnd I figured it out. It seems that it was just coincidence that the first/last point sits at an especially concave point on the object. I changed the ordering of my initial contour so that the start/end point sits over a different section of the object and the first point no longer shoots out.