You are on page 1of 1

figure, imshow(I)

J = imcontour(I,5,-);
Figure, imshow(J)
Resize
J = imresize(I, 0.5, bilinear);
Filter
h=fspecial('average', [3 3]);
b=imfilter(a,h);
figure, imshow(b);

figure, imshow(I);
= imnoise(I,'salt & pepper',0.05); figure,
imshow(J); fun = @(x) median(x(:)); K = nlfilter(J,
[3 3],fun); figure, imshow(K);

Edge
I
J

= imread(kidneys.jpg); figure, imshow(I)


= edge(I,'canny', 0.048); figure, imshow(J)
Gead mag
I = imread('kidneys.jpg'); Figure, imshow(I)
hy = fspecial('sobel'); hx = hy';
Iy = imfilter(double(I), hy, 'replicate'); Ix =
imfilter(double(I), hx, 'replicate'); gradmag = sqrt(Ix.^2 +
Iy.^2); figure, imshow(gradmag,[]) se = strel('disk', 20);
K = imopen(I, se); figure, imshow(K)
Back ground
figure, imshow(I)
graythresh(I) and the value of the threshold is calculated:
I2 = im2bw(I, 0.2667)
I3 = immultiply(I2, I)
imshow(I3)
mesh

I = imread(striatum.jpg); figure, imshow(I)


[x,y] = size(I);
X = 1:x;
Y = 1:y;
[xx,yy] = meshgrid(Y,X); J = im2double(I); figure,
surf(xx,yy,J);

(fig.12a)
ans = 0.2667
(fig.12b)

You might also like