Log in

View Full Version : adding noise to video


naeem561
17th March 2010, 05:49
how can i add Gaussian noise(mean=0 variance=20) to a video file in yuv format.
can i do it with matlab or do i have to use some other technique.
please help me out.

Shevach
17th March 2010, 08:27
I use 'randn' function of Matlab to add Gaussian noise to yuv-file.
For each pixel (regardless luma or chroma) a value is generated by 'randn'.
Then the produced value is scaled by 255 and added to the pixel's magnitude. Finally the new pixel value is clipped to the range [0..255].

RunningSkittle
18th March 2010, 08:37
everything you will *ever* need:

http://forum.doom9.org/forumdisplay.php?f=33
http://forum.doom9.org/forumdisplay.php?f=69

if you search you will find several plugins that do Gaussian noise.

here is *one*:
http://kvcd.net/sansgrip/avisynth/
http://kvcd.net/sansgrip/avisynth/Noise_Generators-readme.html

naeem561
23rd March 2010, 19:19
I use 'randn' function of Matlab to add Gaussian noise to yuv-file.
For each pixel (regardless luma or chroma) a value is generated by 'randn'.
Then the produced value is scaled by 255 and added to the pixel's magnitude. Finally the new pixel value is clipped to the range [0..255].

could u please send me the matlab code for it if u have it,i just can't work it out.
i really appreciate your help.:thanks: