I=imread('bonemarr.tif')
[BW1,th1]=edge(I,'sobel',0.07)
th1str=num2str(th1)
imshow(I)
title('图1:bonemarr.tif原图','fontsize',14,'position',[128,260,0])
figureimshow(BW1)
ti='图8: sobel算子提取的边界,阈值为'
ti=strcat(ti,th1str)
title(ti,'fontsize',12,'position',[128,260,0])
图像压缩:
clear
I=imread('blood1.tif')
I=im2double(I)
T=dctmtx(8)
B=blkproc(I,[8 8],'P1*x*P2',T,T)
mask[1,1,1,1,0,0,0,01,1,1,0,0,0,0,01,1,0,0,0,0,0,01,0,0,0,0,0,0,00,0,0,0,0,0,0,00,0,0,0,0,0,0,00,0,0,0,0,0,0,00,0,0,0,0,0,0,0]
B2=(blkproc(B,[8 8],'P1.*x',mask)
I2=blkproc(I,[8 8],'P1*x*P2',T,T)
subplot(1,2,1)
imshow(I)title('原图搜友');
subplot(1,2,2)
imshow(I2)title('解压缩图');
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)