Learn R Programming

biopixR (version 1.1.0)

shapeFeatures: Extraction of Shape Features

Description

This function analyzes the objects detected in an image and calculates distinct shape characteristics for each object, such as circularity, eccentricity, radius, and perimeter. The resulting shape attributes can then be grouped using a Self-Organizing Map (SOM) from the 'Kohonen' package.

Usage

shapeFeatures(
  img,
  alpha = 1,
  sigma = 2,
  xdim = 2,
  ydim = 1,
  SOM = FALSE,
  visualize = FALSE
)

Value

data.frame containing detailed information about every single object.

Arguments

img

image (import by load.image)

alpha

threshold adjustment factor (numeric / 'static' / 'interactive' / 'gaussian') (from objectDetection)

sigma

smoothing (numeric / 'static' / 'interactive' / 'gaussian') (from objectDetection)

xdim

x-dimension for the SOM-grid (grid = hexagonal)

ydim

y-dimension for the SOM-grid (xdim * ydim = number of neurons)

SOM

if TRUE runs SOM algorithm on extracted shape features, grouping the detected objects

visualize

visualizes the groups computed by SOM

See Also

objectDetection(), resultAnalytics(), som

Examples

Run this code
shapeFeatures(
  beads,
  alpha = 1,
  sigma = 0,
  SOM = TRUE,
  visualize = TRUE
)

Run the code above in your browser using DataLab