I am reading a paper. It says like this: 'For experiments conducted on noisy images, each texture image was corrupted by additive Gaussian noise with zero mean and standard deviation that was determined according to the corresponding Signal-to-Noise Ratios (SNR) value.' And then, they show the classification rate (%) on UIUC database with additive gaussian nosie of different Signal-To-Noise. Adding noise into an image manually instead of. Learn more about image processing, noise, gaussian noise Image Processing Toolbox.
Active2 years, 4 months ago
I'm trying to to add noise to an Image & then denoised to see the difference in my object detection algorithm. So I developed OpenCV code in C++ for detection some objects in the image. I would like to test the robustness of the code, so tried to add some noises. In that way would like to check how the object detection rate changed when add noises to the image. So , first added some random Gaussian Noises like this
I got this images:
The original: The noisy one
So is there any better model for noises? Then how to Denoise it. Is there any DeNoising algorithms?
bobbob
2 Answers
OpenCV comes with Photo package in which you can find an implementation of Non-local Means Denoising algorithm. The documentation can be found here:http://docs.opencv.org/3.0-beta/modules/photo/doc/denoising.html
As far as I know it's the only suitable denoising algorithm both in OpenCV 2.4 and OpenCV 3.x
I'm not aware of any other noise models in OpenCV than randn. It shouldn't be a problem however to add a custom function that does that. There are some nice examples in python (you should have no problem rewriting it to C++ as the OpenCV API remains roughly identical) How to add noise (Gaussian/salt and pepper etc) to image in Python with OpenCV
There's also one thing I don't understand: If you can generate noise, why would you denoise the image using some algorithm if you already have the original image without noise?
Community♦
Max WalczakMax Walczak
Check this tutorial it might help you.
Specially this part:
OpenCV provides four variations of this technique.
cv2.fastNlMeansDenoising() - works with a single grayscale images
cv2.fastNlMeansDenoisingColored() - works with a color image.
cv2.fastNlMeansDenoisingMulti() - works with image sequence captured in short period of time (grayscale images)
cv2.fastNlMeansDenoisingColoredMulti() - same as above, but for color images.
Common arguments are:
h : parameter deciding filter strength. Higher h value removes noise better, but removes details of image also. (10 is ok)
hForColorComponents : same as h, but for color images only. (normally same as h)
templateWindowSize : should be odd. (recommended 7)
searchWindowSize : should be odd. (recommended 21)
And to add gaussian noise to image, maybe this thread will be helpful:
Community♦
pb772pb772