
Add colour channels to a grayscale image or pixel set
add.colour(im, simple = TRUE)add.color(im, simple = TRUE)
a grayscale image
if TRUE just stack three copies of the grayscale image, if FALSE treat the image as the L channel in an HSL representation. Default TRUE. For pixel sets this option makes no sense and is ignored.
an image of class cimg
add.color
: Alias for add.colour
# NOT RUN {
grayscale(boats) #No more colour channels
add.colour(grayscale(boats)) #Image has depth = 3 (but contains only grays)
# }
Run the code above in your browser using DataLab