street2=imread('street2.jpg')
whos street1 street2
%%
% Here we see the images are 24-bit color, stored as three planes of |uint8| data.
%% Display images
% Display first image.
cla
image(street1)% Display image
axis equalaxis off
%%
% Display second image
image(street2)% Display image
axis equalaxis off
%% Scale an image
% We can scale the image by a double precision constant but keep the image
% stored as integers. For example,
duller = 0.5 * street2% Scale image with a double constant but create an integer
whos duller
%%
subplot(1,2,1)
image(street2)
axis off equal tight
title('Original') % Display image
subplot(1,2,2)
image(duller)
axis off equal tight
title('Duller') % Display image
%% Add the images
% We can add the two street images together and plot the ghostly result.
combined = street1 + duller% Add |uint8| images
subplot(1,1,1)
cla
image(combined)% Display image
title('Combined')
axis equalaxis off
这是matlab帮助文件中的,,可以把图像叠前扒埋加,同理是否可以把图片数据进此历行筛选,比如小于一定值慧蚂的数据将其加上固定值??
% 读取图像AA = imread('rice.png')
% 读取图衡滑升像B
B = imread('cameraman.tif')
%两图像相减
C=B-A
%显示三幅图像咐老让敏
figure
imshow(A)
figure
imshow(B)
figure
imshow(uint8(C))
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)