Professional Documents
Culture Documents
Sang 13 Thang 9
Sang 13 Thang 9
imread
imread (D:\)
imread (D:\Penguins.bmp)
imread (\\D:\Penguins.bmp)
A=imread ('D:\Penguins.bmp')
imshow (A)
figure (R)
R=A (:,:,1)
Y=rgb2gray(A);
C=A(5:8,5:8)
C=A(200:600,200:600)
imshow (C)
A1=A(1:384,1;512)
A1=A(1:384,1:512)
B=[A4A3;A2A1]
B3=[A1 A2;A4]
B3=[A2;A4]
A2=A(1:384,512:1024), A4=A(385:768,515:1024)
B4=[A2;A4]
A2=A(1:384,512:1024), A4=A(385:768,512:1024)
B4=[A2;A4]
A=imread ('D:\Penguins.bmp')
I=imread ('D:\Penguins.bmp');
Y=rgb2gray(I);
s=255-Y;
s=1-Y;
s=2-Y;
s=Y/255;
s=double(Y)/255;
s=log(1+Y);
s=lg(1+Y);
s=l0g10(1+Y);
s=log10(1+Y);
r=double(Y)/255;
s=log10(1+r);
s=r.^(2);
imshow (s,[]);
s=log10(1+r);
imread ('D:\Tulips');
imread ('D:\Tulips.bmp');
A=imread ('D:\Penguins.bmp');
A=imread ('D:\Tulips.bmp');
Y=rgb2gray(A);
figure,
imshow(Y);
B=255-Y;
figure,
imshow(B);
r=double(Y)/255;
s=log10(1+r);
Lmin=min(s);
Lmax=max(s);
i=((r-Lmin)/Lmax-Lmin).255);
i=((s-Lmin)/Lmax-Lmin).255);
A=imread ('D:\Tulips.bmp');
close all
A=imread('D:\1.bmp');
figure, imshow(A);
B=rgb2gray(A);
figure, imshow(B)
C=inhist(C);
C=inhist(B);
C=imhist(B);
figure, imshow(C);
D=histeq(C);
figure, imshow(D);
D=histeq(B);
figure, imshow(D);
imhist(B, 256);
imhist(B, 255);
D=histeq(B, 255);
figure, imshow(D);
imhist(D, 255);
m=128;
sigma=20;
x=0:255;
h=exp[-((x-m).^2)/2*(sigma.^2)];
h=exp[-((x-m).^2)/2.(sigma.^2)];
h=exp[-((x-m).^2)/(2.(sigma.^2))];
h=exp(-((x-m).^2)/(2*(sigma.^2))/;
h=exp(-((x-m).^2)/(2*(sigma.^2));
h=exp(-((x-m).^2)/(2*(sigma.^2)));
plot(h)
stem(h)
figure, imshow(B);
C=histeq(B,h);
figure, imshow(C);
figure, imhist(C)
imread (D:\tulips.bmp)
imread ('D:\tulips.bmp')
A=imread ('D:\Tulips.bmp');
figure, imshow(A);
B=rgb2gray(A);
B=rgb2gray(B);
figure, imshow(B);
C=ones (3);
figure, imshow(C);
figure, imshow(D);
figure, imshow(D);
figure, imshow([D]);
figure, imshow[D];
C=ones (3);
D=double (B)/255;
C=ones (3)/9;
E=imfilter(D, C);
C=ones (9)/81;
E=imfilter(D, C);
C=ones (3)/9;
E=imfilter(D, C);
C=ones (5)/25;
E=imfilter(D, C);
C=ones (15)/225;
E=imfilter(D, C);
close all
size (B);
size (B)
N=5randn(768, 1024);
N=5.randn(768, 1024);
N=5*randn(768, 1024);
N=50*randn(768, 1024);
I=N+B;
C=ones (1)/1;
C=ones (9)/81;
C=ones (3)/9;
C=ones (15)/225;
N=3*randn(768, 1024);
close all;
C=ones (3)/9;
close all
G=ones (3)/9;
H=medfilt2 (I);
figure, imshow (H);
sublot (1,1,1,1);
subplot (1,1,1,1);
size (B);
size (B)
plot (B);
plot (I);
plot (J);
plot (H);
figure, imshow;
figure;
K=subplot(1,4,1);
imshow(K);
L=subplot(1,4,2);
imshow(L);
imshow (B);
figure
imshow (B);
imshow (G);
imshow (I);
imshow (J);
imshow (H);
figure;
imshow (B);
imshow (G);
imshow (I);
imshow (J);
imshow (I);
imshow (I);
imshow (J);
imshow (H);
figure;