You can use any picturefor the exercise. 1- Perform addition and subtraction ope
ID: 2268350 • Letter: Y
Question
You can use any picturefor the exercise.
1- Perform addition and subtraction operations on any two intensity images of the same size (dimensions). Take into consideration the scaling issue after the operations. 2- Generate your own binary images of size 100x100 (or any other size) that contain 0's and 1's of rectangles, squares, vertical and horizontal lines, or any other shapes of your choice. Perform AND and OR logical operations on the two images. You need to ensure overlapping of different regions to see the effects of the operations. 3- Select a good image of your own. Generate K noisy images by adding zero mean random Gaussian noise to each image. Explore the quality of the image resulting from averaging the K images as K increases. See example 2.15 in your textbook. Make sure you print the images you obtained in all the steps above.Explanation / Answer
i=imread('cameraman.tif');
i1=imread('pout.tif');
i1=imresize(i1,size(i));
%%%%%%%%%%%%%%%%%%addition
i2=i+i1;
i2=imadjust(i2);
%%%%%%%%%%%%%%%%%%substraction
i3=i-i1;
i3=imadjust(i3);
%%%%%%%%%%%%%%%%%binary image
im=zeros(size(i));
im(69,80)=1;
se1=strel('square',50);
im=imdilate(im,se1);
im1=zeros(size(i));
im1(79,80)=1;
se1=strel('rectangle',[100,50]);
im1=imdilate(im1,se1);
%%%%%%%%%%%%and operation
im3=im1&im;
%%%%%%%%%%%%%%%%%%or operation
im4=im1|im;
%%%%%%%%%%%%%%%%%%%%%
im5=imread('peppers.png');
im6=imnoise(im5,'gaussian',0);
im7=imnoise(im5,'gaussian',0.09);
im8=imnoise(im5,'gaussian',0.05);
%%%%%%%%%%%%%%%%considering k=2
a=imadd(im5,im6);
a=imdivide(a,2);
%%%%%%%%%%%%%%%%%k=3
b=imadd(im5,imadd(im6,im7));
b=imdivide(a,3);
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.