Write the code in mathlab
Homework 5-Arrays and Images Function Name: beMemeValentine Inputs 1. (char) The filename of the main image, including the file extension 2. (char) The fillename of the background image, including the file extension None File Outputs: . The edited image Background Valentne's Day is right around the corner, and you realize you don't have anything for the outie in your 1371 recitationl Good thing you have MATLAB to confess your love in the best form-memes Function Description: Write a function that replaces the background color of the main image with the cormesponding pixels in the background image. Resize the background image to the size of the main image. To find the background color of the main image, find the RGB values of the top lof pixel. The nane of the output image should be the onginal name of the main image before the with png appended Notes Resize the images before masking e The input flenames will always have the extension .png . The solution function will output a fle with the original name, minus the fie extension, with Mene soln.png' appended Hints e The inresize() function will be useful Thy puting two names as the third and fouirth Inputs in the solution funcion! (You don't need to implement this part into your function.) Homework 5-Arrays and Images Function Name: beMemeValentine Inputs 1. (char) The filename of the main image, including the file extension 2. (char) The fillename of the background image, including the file extension None File Outputs: . The edited image Background Valentne's Day is right around the corner, and you realize you don't have anything for the outie in your 1371 recitationl Good thing you have MATLAB to confess your love in the best form-memes Function Description: Write a function that replaces the background color of the main image with the cormesponding pixels in the background image. Resize the background image to the size of the main image. To find the background color of the main image, find the RGB values of the top lof pixel. The nane of the output image should be the onginal name of the main image before the with png appended Notes Resize the images before masking e The input flenames will always have the extension .png . The solution function will output a fle with the original name, minus the fie extension, with Mene soln.png' appended Hints e The inresize() function will be useful Thy puting two names as the third and fouirth Inputs in the solution funcion! (You don't need to implement this part into your function.)