findCenter: Find the Center of a Binary Mask

View source: R/template_matching.R

findCenterR Documentation

Find the Center of a Binary Mask

Description

The center of a binary mask is determined.

Usage

findCenter(M)

Arguments

M

is a binary mask (multidimensional array of logical values).

Details

This method most likely only works with convex three-dimensional shapes (e.g., a hyper-rectangle). Further testing is required to know the limits of the current implementation.

Value

A vector of values the same length as the input array.

Author(s)

Brandon Whitcher bwhitcher@gmail.com

See Also

fastTemplateMatching

Examples


M <- array(FALSE, rep(10,3))
M[6:10,6:10,6:10] <- TRUE
Mc <- findCenter(M)
print(Mc)


bjw34032/dcemriS4 documentation built on June 2, 2022, 3:51 p.m.