How to get skewness and kurtosis using Julia

347 views Asked by At

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
0

There are 0 answers