robotology / stereo-vision

Repository containing apps for stereo vision
https://robotology.github.io/stereo-vision/
GNU General Public License v2.0
19 stars 19 forks source link

Bilateral filter on disparity image #7

Closed tanismar closed 8 years ago

tanismar commented 8 years ago

Implemented the option of processing the output disparity image with a fast edge-preserving bilateral filter in order to reduce noise (based on http://people.csail.mit.edu/sparis/bf/). Filter parameters as well as activation of the filter can be controlled by rpc, with added commands bilatfilt (sigmaColor sigmaSpace) and doBLF (bool), respectively. Speed is reduced for small values of the parameters, but for default and seemingly more useful ones (around 10.0 10.0) speed reduction is minimal.

tanismar commented 8 years ago

Checked... cvReleaseImage is not needed: The code is not leaking memory, and if added, it crashes. I think for images not created as IplImage but as is the case, from Mat, Mat takes care of releasing memory and cleaning up. Name of template set back to SFM. Also did a minor change to have the filter ON by default without ini file, as there is not SFM.ini.

vtikha commented 8 years ago

Ok perfect, by looking at it quickly it seemed it needed it. I know Mat do not need it but since it was an IplImage i thought it might.

pattacini commented 8 years ago

The SFM.xml.template has been removed completely!

pattacini commented 8 years ago

I've added it up again.

pattacini commented 8 years ago

@robotology/wysiwyd-developers be aware of this merged PR introducing the Bilateral filter for smoothing out the resulting disparity.

Tobias-Fischer commented 8 years ago

Thanks @pattacini! I guess we don't specifically have to modify anything in the iol2opc pipeline, do we?

pattacini commented 8 years ago

We don't, indeed.