pkfnd: Find Signal Peaks

Description Usage Arguments Value Author(s) References Examples

View source: R/all_functions_v8.R

Description

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.

Usage

1
pkfnd(im, th, sz = NULL)

Arguments

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

Value

a numeric data.frame with two columns, with the coordinates of local maxima

Author(s)

Damiano Fantini, damiano.fantini@gmail.com

References

https://www.data-pulse.com/dev_site/cellmigration/ https://www.mathworks.com/matlabcentral/fileexchange/60349-fasttracks

Examples

1
2
3
4
5
6
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

ocbe-uio/cellmigRation documentation built on Dec. 16, 2021, 10:59 p.m.