powered by
Add circle or circles to an image. Like other native CImg drawing functions, this is meant to be basic but fast. Use implot for flexible drawing.
draw_circle(im, x, y, radius, color = "white", opacity = 1, filled = TRUE)
an image
x coordinates
y coordinates
radius (either a single value or a vector of length equal to length(x))
either a string ("red"), a character vector of length equal to x, or a matrix of dimension length(x) times spectrum(im)
scalar or vector of length equal to length(x). 0: transparent 1: opaque.
fill circle (default TRUE)
implot
# NOT RUN { draw_circle(boats,c(50,100),c(150,200),30,"darkgreen") %>% plot draw_circle(boats,125,60,radius=30,col=c(0,1,0),opacity=.2,filled=TRUE) %>% plot # }
Run the code above in your browser using DataLab