You are on page 1of 1

>>

image1 = imread('C:\Users\HP\Desktop\Tayyaba_MSCS\owl.pgm');
image2 = imread('C:\Users\HP\Desktop\Tayyaba_MSCS\mecca06.pgm');
%read image1 and image2

[r1 c1] = size(image1);


[r2 c2] = size(image2);
%in a matrix

figure
imshow(image1);
figure
imshow(image2);
%show image1 and image2

imwrite(image1,'C:\Users\HP\Desktop\Newfolder\owl.pgm');
imwrite(image2,'C:\Users\HP\Desktop\Newfolder\mecca06.pgm');
%imwrite show the both images
%add 50 in both images
for i = 1 : r1
for j = 1 : c1
image1(i,j) = image1(i,j) + 50; %add 50 in image1
end
end

for i = 1 : r2
for j = 1 : c2
image2(i,j) = image2(i,j) + 50; %add 50 in image2
end
end

figure
imshow(image1);
figure
imshow(image2);

imwrite(image1,'C:\Users\HP\Desktop\Newfolder\owl_IntensityInc50_Out.pgm');
imwrite(image2,'C:\Users\HP\Desktop\Newfolder\mecca06_IntensityInc50_Out.pgm');

You might also like