Hi all, i would like to analyze some images with R. For example, i have a tif image (16 bit=2^16 values) that i convert in ascii file (8 bit =256 values only) so it is easy to work under R with image() function. But, i would like to keep my image with 2^16 values... how can i do to load my tif image in my workspace? Do you know if there is a package for analysis image ? Thanks Olivier -- -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- Olivier MARTIN phone: (33) 04 76 61 53 55 Projet IS2 06 08 67 93 42 INRIA Rhone-Alpes fax : (33) 04 76 61 54 77 655, Av. de l'Europe Montbonnot e-mail:olivier.martin at inrialpes.fr 38334 Saint Ismier cedex -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- -------------- next part -------------- An HTML attachment was scrubbed... URL: https://stat.ethz.ch/pipermail/r-help/attachments/20010523/20522bc5/attachment.html
On Wed, 23 May 2001, Olivier Martin wrote:> Hi all, > > i would like to analyze some images with R. > For example, i have a tif image (16 bit=2^16 values) that i convert in > ascii file (8 bit =256 values only) > so it is easy to work under R with image() function. > But, i would like to keep my image with 2^16 values... > how can i do to load my tif image in my workspace? > Do you know if there is a package for analysis image ?Indeed there is: AnalyzeIO. But `tif' is so ill defined that you would need to convert to a more standard format (via ImageMagick, netpbm) and read it with Rstreams or the binary connections functions. Since the smallest R type is 32 bits (signed) there is no problem using 16 bits, and we do it all the time. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
There is a program called tnimage which runs under Unix or Linux and which can read both 8 bit and 16 bit tif images, and can convert these to ascii files. After a little editing I can read the ascii file into S-plus. So far I haven't found just the right way to read these files in R, but it should be possible. You can download version 3.2.7 of tnimage from: ftp://entropy.brni-jhu.org/pub/unix/ ----- Original Message ----- From: Olivier Martin To: r-news Sent: Wednesday, May 23, 2001 7:19 AM Subject: [R] image with R Hi all, i would like to analyze some images with R. For example, i have a tif image (16 bit=2^16 values) that i convert in ascii file (8 bit =256 values only) so it is easy to work under R with image() function. But, i would like to keep my image with 2^16 values... how can i do to load my tif image in my workspace? Do you know if there is a package for analysis image ? Thanks Olivier -- -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- Olivier MARTIN phone: (33) 04 76 61 53 55 Projet IS2 06 08 67 93 42 INRIA Rhone-Alpes fax : (33) 04 76 61 54 77 655, Av. de l'Europe Montbonnot e-mail:olivier.martin at inrialpes.fr 38334 Saint Ismier cedex -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- -------------- next part -------------- An HTML attachment was scrubbed... URL: https://stat.ethz.ch/pipermail/r-help/attachments/20010523/ccf57c04/attachment.html