pkfnd {cellmigRation} | R Documentation |
Finds local maxima in an image to pixel level accuracy. This provides a rough guess of particle centers to be used by cntrd(). Inspired by the lmx subroutine of Grier and Crocker's. CREATED: Eric R. Dufresne, Yale University, Feb 4 2005.
pkfnd(im, th, sz = NULL)
im |
image to process, particle should be bright spots on dark background with little noise ofen an bandpass filtered brightfield image |
th |
the minimum brightness of a pixel that might be local maxima. NOTE: Make it big and the code runs faster but you might miss some particles. Make it small and you'll get everything and it'll be slow. |
sz |
if your data is noisy, (e.g. a single particle has multiple local maxima), then set this optional keyword to a value slightly larger than the diameter of your blob. If multiple peaks are found withing a radius of sz/2 then the code will keep only the brightest. Also gets rid of all peaks within sz of boundary |
a numeric data.frame with two columns, with the coordinates of local maxima
Damiano Fantini, damiano.fantini@gmail.com
https://www.data-pulse.com/dev_site/cellmigration/ https://www.mathworks.com/matlabcentral/fileexchange/60349-fasttracks
x0 <- getCellImages(get(data(TrackCellsDataset))) x0 <- x0$images[[1]][seq(80,150,by=1), seq(80,150,by=1)] b <- cellmigRation:::bpass(image_array = x0, lnoise = 2, lobject = 15, threshold = 1) pk <- cellmigRation:::pkfnd(b, th = 2, sz = 5) pk