下面matlab之家分享一个简单的matlab图像处理程序。相信大家能够看懂每行代码代表的意思。
%% load image data pic3=imread('pic3.jpg'); pic2=imread('pic2.jpg'); %% resize pic pic31=imresize(pic3,[340 430]); pic21=imresize(pic2,[340 430]); %% display pic11 image(pic31); axis equal; axis off; %% display pic21 image(pic21); axis equal; axis off; %% scale and display pic duller=0.5*pic21; image(duller); axis equal; axis off; %% add the pic combined=pic31+duller; image(combined); axis equal; axis off; %% save the combined picture as type of BMP imwrite(combined,'combined_picture.bmp','bmp');