Re: [R-sig-Geo] clustering multi band images

2008-06-13 Thread Roger Bivand
On Thu, 12 Jun 2008, Edzer Pebesma wrote: Roger Bivand wrote: On Thu, 12 Jun 2008, Laura Poggio wrote: > Dear list, > I am trying to do some clustering on images. And I have two main > problems: > > 1) Clustering multiband images. > I managed to be successful with a single band image,

Re: [R-sig-Geo] clustering multi band images

2008-06-12 Thread Dylan Beaudette
If you are interested in a (supervised) imagery classification routine that takes spatial arrangement into consideration, check out the i.smap command in GRASS GIS. Cheers, Dylan On Thu, Jun 12, 2008 at 4:57 AM, Laura Poggio <[EMAIL PROTECTED]> wrote: > thank you. It seems now solved! > > Laura

Re: [R-sig-Geo] clustering multi band images

2008-06-12 Thread Agustin Lobo
Laura Poggio escribió: .../... 2008/6/12 Agustin Lobo <[EMAIL PROTECTED] >: May I just ask you if you have easily available an example of code to transform the image in a multivariate table pixels x bands? This would be helpful to avoid many trial and errors (esp

Re: [R-sig-Geo] clustering multi band images

2008-06-12 Thread Laura Poggio
thank you. It seems now solved! Laura 2008/6/12 Agustin Lobo <[EMAIL PROTECTED]>: > > > Laura Poggio escribió: > .../... > >> >> 2008/6/12 Agustin Lobo <[EMAIL PROTECTED] > [EMAIL PROTECTED]>>: >> >> May I just ask you if you have easily available an example of code to >> transform the image in

Re: [R-sig-Geo] clustering multi band images

2008-06-12 Thread Laura Poggio
The kl <- kmeans(as(img, "data.frame")[1:3], 5) worked perfectly. Thank you very much for the time spent to help me. Laura 2008/6/12 Edzer Pebesma <[EMAIL PROTECTED]>: > Roger Bivand wrote: > >> On Thu, 12 Jun 2008, Laura Poggio wrote: >> >> Dear list, >>> I am trying to do some clustering o

Re: [R-sig-Geo] clustering multi band images

2008-06-12 Thread Edzer Pebesma
Roger Bivand wrote: On Thu, 12 Jun 2008, Laura Poggio wrote: Dear list, I am trying to do some clustering on images. And I have two main problems: 1) Clustering multiband images. I managed to be successful with a single band image, but when trying to apply to a 3 band I get the following war

Re: [R-sig-Geo] clustering multi band images

2008-06-12 Thread Agustin Lobo
(sorry I pressed the send button instead of the save as draft button, I go on with my comments) Laura, Laura Poggio escribió: Thank you very much for your detailed answer that made me understand a lot, and also it pointed out what I was thinking: R does not use the spatial information for clas

Re: [R-sig-Geo] clustering multi band images

2008-06-12 Thread Agustin Lobo
Laura, Laura Poggio escribió: Thank you very much for your detailed answer that made me understand a lot, and also it pointed out what I was thinking: R does not use the spatial information for classification. Hep! this is not a problem of R, don't blame it for that. R is wonderful for multi-

Re: [R-sig-Geo] clustering multi band images

2008-06-12 Thread Laura Poggio
Thank you very much for your detailed answer that made me understand a lot, and also it pointed out what I was thinking: R does not use the spatial information for classification. The image (for the moment) is rather small, as it is a sample of 512x512 pixels. I have to compare the effect of a seg

Re: [R-sig-Geo] clustering multi band images

2008-06-12 Thread Agustin Lobo
If your images are large (and images typically are large because pixel size has to be small compared to the extent of the image for the image to be of acceptable quality for our vision system), I do not advice you to get them into R for processing as R has severe memory limits and many classificat

Re: [R-sig-Geo] clustering multi band images

2008-06-12 Thread Edzer Pebesma
Laura Poggio wrote: However the results are quite different from what expected. Then I am wondering if is it that the correct way to handle clustering of remote sensing images. Thanks LP Laura, it's hard for us to look over your shoulder, and say something useful, we also don't know your ex

Re: [R-sig-Geo] clustering multi band images

2008-06-12 Thread Laura Poggio
Yes it helps a lot. From code point of view it works and it solved many problems. Thank you very much. However the results are quite different from what expected. Then I am wondering if is it that the correct way to handle clustering of remote sensing images. Thanks LP 2008/6/12 Roger Bivand <[

Re: [R-sig-Geo] clustering multi band images

2008-06-12 Thread Roger Bivand
On Thu, 12 Jun 2008, Laura Poggio wrote: Dear list, I am trying to do some clustering on images. And I have two main problems: 1) Clustering multiband images. I managed to be successful with a single band image, but when trying to apply to a 3 band I get the following warning message: In as.mat

[R-sig-Geo] clustering multi band images

2008-06-11 Thread Laura Poggio
Dear list, I am trying to do some clustering on images. And I have two main problems: 1) Clustering multiband images. I managed to be successful with a single band image, but when trying to apply to a 3 band I get the following warning message: In as.matrix.SpatialGridDataFrame(x) : as.matrix.Sp