- A = double(imread('lena.bmp'));
- figure(1);
- imshow(uint8(A));
- imgsize = size(A,1)*size(A,2);
- seed = 123;
- rand('state',seed);
- pn=rand(size(A,1),size(A,2));
- AW = A + pn ;
- figure(2);
- imshow(uint8(AW));
- figure(3);
- imshow(uint8(pn));
- cor1 = sum(sum(pn.*A))