How to add uniform noise with given range

18 views (last 30 days)
I can't find any good documentation on adding uniform noise with a given range. Does anyone know how to do it? Or can someone point me in the right direction to figure it out.
Add uniform noise to an image with range [-0.05 to 0.05]

Accepted Answer

James Tursa
James Tursa on 19 Oct 2018
lower_bound = something
upper_bound = something
n = number of samples
u = lower_bound + rand(1,n)*(upper_bound-lower_bound);
This is the second example in the doc:

More Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!