问题
With OpenCV/Matlab, I'm computing a disparity map. I use OpenCV SGBM function to get it. The result are good. I got a bit of noise in my image. With medfilt2 in Matlab, I remove a lot of bad pixels.
But where the noise is more present than the real data, That create outliers zone (Thing under the plant). I would like to remove all. I'm looking for a better way to do it ?
With the median filter, at least the image get less point projected on the ground plane and less point generated in the top of image where there nothing.
My supposition is :
- Remove more noise with a better disparity
- Doing pre-processing on disparity map before reprojectionImageTo3D (OpenCV)
- Doing post-processing on point cloud to remove outlier with Z coordinate and maybe color
I'm not sure how to do it. I looking for nice filtering method that maybe can help me for that. I can work with Matlab and OpenCV as well.
Here an example of my image I have :
Disparity map with noise(Left) and Disparity map with medfilt(Right)
Point cloud generated with noisy disparity map. Point cloud generated with medfilt disparity map.EDIT
The problem of the medfilt2 is that I'm using a window size of 65. So it good for the big plant, but the plant near the ground lose their shape and get rounded and fusion with the ground. It normal this is what medfilt do. But I would like to avoid that, I'm searching for a filter that give better result and less noise at the end.
回答1:
You could give the StatisticalOutlierRemoval
from the PointCloudLibrary a shot. You can find a useful tutorial here, along with an example.
来源:https://stackoverflow.com/questions/20269594/remove-outlier-in-point-cloud