count_neighbors: This function counts the number of neighboring/touching...

View source: R/RcppExports.R

count_neighborsR Documentation

This function counts the number of neighboring/touching pixels in a 2D binary image

Description

This function counts the number of neighboring/touching pixels in a 2D binary image

Arguments

im

A boolean matrix representing a binary image

diagonal

Whether to count diagonal elements as valid neighbors

Details

This is an internal function used by geom_outline to clean up outlines

Value

A matrix of the same size as im containing the number of neighboring pixels

Author(s)

Michael Hallquist


ggbrain documentation built on April 4, 2025, 5:03 a.m.