%-- 3.11.2010 14:07 --%
I=imread('kvet.bmp');
kvetn = kvet/256
kvetsc
kvetn = kvet/256
imwrite(kvetn,'kvet.bmp');
I = im2double(I);
imshow(I,'ImageMagnification','fit');
imshow(I,'InitialMagnification','fit');
dctI = dct2(I);
imshow(I,'InitialMagnification','fit');
dctI = dct2(I);
imshow(dctI,'InitialMagnification','fit');
dctI(6:8,6:8) = 0;
imshow(dctI,'InitialMagnification','fit');
invDctI = idct2(dctI);
imshow(invDctI,'InitialMagnification','fit');
imshow(dctI,'InitialMagnification','fit');
imshow(invDctI,'InitialMagnification','fit');
T = dctmtx(8)
B = blkproc(I,[8 8],'P1*x*P2',T,T');
mask(1:5,1:5=1
mask(1:5,1:5)=1
mask = zeros(8,8);
mask(1:5,1:5)=1
B2 = blkproc(B,[8,8],'P1.*x',mask);
B2
invB2 = blkproc(B2,[8 8],'P1*x*P2',mask');
imshow(invB2,'InitialMagnification','fit');
invB2 = blkproc(B2,[8 8],'P1*x*P2',T',T);
imshow(invB2,'InitialMagnification','fit');
clear all;
I = imread('eight.tif');
I = im2double(I);
I = imread('eight.tif');
I = im2double(I);
imshow(I);
T  =dctmtx(8);
B = blkproc(I,[8 8],'P1*x*P2',T,T');
imshow(50*B);
mask = (1:4,1:4)=1
mask = zeros(8,8);
mask = (1:4,1:4)=1
mask(1:4,1:4)=1
Bm = blcproc(B,[8 8], 'P1.*x',mask);
Bm = blkcproc(B,[8 8], 'P1.*x',mask);
Bm = blkproc(B,[8 8], 'P1.*x',mask);
invBm = blkproc(B,[8 8], 'P1*x*P2',T',T);
imshow(I), figure, imshow(invBm);
f = [1,1,1,1;1,-1,1,-1;1,1,-1,-1;1,-1,-1,1;]
clear all
WH = [1,1,1,1;1,-1,1,-1;1,1,-1,-1;1,-1,-1,1;]
whf = 0.25*WH*f*WH
f = [
10,10 ,10 ,10;
10 ,60 ,60 ,10;
10 ,10 ,10 ,10;
]
whf = 0.25*WH*f*WH
iwhf = 0.25 * WH * whf*WH
WHU =[1 ,1 ,1 ,1;1 ,1 ,-1 ,-1;1 ,-1 ,-1 ,1;1 ,-1 ,1 ,-1;]
R3 = WHU(3,:);
R4 = WHU(4,:);
EO34 = 10*R3*R4;
EO34 = 10*R3'*R4;
I = mat2gray(EO34)
imshow(I,'InitialMagnification',3000);
H = [1 ,1 ,1 ,1;1 ,1 ,-1 ,-1;1.414 ,-1.414 ,0 ,0;0 ,0 ,1.414 ,-1.414;]
hf = 0.25*F*f*H'
ihf = 0.25*H'*hf*H
hf = 0.25*H*f*H'
ihf = 0.25*H'*hf*H
hf(4,4) = 0
ihf = 0.25*H'*hf*H
imshow(ihf,[-10, 70],'InitialMagnification',3000);
imshow(ihf,[-10, 70],'InitialMagnification','fit');
ihf .* 25
imshow(and,[-10, 70],'InitialMagnification','fit');
imshow(ans,[-10, 70],'InitialMagnification','fit');
harmat
haarmat
I = imread('kvet.bmp');
I = im2double(I);
Hkvet =(0.125*haar8*I*haar');
Hkvet =(0.125*haar8*I*haar8');
Hkvet(5:8,5:8) = 0
iHkvet = 0.125 *haar8*Hkvet*haar8
imshow(iHkvet,'InitialMagnification','fit');
iHkvet = 0.125 *haar8'*Hkvet*haar8
imshow(iHkvet,'InitialMagnification','fit');
