[R-sig-Geo] image classification in R

Agustin Lobo alobolistas at gmail.com
Sat Apr 18 13:54:04 CEST 2009


In my opinion, and considering that imagery uses to be  very large
datasets, unless you want to include spatial characteristics, the best
is to subsample your imagery with your gis, then import the
dataset to R, perform classification with the many tools
available, save the centroids (means, sds, covar matrices depending
on your method) and then allocate pixels to those centroids in your
gis.

Images are too large for R

Agus

Edzer Pebesma wrote:
> There's a Task View on clustering, linked from CRAN:
>
> http://cran.r-project.org/web/views/Cluster.html
>
> that will lead you to all types of clustering available, including
> hierarchical. I  don't know how well it will work for large data sets
> such as images, as it calls for constructing n x n distance matrices,
> with n the number of pixels.
> --
> Edzer
>
> Hengl, T. wrote:
>   
>> Don't forget that you can also use different types of unsupervised classification methods, such as the fuzzy k-means as implemented in the "kmeans" method.
>>
>> Here is an example (with landform classes):
>> http://spatial-analyst.net/wiki/index.php?title=Analysis_of_DEMs_in_R%2BILWIS/SAGA
>>
>> If you work with large grids, consider also using R+SAGA:
>> https://stat.ethz.ch/pipermail/r-sig-geo/2009-February/005155.html
>>
>>
>> T. Hengl
>>
>>
>>
>> -----Original Message-----
>> From: r-sig-geo-bounces at stat.math.ethz.ch on behalf of Edzer Pebesma
>> Sent: Fri 4/17/2009 5:32 PM
>> To: Corey Sparks
>> Cc: r-sig-geo at stat.math.ethz.ch
>> Subject: Re: [R-sig-Geo] image classification in R
>>  
>> Corey,
>>
>> you can use functions lda or qda (in library MASS) for linear or
>> quadratic discriminant analysis, respectively, on your training/ground
>> truth data, and then use the predict method on the resulting objects,
>> passing the bands (you need to convert the SpatialGridDataFrame to a
>> data.frame) as newdata to obtain the classified pixels. Make sure that
>> the band names have identical name in both cases. Then assign the
>> predicted class to the SpatialGridDataFrame and export.
>>
>> It has never been clear to me whether "maximum likelihood
>> classification" in RS refers to lda or qda. Anyway, it's called
>> discriminant analysis in the statistical literature.
>> --
>> Edzer
>>
>>
>> Corey Sparks wrote:
>>   
>>     
>>> Dear list,
>>> I want to do some unsupervised image classification of some landsat
>>> imagery, I think I can read in the multi-band rasters using rgdal, but
>>> has anyone tried doing this in R?  I am thinking (after looking at
>>> documentation for how GRASS and ArcGIS do it) that I need to do an
>>> initial hierarchical clustering to define clusters, but does anyone
>>> have an idea on how to do a maximum likelihood classification of the
>>> imagery?  Would a discriminant function approach work?  Any advice
>>> anyone may have would be greatly appreciated, and i'm very sorry but I
>>> don't have a working example yet.
>>> Best
>>>
>>> Corey
>>>
>>> Corey Sparks
>>> Assistant Professor
>>> Department of Demography and Organization Studies
>>> University of Texas at San Antonio
>>> One UTSA Circle
>>> San Antonio, TX 78249
>>> 210 458 6858
>>> corey.sparks 'at' utsa.edu
>>>
>>> _______________________________________________
>>> R-sig-Geo mailing list
>>> R-sig-Geo at stat.math.ethz.ch
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>>     
>>>       
>>   
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> R-sig-Geo mailing list
>> R-sig-Geo at stat.math.ethz.ch
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>   
>>     
>
>   

-------------- next part --------------
A non-text attachment was scrubbed...
Name: alobolistas.vcf
Type: text/x-vcard
Size: 251 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20090418/0dcd7d60/attachment.vcf>


More information about the R-sig-Geo mailing list