proximityFilter {biopixR}R Documentation

Proximity-based exclusion

Description

In order to identify objects within a specified proximity, it is essential to calculate their respective centers, which serve to determine their proximity. Pairs that are in close proximity will be discarded. (Input can be obtained by objectDetection function)

Usage

proximityFilter(centers, coordinates, radius = "auto", elongation = 2)

Arguments

centers

center coordinates of objects (mx|my|value data frame)

coordinates

all coordinates of the objects (x|y|value data frame)

radius

distance from one center in which no other centers are allowed (in pixels) (numeric / 'auto')

elongation

factor by which the radius should be multiplied to create the area of exclusion (default 2)

Details

The automated radius calculation in the proximityFilter function is based on the presumption of circular-shaped objects. The radius is calculated using the following formula:

\sqrt{\frac{A}{\pi}}

where A is the area of the detected objects. The function will exclude objects that are too close by extending the calculated radius by one radius length beyond the assumed circle, effectively doubling the radius to create an exclusion zone. Therefore the elongation factor is set to 2 by default, with one radius covering the object and an additional radius creating the area of exclusion.

Value

list of 2 objects:

Examples

res_objectDetection <- objectDetection(beads,
                                       alpha = 1,
                                       sigma = 0)
res_proximityFilter <- proximityFilter(
  res_objectDetection$centers,
  res_objectDetection$coordinates,
  radius = "auto"
  )
changePixelColor(
  beads,
  res_proximityFilter$coordinates,
  color = "darkgreen",
  visualize = TRUE
  )

[Package biopixR version 1.1.0 Index]