# OpenGL About Snakes and T-Snakes Implementation

This topic is 3990 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hello everyone! I'm beginning to develop my graduation project which is about identifying objects from a video, and as far as I know I can identify each object using image segmentation of each video's photograph, to be able to do that I'm using snakes and t-snakes (I'm just not sure yet, but probably the later). Everything is fine so far, but the thing is that I have pretty much enough theory to begin the implementation, but I have basically 0 experience managing images and video with any programming language (especially c++). Because of this, I'm looking some kind of guidance about what do I need to know to be able to implement the snakes algorithm. I have googled about a sample code of the snakes algorithm implementation and I haven't found one. I know the theory but I just don't know the practice, I know that OpenGL and DevIL let me manipulate images and video files, but am I missing something or am I just going the wrong way? Please realize that I'm not looking for the solution of my graduation project, I'm just asking for guidance about how may I begin to implement it. I'm saying this before anyone thinks otherwise :) Any help and/or comment will be really appreciated.

##### Share on other sites
You can define an energy function that you want to minimize. The energy function has two terms; internal energy and external energy. Internal energy is a measure of goodness of the curve itself, external energy is a measure of how well the curve fits to the image.

For example, internal energy could be:

Ei = (sum of distances between snake points) + (sum of angles between snake points)

This would look for a curve that is compact and smooth.

For external energy, you could use

Ex = sum of{ exp( -edgeiness of image under snake point) }

Which would try to put the snake points onto edge pixels.

Since it can be posed as a minimization problem, you could theoretically use just about ANY method for minimization. Here are some example implementations (journal articles):

"Dynamic Programming for Detecting, Tracking, and Matching Deformable Contours"

"A Regularized Contrast Statistic for Object Boundary Estimation -- Implementation and Statistical Evaluation"

"Automatic Initial Estimation of the Left Ventricular Myocordial Midwall in Emission Tomograms using Kohonen Maps"

1. 1
2. 2
Rutin
21
3. 3
A4L
15
4. 4
5. 5

• 13
• 26
• 10
• 11
• 44
• ### Forum Statistics

• Total Topics
633740
• Total Posts
3013621
×