[R] Performance

Huntsinger, Reid reid_huntsinger at merck.com
Wed Jan 22 22:56:04 CET 2003

How are your figures (images?) represented in R? If you use an
efficiently vectorized function on an image represented as a
triple of matrices or a 3xnxm array, I wouldn't expect things
to be too slow. 

You can resize easily using R's indexing for arrays. E.g.,
centerOfImage <- wholeImage[,251:750,251:750] 
using a 3x1000x1000 array wholeImage.

Certain operations you'd like to do on images are best done as C code
called from R's .Call interface. For example, local median filters. 
Depending on the representation of images you're using, it might be
easy to use libraries like ImageMagick or vigra for example in this way. 

Reid Huntsinger

-----Original Message-----
From: Francisco do Nascimento Junior [mailto:fnj at cin.ufpe.br]
Sent: Wednesday, January 22, 2003 9:10 AM
To: R-help
Subject: [R] Performance

I'm applying an arithmetical function the color (R,G,B) of each
pixel of a figure and it's very slow. This is common?
Other thing, are there some library to make modification in figures, eg,
to alter size?
If not, somebody knows some software that makes this, or either, to
resize figures automatically, therefore I go to need to apply to a bank.


Francisco Júnior,
Computer Science - UFPE-Brazil
"One life has more value that the
world whole"

R-help at stat.math.ethz.ch mailing list


More information about the R-help mailing list