use DCT to add noise
Show older comments
Hi, its a problem with adding noise in my image. i want to add a sin noise with a special freq in both x and y dimensions in my image. my image is 400*400 . but how can i use matlab to create this wave and add it to my image named I? its better to use DCT transforms to make noise...
Answers (1)
Wayne King
on 14 Jun 2012
You haven't said anything about the frequency, so I'll just pick one.
xi=(0:399); yi=(0:399);
[Xi,Yi]=meshgrid(xi,yi);
Z0 = sin(pi/4*Xi) + cos(pi/4*Yi);
% If Im is your image, the following adds the 2-D sine wave.
Im = Im+Z0;
Categories
Find more on Image Filtering in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!