changePixelColor {biopixR} | R Documentation |
Change the color of pixels
Description
Can be used to change the color of specified pixels in an image. The coordinates of the pixels are needed to colorize them.
Usage
changePixelColor(img, coords, color = "purple", visualize = FALSE)
Arguments
img |
image (import by |
coords |
coordinates specifying which pixels to be colored (should be a X|Y Data frame (first column: X; second column: Y)). |
color |
color with which to replace specified pixels. can be either a
an RGB triplet or one of the colors listed by |
visualize |
if TRUE the resulting image gets plotted |
Value
cimg with changed colors at desired positions and plot of the cimg
References
https://CRAN.R-project.org/package=countcolors
Examples
coordinates <- objectDetection(beads)
changePixelColor(beads, coordinates$coordinates)
[Package biopixR version 0.2.4 Index]