物理光学的知识

来源:百度知道 编辑:UC知道 时间:2024/07/02 14:12:42
涉及到光学在图像处理中的应用,使用MATLAB软件。图像的超分辨率重组等问题。越详细越好.

数字图像的边界提取:
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('解压缩图');

5