Displaying 20 results from an estimated 6000 matches similar to: "converting a vector of bytes to a PNG/JPEG image"
2004 Sep 15
1
fractal dimension of an image
Hello, I have a problem that I think can be solved in R but I'm not sure
how to tie things together.
I have a digital image of a crystal growth in 2 dimensions. And my aim
is to calculate the fractal dimension of the crystal. I was planning to
use the box counting method.
So I need to read in the image in R (for which I can use the pixmap or
rimage packages) and then draw a grid over at a
2009 Jun 15
1
display SVG, PNG, GIF, JPEG, TIFF, PPM in new plot frame
Dear R-help
I want to display an image file in a new plot frame.
SVG is my preferred format, but I can also consider
PNG, GIF, JPEG, TIFF, and PPM (from ImageMagick).
By way of background (although not material to this
posting), the image file is generated by a call to
'dot' (part of the 'Graphviz' suite) after the required
.dot file has been produced using hand-crafted R code.
2005 Nov 21
3
PNG-import into R
Hi there
I'm looking for a function to read PNG-bitmap-images from a file into R.
I only found:
- the pixmap-package which cannot import png or similar formats
- the rimage-package which can only import lossy jpeg-images (the
convertion from png to jpeg modifies the data!)
Is there any possibility to read PNG-files?
Thanks for any help
Dominic Sydler
2003 Aug 15
2
Is there a package for digitizing or reading jpegs, ets. in R?
I'm interested in digitizing some scanned time series, and looking for a
solution that is easy and flexible. I thought I might be able to use R's
locator() if I could get the image into a device. I noticed that there
are some packages like (rimage), but it (a) doesn't seem to be available
for the Windows version and forces me to upgrade a bunch of libraries
for my linux system. It
2010 Nov 17
1
rasterImage and coordinate conversion
Hi, I have a plot and I would like to overlay a PNG image over it. I'm
using the rasterImage function to do this, but the problem I'm facing
is working out the coordinates of the upper right corner of the final
image in user coordinates.
That is I can place the image so the lower left is located at the
bottom of the y-axis and the left end of the x-axis. Since my image is
say 100px x
2004 May 27
2
Is it possible to read jpeg files into R?
Hi Helpers,
Does anyone know how to read jpeg, bmp or png files into R?
I have some photos of brain scans and I want to quantify
some aspects of their size. I might be able to do this
with the 'locator' function, if I could figure out how
to read the files in and make them into an image that
I can display on the R Windows device. I have experimented
with readBin, using a simple
2003 Sep 03
3
plotting a distribution curves
Hi,
is there a way to plot distribution curves (say normal or chi sq etc)
from within R?
For example I looked up the *chisq family of functions but I'm not sure
as to how I would use them to generate a plot of the chi sq distribution
(for arbitrary d.o.f).
Thanks,
-------------------------------------------------------------------
Rajarshi Guha <rajarshi at presidency.com>
2009 Jul 28
1
reading jpeg images?
Can someone advise me what the most sensible way is to read jpeg images?
For our work with image analysis and eye-tracking we have been using the
rimage package, on both Macs and Windows PCs. But while setting up a new
Windows machine yesterday, I see that rimage is regarded as orphaned, and no
Windows binary is available. I eventually found an old zip file for the
package, so I
2003 Mar 03
2
saving a plot to a file
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
I'm a new user of R and have managed to make a plot of a histogram. Is there
any way I set the title and axes labels and then save the plot as an image
(png/gif)?
Thanks
- --
- -------------------------------------------------------------------
Rajarshi Guha <rajarshi at presidency.com> <http://jijo.cjb.net>
GPG
2003 Oct 01
1
question about predictions with linear models
Hi,
this question is probably very obvious but I just cant see where I
might be going wrong.
I'm using the lm() function to generate a linear model and then make
predictions using a different set of data.
To generate the model I do (tdata & pdata are matrices of observations
and parameters, tdepv, pdepv are response vectors)
x <- as.data.frame(tdata)
x$tdepv <- tdepv
2007 Nov 20
2
adding an image to a plot
Hi, I'm writing code to generate a plot, in which I draw a series of
rectangles. So my code is of the form
plot.new()
plot.window( ... )
draw rectangle
draw rectangle
...
Is there a way for me to insert a PNG or PDF graphic at a specific
position in the plot (ideally in plot coordinates)? I realize that
this might probably be better done in a separate image editor, but if
it could
2009 Jun 23
2
an idiom to handle i'th element of a set of lists simultaneously
Hi, I have 3 lists, x, y, z and I'd like to perform a calculation over all
the lists simultaneously. If it were a single list I could use lapply, but
for more than one list I'm using a for loop. Is there an idiom that would
let me use something like lapply, but the function specified to lappy would
have access to an element from each list? (In Python, I would have used for
a,b,c in
2003 Nov 10
5
attaching data to any object
Hi,
is the following possible - in a given session I make a lot of objects
and save when exiting. Usually I note down seperately what each object
is about. Is it possible to attach data to any object which would
essentially be a short note explaining the meaning of it?
Thanks,
-------------------------------------------------------------------
Rajarshi Guha <rxg218 at psu.edu>
2003 Nov 10
10
shuffling a vector
Hi,
I'me trying to write a function that will shuffle a vector. At the
moment I'm baically making a vector of randomized indices and then
making a new vector from the original one using these random indices.
However, is there an alternative (more elegant) method to do this? I
tried help.search('shuffle') but it does'nt return anything relevant.
Thanks,
2011 Jan 31
2
identify subsets based on two grouping factors
Hi, I have a data.frame that has a categorical variable, for which I
would like to look at the distribution of levels of this variable,
based on a grouping of two other variables.
As an example:
x <- data.frame(obs=sample(c('low', 'high'),100, replace=TRUE),
grp1=sample(1:10, 100, replace=TRUE),
grp2=runif(100))
cut.grp1 <- cut(x$grp1, 3)
cut.grp2 <- cut(x$grp2, 3)
2003 Sep 14
1
title for plot contain 4 subplots
Hi,
I'm plotting 4 graphs on one page (2x2 matrix) but I cant seem to get
the title for the whole page right.
I'm doing:
op <- par(mfrow = c(2,2), pty="s")
hist(var$V2, breaks="FD",main="Euclidean Metric", xlab="Sum of 3NN ...
hist(var$V2, breaks="FD",main="Manhattan Metric", xlab="Sum of 3NN ...
hist(var$V2,
2010 Jul 27
3
xyplot with all columns of a data.frame on a single plot
Hi, I have a data.frame with columns named X, D1, D2, D3
I know I can get a single plot with 3 curves by doing
xyplot(D1 + D2 + D3 ~ X, data)
but in some cases I might have columns D1 ... D10.
Is there a way to plot all 10 columns without having to specify each
individual term?
(By analogy with formulae in lm, I thought, xyplot(. ~ X, data) would
work, but it didn't)
Thanks,
--
2003 Sep 15
1
question regarding ks.test()
Hi,
I'm using the ks.test() on two vectors. I looked up the reference and
also coded up a version of the two sample Smirnov test. My question is
that how can I decide from the output of R that the two vectors x & y
come from the same distribution?
Am I correct in assuming that smaller D values indicate that they come
from the same distribution? In addition how can I use the p value that
2007 Aug 13
4
vertically oriented color key in heatmaps
Hi, I have some data which I was plotting using image(). I wanted to
add a vertical color key to the plot and I found that heatmap.2 in
gplots does let me add a color key. However, I was thinking of a
vertical bar with the color range rather than the style that gplots
provides.
Is there any package (or code snippet) that would let me add a
vertical color key to an image() or heatmap
2007 Apr 20
1
faster image display?
Does someone here know of a way to display images in R that isn't slow?
Here are the things I've tried so far:
library(rimage)
i<-read.jpeg('foo.jpg')
plot(i) # very slow
library(pixmap)
i <- read.pnm('foo.pnm')
plot(i) # also slow
chans <- getChannels(i)
image(chans[,,1]) # this is slow too
I also tried using library(cairoDevice) but it only makes everything