Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Apply the Robert operator to the image below. [2 2 2 4 4 2 2 2 4 4 2 2 2 4 4 2 2

ID: 3823178 • Letter: A

Question

Apply the Robert operator to the image below. [2 2 2 4 4 2 2 2 4 4 2 2 2 4 4 2 2 2 4 4 2 2 2 4 4]. Apply the high pass filter to the image below. The coefficients of the high passer filter are given below. -1 -1 -1 -1 +8-1 -1 -1 -1 [2 2 2 4 4 2 2 0 4 4 5 5 4 4 4 6 6 6 8 5 2 2 2 4 4] Apply the low pass filter to the image below. The coefficients of the low passer filter are given below. The round up rule is "lf q > 0.5 then round up to the nearest integer. Otherwise, round down to the nearest integer". 1/9 1/9 1/9 1/9 1/9 1/9 1/9 1/9 1/9 [8 8 8 8 9 10 8 0 8 9 10 10 8 8 9 10 10 9 8 9 10 10 9 9 9 10 10 9 9 9 10 10 9 9 9 9]

Explanation / Answer

%%%%%%%%%%%%%%%%%%%%% (1) %%%%%%%%%%%%%%%%%%%%%%%%%
Img1 = [2 2 2 2 2; 2 2 2 2 2; 2 2 2 2 2; 4 4 4 4 4; 4 4 4 4 4]; %Input Image
Robertsx = [1,0;0,-1]; % Robert Operator kernel1
Robertsy = [0,-1;1,0]; % Robert Operator kernel2
Rob_image = conv2(Img1, Robertsx) + conv2(Img1, Robertsy);
figure('Name','Original Image','NumberTitle','off');
imshow(Img1);
figure('Name','Robert Operator','NumberTitle','off');
imshow(Rob_image);

%%%%%%%%%%%%%%%%%%%%% (2) %%%%%%%%%%%%%%%%%%%%%%%%%
Img2 = [2 2 5 6 2; 2 2 5 6 2; 2 0 4 6 2; 4 4 4 8 4; 4 4 4 5 4]; %Input Image
High_pass_filter = [-1 -1 -1; -1 8 -1; -1 -1 -1]; %KERNEL
A = padarray(Img2,[1 1]); %PAD THE MATRIX WITH ZEROS
Output = zeros([size(Img2,1) size(Img2,2)]); % PRE-ALLOCATE THE MATRIX

%PERFORM COONVOLUTION
for i = 1:size(A,1)-2
for j = 1:size(A,2)-2
Temp = A(i:i+2,j:j+2).*High_pass_filter;
Output(i,j) = sum(Temp(:));
end
end
figure('Name','High Pass Filter','NumberTitle','off');
imshow(Output);


%%%%%%%%%%%%%%%%%%%%% (3) %%%%%%%%%%%%%%%%%%%%%%%%%
Img3= [8 8 8 8 9 10; 8 0 8 9 10 10; 8 8 9 10 10 9; 8 9 10 10 9 9; 9 10 10 9 9 9; 10 10 9 9 9 9]; %Input Image
Low_pass_filter = ones(3)/9; %KERNEL
B = padarray(Img3,[1 1]); %PAD THE MATRIX WITH ZEROS
Output_image = zeros([size(Img3,1) size(Img3,2)]); % PRE-ALLOCATE THE MATRIX

%PERFORM COONVOLUTION
for i = 1:size(B,1)-2
for j = 1:size(B,2)-2
Temp = B(i:i+2,j:j+2).*Low_pass_filter;
Output_image(i,j) = sum(Temp(:));
end
end
Output_image_round = round(Output_image);
figure('Name','Low Pass Filter','NumberTitle','off');
imshow(Output_image_round);

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote