Code

2
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); 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 = imread(‘kidneys.jpg’); figure, imshow(I) J = 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) (fig.12a) graythresh(I) and the value of the threshold is calculated: ans = 0.2667 I2 = im2bw(I, 0.2667) (fig.12b) 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);

description

bnbb

Transcript of Code

figure, imshow(I) J = imcontour(I,5,-); Figure, imshow(J) ResizeJ = imresize(I, 0.5, biine!r); Filterh=fs"eci!(#!$er!ge#, %& &'); b=imfiter(!,h); figure, imshow(b); figure, imshow(I); I = imnoise(I,#s!t ( "e""er#,0.05); figure, imshow(J); fun = )(*) me+i!n(*(,)); - = nfiter(J,%& &',fun); figure, imshow(-); .+geI = imre!+(/i+ne0s.1"g); figure, imshow(I) J = e+ge(I,#c!nn0#, 0.023); figure, imshow(J) Gead magI = imre!+(#/i+ne0s.1"g#); Figure, imshow(I) h0 = fs"eci!(#sobe#);h* = h0#;I0 = imfiter(+oube(I), h0, #re"ic!te#);I* = imfiter(+oube(I), h*, #re"ic!te#);gr!+m!g = s4rt(I*.56 7 I0.56);figure, imshow(gr!+m!g,%') se = stre(#+is/#, 60);- = imo"en(I, se);figure, imshow(-) Back groundfigure, imshow(I) (fg.12a) gr!0thresh(I) and the value o the threshold is calculated!!ns = 0.6889 I6 = im6bw(I, 0.6889)(fg.12") I& = immuti"0(I6, I) imshow(I&)meshI = imre!+(stri!tum.1"g); figure, imshow(I) %*,0' = size(I); #= :,*; $ = :,0; %**,00' = meshgri+(;,