generate_overlay: Generate an overlaid image of a mask and a base image

Description Usage Arguments Examples

View source: R/utils.R

Description

Generate an overlaid image of a mask and a base image

Usage

1
2
3
4
5
6
generate_overlay(
  img,
  mask,
  opac = c(1, 0.2),
  cols = c("#FDE725FF", "#440154FF")
)

Arguments

img

image

mask

mask

opac

numeric vector o length 2 with the opacity of the overlaid colours

cols

color of the outline and fill that will be used

Examples

1
2
3
4
5
x = readImage(system.file('images', 'shapes.png', package='EBImage'))
sobel <- sobel_filter(x)
overlay <- generate_overlay(x, sobel < 0.5)
display(overlay, "raster")
display(generate_overlay(x, EBImage::fillHull(sobel > 0.5)), "raster")

jspaezp/clasifierrr documentation built on March 2, 2020, 11:20 a.m.