imager (version 0.41.2)

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

See Also

colorise, another way of highlighting stuff

Examples

Run this code
# NOT RUN {
#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 DataCamp Workspace