[R] How to read in .jpeg files

2005-02-04 Thread Bill Simpson
In case others are looking for a simple way to read in .jpeg files as ordinary matrices, here is my solution. I am only interested in greyscale images, so you will have to alter the following if you want colour. Most .jpegs are colour, so first step is to open the file with ImageMagick display

Re: [R] How to read in .jpeg files

2005-02-04 Thread Bill Simpson
for(i in 1:dims[1]) x[i,]-rev(x[i,]) #flip the image vertically Courtesy of Rolf Turner, here is a much better way to flip vertically: x - x[,ncol(x):1] Bill __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help