defdo_statistical_outlier_filtering(pcl_data,mean_k,tresh):''' :param pcl_data: point could data subscriber :param mean_k: number of neighboring points to analyze for any given point :param tresh: Any point with a mean distance larger than global will be considered outlier :return: Statistical outlier filtered point cloud data eg) cloud = do_statistical_outlier_filtering(cloud,10,0.001) : https://github.com/fouliex/RoboticPerception ''' outlier_filter = pcl_data.make_statistical_outlier_filter() outlier_filter.set_mean_k(mean_k) outlier_filter.set_std_dev_mul_thresh(tresh)return outlier_filter.filter()cloud =do_statistical_outlier_filtering(cloud,10,0.001)# number of neighboring points of 10# standard deviation threshold of 0.001""" ์ ๋ ฅ cloudํฌ๋งท : pcl_xyz pcl_xyz = pcl_helper.XYZRGB_to_XYZ(pcl_xyzrgb) pcl_xyz = do_statistical_outlier_filtering(pcl_xyz,10, 0.001) pcl_xyzrgb = pcl_helper.XYZ_to_XYZRGB(pcl_xyz,[255,255,255]) pcl_xyzrgb์ : TypeError: __cinit__() takes exactly 1 positional argument (0 given) ์๋ฌ """
First filter is the PCLโs Statistical Outlier Removal filter. in this filter for each point in the point cloud, it computes the distance to all of its neighbors, and then calculates a mean distance. By assuming a Gaussian distribution, all points whose mean distances are outside of an interval defined by the global distances mean+standard deviation are considered to be outliers and removed from the point cloud.