Skip to content

Robust and highly performant ring detection algorithm for 3d particle tracking using 2d microscope imaging

License

Notifications You must be signed in to change notification settings

eldad-a/ridge-directed-ring-detector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ridge directed ring detector

Robust and highly performant ring detection algorithm for 3d particle tracking using 2d microscope imaging

The source for the ring detection algorithm described in Sci. Rep. 5, 13584; doi: 10.1038/srep13584 (2015).

Some usage examples can be found in the accompanying ipython-notebook code/demo.ipynb; a static view is available here;

A demo data and video are availabe at: Afik, Eldad (2021): ridge directed ring detector. figshare. Dataset. https://doi.org/10.6084/m9.figshare.5119804.v1

The video can be found here as well.

An easy way to get the required dependencies is using Anaconda, which is cross-platform, or any other Python distribution which includes Cython, Scipy and OpenCV.

Acknowledgements would be highly appreciated; for academic citation please use:

Afik, E. Robust and highly performant ring detection algorithm for 3d particle tracking using 2d microscope imaging. Sci. Rep. 5, 13584; doi: 10.1038/srep13584 (2015).

Related projects and publications:

Here's a quick description of the parameters. The explanations refer to the terms as introduced in Afik 2015 and its Supplementary Information.

sigma is the width of the Gaussian Kernel to smooth the image; a typical good value should be the width (measured in pixels) of the ridge you would like to detect (to clarify, this is not the radius of the ring but the thickness of the curve).

ksize is the size of the Sobel kernel to estimate the image spatial derivatives (the default should work in most cases)

curv_thresh this sets a threshold for preliminary search for ridges; pixels of least principal curvature (the smaller value of the two eigenvalues of the Hessian applied to the image) larger than curv_thresh would not be considered. This can be used to spare unnecessary calculations (speed-up) and avoid ridges which are too flat (reduce noise). Fig. 2b shows the output which is affected by sigma, ksize and curv_thresh.

Rmin smallest radius to consider in the search for circles (measured in pixels)

Rmax largest radius to consider in the search for circles (measured in pixels)

vote_thresh this sets a threshold for preliminary search for circle candidates in the parameter (Hough) space; see Fig. 2c. Elements with vote count smaller than vote_thresh would not be examined. This can be used to spare unnecessary calculations (speed-up).

circle_thresh this sets a threshold to filter detected circle candidates; ideally one would expect a circle to have 2 * pi * r votes per circle of radius r; given image quality and the optimisation of the parameters applied in earlier stages, one may like to be satisfied with a fraction of a circle. circle_thresh should be a value between 0 and 2*pi; note that the radius r should not be included; e.g. for 50% of the circumference one should set circle_thresh = pi (for pi = np.pi or roughly 3.14). Circle candidates with vote count smaller than circle_thresh would be discarded. See Figure 2d.

dr as part of sub-pixel evaluation, a best fit is being applied to the detected ridges. To include ridge pixels which are expected to belong to the candidate circle, an annulus mask of thickness dr (measured in pixels) is created, based on the circle parameters found in earlier stages in the algorithm. See the example in Fig. 2e.

eccentricity if eccentricity is non-zero, a fit to ellipse will be applied, instead of a circle; this is far from optimal.

About

Robust and highly performant ring detection algorithm for 3d particle tracking using 2d microscope imaging

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published