makeOverlay.grid {imageUtilities} | R Documentation |
overlays a single-channel binary image onto another.
makeOverlay.grid(img, ovl, transparency = 0.5, max = imageUtilities.option("max"), col = c(255, 0, 0))
img |
the input image |
ovl |
the overlay image. It will be coerced to binary. Where it is 1 or TRUE, the overlay will be shown on the input image. |
transparency |
the transparency of the overlay, from 0 to 1. 0 corresponds to an opaque overlay, and 1 corresponds to a transparent overlay. |
col |
The colour to draw the overlay in. Either a
string of a colour recognised by R, or a numeric vector
|
max |
the maximum intensity of the images (ie 0 to 1 or 0 to 255) |
an image with the overlay on top of it in the specified transparency and colour.
This essentially performs the calcuation:
outI = transparency * colour * overlay + (1-transparency) * image
Other overlay: makeOverlay
,
showOverlay