Alternative to OpenCV fastNlMeansDenoising for real time application?

混江龙づ霸主 提交于 2021-02-19 08:41:32

问题


I'm currently using the below function to remove noise from two images of size (240x720). I'm currently computing this on my computer but would like to implement this in real time. However on my computer the function results in significant delays to the program. Is there an alternative to removing noise from an image that could work in real time? Gaussian blur perhaps?

  fastNlMeansDenoising(ipmOfLeftLaneRobust, ipmOfLeftLaneRobust,10,7,21);

回答1:


Given a function

fastNlMeansDenoising(InputArray src, OutputArray dst, float h=3, 
    int templateWindowSize=7, int searchWindowSize=21 );

When the templateWindowSize approaches 1, the filter becomes a box bilateral filter.

When the h term approaches infinite, the filter becomes a box blur filter.

For either two, the implementation is exhaustive.

A straightforward alternative is to try the two optimized special cases first: cv::boxFilter and cv::bilateralBlur.




回答2:


One option to consider might be using the CUDA version of fastNIMeansDenoising, as it offers significant speedup assuming you have a decent GPU (true for most OpenCV functionality in general). Barring that though, it depends on what sort of noise you're dealing with, but if it's, say, salt and pepper noise, using the median blur function generally provides good results. Gaussian blur is another good option though if your noise is more general.



来源:https://stackoverflow.com/questions/36254219/alternative-to-opencv-fastnlmeansdenoising-for-real-time-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!