A contour was previously explored with the convexity defects algorithm
implemented in opencv. Some highly curved domains failed to be detected
because of the contour shape.
Using polygonal approximation imlemented in skimage 0.8 dev, positively curved domains as well as negatively curved domains on a contour can be sorted:
Curved domains missed by convexity defects detection |
Using polygonal approximation imlemented in skimage 0.8 dev, positively curved domains as well as negatively curved domains on a contour can be sorted:
Contour of a chromosomes cluster (blue), polygonal approximation (yellow). Red points: positive curvature. Yellow points: negative curvature. |
From a segmented particle, a polygonal approximation of the contour is extracted.
Points of the polygon are used to compute an angle between two consecutive vectors (Here using the complex affix of vectors):
Positive angles correspond to convex domains and negative angles to concave domains.
The code can be modified as follow to filter angles corresponding to curved domains:
- positive = table[(135>table[:,2]) & (table[:,2]>45)]
- negative = table[(-45>table[:,2]) & (table[:,2]>-135)]
Curved domains on polygonal approximation of a chromosomes cluster contour. |
Download code
No comments:
Post a Comment