[R] Convering image formats

Roger Bivand Roger.Bivand at nhh.no
Wed Mar 20 09:31:19 CET 2002


On Tue, 19 Mar 2002, Kenneth Cabrera wrote:

> Hi again, R users and developers:
> 
> How can I convert an image to a numerical matrix in R?
> The image must be in a particular format? BMP, JPG, GIF?
> The original image are not too big 800 x 600 pixels and 16 colors.
> 
> Finaly I want the 800x600 integer matrix of the image to handle in R.
> 

library(pixmap) reads pnm, all of the above can be converted to pnm. My
guess would be that you need an indexed pixmap.

Roger

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Breiviksveien 40, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 93 93
e-mail: Roger.Bivand at nhh.no
and: Department of Geography and Regional Development, University of
Gdansk, al. Mar. J. Pilsudskiego 46, PL-81 378 Gdynia, Poland.

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list