cntrd: Calculates Centroids

Description Usage Arguments Value Author(s) References Examples

View source: R/all_functions_v8.R

Description

Calculates the centroid of bright spots to sub-pixel accuracy. Inspired by Grier & Crocker's feature for IDL, but greatly simplified and optimized for MATLAB, and then further ported to R. CREATED: Eric R. Dufresne, Yale University, Feb 4 2005.

Usage

1
cntrd(im, mx, sz, interactive = NULL)

Arguments

im

numeric matrix corresponding to the image to process

mx

location of local maxima to pixel-levels accuracy

sz

diameter of the window over which to average to calculate the centroid. should be big enough.

interactive

numeric; if set to 1 (or any positive number), an image showing the computed centroids will be visualized

Value

a data.frame with 4 columns, containing, x, y, brightness, and the square of the radius of gyration for each cell.

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
7
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)
cnt <- cellmigRation:::cntrd(im = b, mx = pk, sz = 5)
cnt

ocbe-uio/CellMigRation documentation built on Dec. 26, 2021, 10:19 p.m.