Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- display image
- ------
- load 'C:\Users\admin\Desktop\mosaic.mat'
- image(mosaic)
- colormap(gray(256))
- -----
- I=imread('imagename.pbm');
- F=fft2(double(I));
- F=fft2(double(mosaic));
- S=fftshift(F);
- L=log2(S);
- A=abs(L);
- imagesc(A)
- F2=fft2(double(mosaic));
- L2=log2(F2);
- A2=abs(L2);
- imagesc(A2)
- mask2
- ------
- load 'mosaic';
- y = fft2(mosaic);
- mask = zeros(569,800);
- myMask2 = createMask2(mask,y,**amount of boxes**);
- y2 = y.*myMask2;
- z = ifft2(y2);
- image(256*(abs(z))/max(max(abs(z))));
- masks
- ------
- y=fft2(mosaic);
- mask = zeros(569,800);
- mask(1:30,1:30)=1;
- mask(1:30,226:256)=1;
- mask(226:256,1:30)=1;
- mask(226:256,226:256)=1;
- image(256*mask)
- mask = zeros(256,256);
- mask(1:30,1:30)=1;
- mask(1:30,226:256)=1;
- mask(226:256,1:30)=1;
- mask(226:256,226:256)=1;
- image(256*mask)
- ------
- function mask = createCircleMask(cx,cy,ix,iy,r)
- [x,y]=meshgrid(-(cx-1):(ix-cx),-(cy-1):(iy-cy));
- mask=((x.^2+y.^2)<=r^2);
- image(256*mask);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement