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

I just want it in psuedocode. simplified programming language. Nothing to comple

ID: 3571400 • Letter: I

Question

I just want it in psuedocode. simplified programming language. Nothing to complex thanks!

art or pseudocode. If you want to apply a linear filter to the Your answer should be in the form that says "apply kernel" but you need to clearly state what kernel(s) whole image, you can includ in your process. If your you are using. Make s that you indicate what the inputs and outputs are process is get omplicated, consider using abstraction. otenthe images have a dotted ine border This is not part of the image but just indicates the edge of A3 instance image 2 would have an x and y length to be xrmar and Y2max respectively. Lastly, you can assume the images are digital. olutions. Partial credit will be Points will be given based on creativity and clarity and complete given (you don't need to complete both problems). 1. Translational registration: Create a process that bines image 1 and 2 such that they are aligned and image 1 is "in front" of image 2. The images are grayscale each pixel is ranges from 0 to 256.0 white, 256 black). Each image has 4 identical, black squares that can be used to align the images. Each square is 3x3 and pure black (256). They are arranged in a rectangle where the top left pixel of the top left box is L in the x direction and and Ly in the y direction from the top left pixel of the bottom right square. You do not know beforehand, where the squares are in relation to the borders of the image or the content of the image. You can assume there are no other features on the image that look like the alignment squares Image 1 Image 2. New Image Note: borders of image have increased in size

Explanation / Answer

Solution :

The solution is obtained using MATLAB :

% The image is read through the imgread ()
% The gray transfomation is obtained using rgb2gray ().
% the built in convolution function conv () to convolve the source image with the Sobel kernels .

function Sobel ( img )

% Read in the image and convert to gray
orig = imgread ( img ) ;
grayscale = rgb2gray ( orig ) ;

% To Display the original and gray image
image (1) ;
imgshow ( grayscale ) ;
image(2) ;
imgshow ( orig ) ;

% Defining the Sobel kernels
k_v = [ -1 0 1; -2 0 2; -1 0 1];
k_h = [1 2 1; 0 0 0; -1 -2 -1];

% By Convolve the gray image with Sobel kernels , the results are stored in x1 and x2
x1 = conv2 ( double ( grayscale ) , double ( k_v ) ) ;
x2 = conv2 ( double ( grayscale ) , double ( k_h ) ) ;

% Display the horizontal edges and vertical edges separately
image (3) ;
imgshow ( abs ( x1 ) , []) ;
image (4) ;
imshow ( abs ( x2 ) , []) ;

% To display the normalized vertical and horizontal edges combined
image(5) ;
imgshow (( x1 .^2+ x2 .^2) .^0.5 , []) ;
end