cells
#
Segmentation of cells in thresholded image
- find(image: ndarray, x: int, y: int, r: int, r_reltol: float = 0.004, area_min: int = 6, area_max: int = 1000) DataFrame [source]#
Performs the cell segmentation by finding connected components.
The center
(x, y)
and radiusr
of the circle must be given.r_reltol
denotes the relative tolerance for considering cells as outside the circle, even though strictly speaking they are still within the radius. Detected cells must have an area in pixels betweenarea_min
andarea_max
.
- draw(canvas: ndarray, cells: DataFrame) ndarray [source]#
Draws the bounding boxes of given
cells
onto the imagecanvas
.This is meant as an illustration rather than doing anything computational with it.