Show the pixel intensities of certain image channels
Usage
roi_check(img, ind = c(1, 2))
Arguments
- img
A
cimg
object or alist
of multiple images such as the one returned fromroi_select
- ind
A
numeric
object of length two. For the channel indexes. or alist
of similar vectors for each ofimg
items.
Details
Calling this function returns two plots. The first is a scatter plot of the pixel intensities from two channels. The second is the density distribution of the intensities from the two channels.
Examples
# load images
fl <- system.file('extdata', 'Image0001_.jpg', package = 'colocr')
img <- image_load(fl)
# choose ROI and show the pixel intensities
oldpar <- par()
par(mfrow = c(1, 2))
roi_select(img, threshold = 90) %>%
roi_check()
par(oldpar)
#> Warning: graphical parameter "cin" cannot be set
#> Warning: graphical parameter "cra" cannot be set
#> Warning: graphical parameter "csi" cannot be set
#> Warning: graphical parameter "cxy" cannot be set
#> Warning: graphical parameter "din" cannot be set
#> Warning: graphical parameter "page" cannot be set