Hi, Dr Halvorsen

Try
identify(expand.grid(1:512,1:512))

But, be careful with the index of the matrix (image)



On Tue, 02 Sep 2003 15:31:45 -0400, kjetil brinchmann halvorsen <[EMAIL PROTECTED]> wrote:

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

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help




--


______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Reply via email to