MATLAB图像处理步骤?

来源:百度知道 编辑:UC知道 时间:2024/05/17 09:27:31
一般RGB图像处理的步骤?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('解压缩图');

44