We are glad to release the AGSM toolkit version 2.3. 
New features in this version: 
  1. Robustness of closed contour fitting is dramatically improved by smart initialization (see InitialCircle.cpp). 
  2. Line fitting is compared to Hough transform and RANSAC least squares. 
  3. Circle fitting is compared to circle Hough transform. 
  4. We added the AGSM Canvas app, which is an interactive software. 
  5. We made the AGSM Canvas app more robust by smart initialization and image padding. 
  6. We added the line fitting and circle fitting packages. 
  7. We re-implemented GVF in C++/MEX to make it much faster. 
  8. We implemented Bresenham algorithm in C++/MEX to generate points on a line. 
  9. All force/torque computations are re-implemented in C++/MEX, which significantly improves efficiency. 
Please see the Download tab for this new version.

The library is now also available on GitHub: https://github.com/wq2012/AGSM


Our active geometric shape model (AGSM) is a novel approach for fitting a geometric shape in images. Similar to active shape models and active contours, a force field is used in our approach. But the object to be detected is described with a geometric shape, represented by parametric equations. Our model associates each parameter of this geometric shape with a combination of integrals (summations in the discrete case) of the force field along the contour. By iteratively updating the shape parameters according to these integrals, we are able to find the optimal fit of the shape in the image. This technique is used to detect the cross-sections of subarachnoid spaces containing cerebrospinal fluid (CSF) in phase-contrast magnetic resonance (PC-MR) images, where the object of interest can be described by a distorted ellipse. The detection results can be further used by an s-t graph cut to generate a segmentation of the CSF structure. Given a properly configured geometric shape model and force field, this approach is robust to noise and defects (disconnections and non-uniform contrast) in the image. By using a geometric shape model, this approach does not rely on large training datasets, and requires no manual labeling of the training images as is needed when using point distribution models. 


This work is published on CVIU: 
Quan Wang, Kim L. Boyer, The active geometric shape model: A new robust deformable shape model and its applications, Computer Vision and Image Understanding, Volume 116, Issue 12, December 2012, Pages 1178-1194, ISSN 1077-3142, 10.1016/j.cviu.2012.08.004.
Short URL: http://tinyurl.com/agsmpaper

Media Coverage

Our work is reported by HighBeam Research. Here is the link of the article

The work is also reported on Issues in Computer Engineering: 2013 Edition 


The key idea of AGSM is to iteratively adjust the parameters of a geometric shape according to forces or torques defined by integrals of a force field, such as Gradient Vector Flow (GVF), such that the resulting shape approximately minimizes a fitness function. If the original image is blurred using a Gaussian kernel before fitting the shape, correction of curvature is needed. One example is our ellipse fitting algorithm, described below: 


Results on Synthetic Data


Difficult Cases

Even if the image is very noisy, as long as the noise is not the dominating part, the algorithm will not fail. 

Failure Cases

The biggest limitation of AGSM is that when the background is complicated (e.g. noise is dominating), the algorithm will fail. 

Results on Images

Distorted ellipse fitting results: 

s-t graph cuts segmentation results: 

AGSM Canvas

AGSM Canvas is an interactive software for the users to play with the algorithm. 



title = "The active geometric shape model: A new robust deformable shape model and its applications",
journal = "Computer Vision and Image Understanding",
volume = "116",
number = "12",
pages = "1178 - 1194",
year = "2012",
note = "",
issn = "1077-3142",
doi = "10.1016/j.cviu.2012.08.004",
url = "http://www.sciencedirect.com/science/article/pii/S1077314212001154",
author = "Quan Wang and Kim L. Boyer",
keywords = "Active geometric shape model",
keywords = "Parametric equation",
keywords = "Cubic spline contour",
keywords = "Graph cuts segmentation"