get_column_blobs: Find Connected Cells along Matrix Columns

View source: R/get_column_blobs.R

get_column_blobsR Documentation

Find Connected Cells along Matrix Columns

Description

Find Connected Cells along Matrix Columns

Usage

get_column_blobs(m, offset = 0L)

Arguments

m

a matrix of logical

offset

integer to be added to the numbers indicating connected cells

Value

matrix of integer having the same dimension as m. Cells being FALSE in m are 0 in the output. Cells being TRUE in m are a positive integer number in the output. Connected cells within same columns share the same number.

Examples

column_blobs <- findblobs:::get_column_blobs(
  matrix(ncol = 3, byrow = TRUE, c(
    FALSE, TRUE, FALSE,
    TRUE,  TRUE, FALSE,
    FALSE, FALSE, TRUE,
    TRUE,  TRUE,  TRUE,
    TRUE,  FALSE, TRUE
  ))
)

findblobs::plot_integer_matrix(column_blobs)


hsonne/findblobs documentation built on April 5, 2022, 6:33 p.m.