How do I create a function to add random noise without using imnoise? I am trying to figure out how to do it without using the built-in matlab functions. I know I have to add a random integer to every pixel…
function output=randomnoise(current_img)for current_img(n) current_img(n)=current_img(n)+ randi([-255 255],1) n=n+1end
This is what I am coming up with right now, but I don't think my loop is visiting each value. How do I visit each pixel and how do I add random noise to it?
Best Answer