Learn R Programming

imager (version 0.42.19)

highlight: Highlight pixel set on image

Description

Overlay an image plot with the contours of a pixel set. Note that this function doesn't do the image plotting, just the highlighting.

Usage

highlight(px, col = "red", ...)

Arguments

px

a pixel set

col

color of the contours

...

passed to the "lines" function

Author

Simon Barthelme

See Also

colorise, another way of highlighting stuff

Examples

Run this code
#Select similar pixels around point (180,200)
px <- px.flood(boats,180,200,sigma=.08)
plot(boats)
#Highlight selected set
highlight(px)
px.flood(boats,18,50,sigma=.08) %>% highlight(col="white",lwd=3)

Run the code above in your browser using DataLab