pixelAssignMatrix: Make pixel assignment matrix for recoloring

View source: R/pixelAssignMatrix.R

pixelAssignMatrixR Documentation

Make pixel assignment matrix for recoloring

Description

Internal function. Generates a sort of 'paint-by-numbers' matrix, where each cell is the index of the color in the color centers matrix to which that pixel is assigned. An index of 0 indicates a background pixel.

Usage

pixelAssignMatrix(bg_indexed, color_clusters)

Arguments

bg_indexed

An object returned by backgroundIndex().

color_clusters

An object returned by colorClusters().

Value

A matrix of pixel color assignments (pixel_assignments) and a corresponding dataframe of color centers (centers).


recolorize documentation built on April 4, 2025, 3:07 a.m.