Questions tagged [imager]
5 questions
1
vote
1 answer
plot.cimg of 4d RGB array only plotting in grayscale. How do I get it to plot in color?
I am attempting to plot an image that I created by combining two images using imager in R. I have the matrix as a cimg object with 3 color channels, and a depth channel, but it will only plot in greyscale for some reason even though it is supposed…

Garrison Bullard
- 11
- 2
1
vote
0 answers
Crop and deskew an image in R with imager and magick package
How to
crop/clip an image with a polygon as the boundary and then
deskew the output using imager and magick package in R?
library(imager)
library(sp)
plot(boats)
xy <- list(x = c(87.4790282019041, 58.2397610921502, 164.877088198312,
…

Crops
- 5,024
- 5
- 38
- 65
0
votes
1 answer
How to apply a binary mask to a RGB image in R with imager
I have loaded in a RGB image with the imager::load.image() function.
I have also created a binary mask with the imager::threshold() function.
RGB_image Mask
I am able to apply this mask to binary images by doing this:
red_channel <-…

Rens
- 1
- 2
0
votes
0 answers
How can I install packages like imager?
I've been trying to install the imager package and I keep getting the same error:
* installing *source* package 'imager' ...
** package 'imager' successfully unpacked and MD5 sums checked
** using staged installation
…

Mikael Minten
- 11
- 2
0
votes
0 answers
Unable to export `cimg` array as a tiff file using `imager` in `R`
I am trying to export/save some cimg arrays as tiff images in R using the package imager.
However, the output is not in the correct format. How to fix this ?
library(imager)
library(tiff)
tifftest <- imager::load.image(file = system.file("img",…

Crops
- 5,024
- 5
- 38
- 65