1个回答
2014-05-18
展开全部
数字图像的边界提取:
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]);
figure;imshow(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,0;1,1,1,0,0,0,0,0;1,1,0,0,0,0,0,0;1,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0;0,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('解压缩图');
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]);
figure;imshow(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,0;1,1,1,0,0,0,0,0;1,1,0,0,0,0,0,0;1,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0;0,0,0,0,0,0,0,0;0,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('解压缩图');
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询