1

I'm working on pointcloud lidar data. I want to calculate skewness and kurtosis to distinguish road from ground. My current intensity column looks like this in plot enter image description here Is there an implementation on another language? I read

First, the skewness of the point cloud is calculated. If it is greater than zero, peaks dominate the point cloud distribution as shown in Table 1. Thus, the highest value of the point cloud is re- moved by classifying it as an object point. To separate all ground and object points, these steps are iteratively executed while the skewness of the point cloud is greater than zero.

UPDATE

I tried the following code but its an infinite loop

I'm getting StatsBase.skewness(poi.intensity) around 0.125

data = rand(Gamma(7.5, 1.0), 75)
th=maximum(data)
classification=rand(2:3,length(data))
poi=Table(intensity=data,classification=classification)
while sk > 0
    poi.classification[findall(poi.intensity .== th)] .= 7 #object
    th = th .- 1
    sk = skewness(poi.intensity[findall(poi.classification .== 2)])
    print(sk)
end
h612
  • 544
  • 2
  • 11
  • 2
    Your code isn't reproducible. Please provide a minimal example and explain your expected output as well. – Shayan Nov 23 '22 at 06:42
  • @Shayan I'm not sure how to generate skewed data. rnd is naturally normally distributed. – h612 Nov 23 '22 at 06:54
  • 1
    What if you use a Chi2 distribution (e.g. with k=3 ) by `Distributions.jl`? – Shayan Nov 23 '22 at 07:08
  • 1
    have you tried StatsBase.jl's skewness(array) and kurtosis(array) on your data? – Bill Nov 23 '22 at 18:46
  • 1
    The instructions as you quote them may not work to classify the ground versus the road, because the instructions are directed at looking for objects, such as cars, trees, or signs, that are elevated above ground. But the ground and the road may be the same elevation, and the main difference is that the road is probably flatter, so that the skewness __locally__ on the road might be lower than on non-level ground? – Bill Nov 25 '22 at 04:31

0 Answers0