[R-sig-Geo] Irregularly spaced 3D point clustering /segmentation

Michael Sumner mdsumner at utas.edu.au
Fri May 18 04:56:50 CEST 2007


Sorry, that should be

library(rgl)  ## not rgdal!

And "elev" and "minElev" are the lidar elevation, and the forest floor 
(approx) elevation.

Cheers, Mike.
> library(rgdal)
> library(trip)  ## just for my oc.colors function  - any color function 
> will do
>
> z <- d$elev - d$minElev  ## colourize based on height above ground
>
> ## this is taken from surface3d
> z <- z - min(z)
> zlim <- range(z)
> zlim <- zlim - min(zlim)
> zlen <- zlim[2] - zlim[1] + 1
> colorlut <- oc.colors(zlen) # height color lookup table
> col <- colorlut[z -zlim[1]+1 ] # assign colors to heights for each point
>    
> ## subsample it for sanity until you are happy it's right
>  sub <- sample(1:nrow(d), 5000) 
> ## sub <- 1:nrow(d)
>  plot3d(d[sub,1], d[sub,2], d[sub, 3], aspect = "iso", col = col, size = 3)
>
> Sample images here:
> http://staff.acecrc.org.au/~mdsumner/R/lidar.png
> http://staff.acecrc.org.au/~mdsumner/R/lidar2.png
>
> That might help you with your clustering explorations.
>
> Cheers, Mike.
>
> Andrew Niccolai wrote:
>   
>> Absolutely.  I am waiting on a LIDAR data set for my research site and
>> thought that I would get a head start with building the code to segment the
>> data. So, I downloaded the US Forest Service free software FUSION that was
>> built to visualize LIDAR data.  This software comes with an example set from
>> the Pacific Northwest including an orthophoto of the same site.  This is the
>> data that I am currently using while awaiting my own.
>>
>> Hope this helps.  Let me know if you end up making any headway with
>> separating out the trees....
>>
>> cheers
>>
>> Andrew Niccolai
>> Doctoral Candidate
>> Yale University
>> (203) 432-5144
>> -----Original Message-----
>> From: Michael Sumner [mailto:mdsumner at utas.edu.au] 
>> Sent: Thursday, May 17, 2007 5:33 PM
>> To: Andrew Niccolai
>> Cc: r-sig-geo at stat.math.ethz.ch
>> Subject: Re: [R-sig-Geo] Irregularly spaced 3D point clustering /
>> segmentation
>>
>> Hello,
>>
>>  I have no suggestions for helping yet, but I'd rather like to play with 
>> some LIDAR forest data. Is there some publicly available that you can 
>> point me to?  I have messed around with rgl for interactive 3-D view of 
>> similar things, and would like to explore more.
>>
>> Cheers, Mike.
>>
>> Andrew Niccolai wrote:
>>   
>>     
>>> Greetings fellow R users,
>>>
>>> I would really enjoy (and eagerly anticipate) any discussions on ideas for
>>> handling a LIDAR (laser) data set of a New England forest.  The LIDAR
>>> dataset is essentially xyz coordinates that form an irregularly spaced 3D
>>> data cloud of points.  I have brought the data in as
>>>     
>>>       
>> SpatialPointsDataFrame,
>>   
>>     
>>> SpatialPixelsDataFrame, SpatialGridDataFrame, marked Point Pattern Process
>>> objects, matrices etc.  I can view the interpolated surface with ?interp
>>>     
>>>       
>> in
>>   
>>     
>>> library(akima) as well as 3D points and surfaces in library(rgl).
>>>
>>> So, importing the LIDAR data and viewing it or exporting it so that ImageJ
>>> can handle it is not the issue.  
>>>
>>> The LIDAR data set essentially produces a set of "mounds" from the
>>>     
>>>       
>> elevation
>>   
>>     
>>> data recorded in the z variable.  Each "mound" represents a tree in the
>>> forest.  I am hoping to get some ideas on ways to cluster this data set so
>>> that I can isolate each mound for further analysis and segmentation.  One
>>> possibility that I have looked into with Matlab software is
>>> "marker-controlled watershed segmentation".  This essentially inverts the
>>> interpolated surface and "fills" the inverted image with "water" starting
>>>     
>>>       
>> at
>>   
>>     
>>> the local minimas until the water starts to spill over into the next
>>> watershed at which point it builds a "dam" between local valleys.  This is
>>>     
>>>       
>> a
>>   
>>     
>>> function in Matlab and I haven't been able to see the code to bring it to
>>>     
>>>       
>> R.
>>   
>>     
>>> Any ideas on this method or suggestions for better methods to isolate
>>> "mounds" in 3D space?  Template matching, perhaps??
>>>
>>> Thanks in advance and thanks to all the innovative producers and users of
>>> the R domain!!  
>>> Andrew
>>>
>>> _______________________________________________
>>> 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
>
>
>




More information about the R-sig-Geo mailing list