Displaying 1 result from an estimated 1 matches for "readimagematrix".
2004 Aug 26
5
Surprise when mapping matrix to image
...culation the way we wanted, I
dumped 16-bit pixel data into Excel and used Excel to create CSVs. All
of this went much faster than figuring out the "surprise" that R didn't
display the images "correctly". Did I miss something simple?
I really don't want to do this:
ReadImageMatrix <- function(filename)
{
x <- as.matrix(read.csv(filename,header=FALSE))
x <- t(x)
return( x[,ncol(x):1] )
}
oldpar <- par(mfrow=c(2,2))
x <- ReadImageMatrix("1n.csv")
image(x, col=gray((0:255)/255), main="1N", axes=FALSE)
y <- ReadImageMatrix("2n...