roi_show: Show the selected regions of interest

Description Usage Arguments Details Examples

View source: R/methods.R

Description

Show/highlight the selected regions of interest on different image channels

Usage

1
roi_show(img, ind = c(1, 2))

Arguments

img

A cimg object or a list of multiple images such as the one returned from roi_select

ind

A numeric object of length two. For the channel indexes. or a list of similar vectors for each of img items.

Details

calling this function with img object which is returned from roi_select returns four different plots. The original image, a low resolution representation of the selected regions of interest and the two channels indicated through ind highlighted.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# load images
fl <- system.file('extdata', 'Image0001_.jpg', package = 'colocr')
img <- image_load(fl)

# choose and show ROI
oldpar <- par()
par(mfrow=c(2,2))

roi_select(img, threshold = 90) %>%
  roi_show()

par(oldpar)

colocr documentation built on July 1, 2020, 10:32 p.m.