[R] identify with image
kjetil brinchmann halvorsen
kjetil at entelnet.bo
Tue Sep 2 21:31:45 CEST 2003
Hola!
I will want to identify pixels in an image with the mouse, for
so getting the image data from the matrix(es), for use in subsequent
discriminant analysis. But the following bombs R:
(windows XP, rw1071)
> str(baboon)
list()
- attr(*, "size")= int [1:2] 512 512
- attr(*, "cellres")= num [1:2] 1 1
- attr(*, "bbox")= num [1:4] 0 0 512 512
- attr(*, "channels")= chr "grey"
- attr(*, "bbcent")= logi FALSE
- attr(*, "class")= chr "pixmapGrey"
- attr(*, "grey")= num [1:512, 1:512] 0.537 0.510 0.345 0.259 0.322
...
> class(baboon)
[1] "pixmapGrey"
> library(pixmap)
> plot(baboon)
> identify(baboon, n=1)
... and then R bombs!
What to do?
Kjetil Halvorsen
More information about the R-help
mailing list