count_neighbors | R Documentation |
This function counts the number of neighboring/touching pixels in a 2D binary image
im |
A boolean matrix representing a binary image |
diagonal |
Whether to count diagonal elements as valid neighbors |
This is an internal function used by geom_outline to clean up outlines
A matrix of the same size as im
containing the number of neighboring pixels
Michael Hallquist
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.