Are there any native functions in C++, OpenCV that add Noise to an image?

Hello to everybody.

It is a simple question I coud not solve searching on Google, no code is needed in this post.

Is there any function that receives an image as input and in which you can, by its arguments select which kind of noise and its intensity you want to apply to the original image.

Thank you!

there are randn() (and randu()) functions to generate noise, like:


Mat noise(img.size(), img.type());
randu(noise, 0, 10);

img += noise;

How does randu() work? what are the second and third arguments for?