Identifies the background color based on the results of identifyPixelContent() by averaging the color values of all pixels identified as background.

identifyBackgroundColor(object, ...)

# S4 method for class 'SPATA2'
identifyBackgroundColor(
  object,
  img_name = activeImage(object),
  verbose = NULL,
  ...
)

# S4 method for class 'SpatialData'
identifyBackgroundColor(
  object,
  img_name = activeImage(object),
  verbose = TRUE,
  ...
)

# S4 method for class 'HistoImage'
identifyBackgroundColor(object, verbose = TRUE, ...)

Arguments

object

An object of class SPATA2 or, in case of S4 generics, objects of classes for which a method has been defined.

...

Used to absorb deprecated arguments or functions.

img_name

Character value. The name of the image of interest. If NULL, the active image is chosen by default. Either way, must be one of getImageNames().

verbose

Logical. If TRUE, informative messages regarding the computational progress will be printed.

(Warning messages will always be printed.)