Applies colour deconvolution to an H&E-stained image to separate the haematoxylin and eosin channels.
Usage
sg_stain_deconvolve(image, method = c("macenko", "ruifrok"), stains = NULL)Arguments
- image
An
sg_imageobject with at least 3 colour channels (RGB).- method
Character string specifying the deconvolution method. One of
"macenko"(default) or"ruifrok".- stains
Optional 3x3 numeric matrix whose columns are the stain vectors. If
NULL, stain vectors are estimated from the image using the specifiedmethod.