Please see attached files.

1 answer below »
Please see attached files.


Essential Mathematics for Data Scientists Assessment 2B: Image compression code workbook After working through the image compression example in MATLAB we ask you to use MATLAB to do two items that when combined present a reconstructed version of an image using the SVD. 1. Write a MATLAB function called SVDcompress THAT will take two arguments: a filename and the number of singular values with which to reconstruct the image in the file. This time the function will reconstruct a colour image, rather than a greyscale image. The function will be defined like this: function outimage = SVDcompress(filename, Nretain) While you can use your code for any image, for this task the filename will be one of • prague-astronomical-clock-detail-871291743639AGq.jpg • boat-in-caribbean-14884763094mZ.jpg 2. Display images that are constructed using 5, 10, 50 and 100 singular values from the original dataset. You should be able to base your code for this task on that given in compress.m. The array outimage contains the information that is needed to generate the reconstructed image, which will be done outside the function. It will have three indicies, the last one, colour_ind, takes the value 1, 2 or 3 and caters for the three different base colours that are combined to form the image. Each base colour will have an SVD computed for it. The SVD is truncated by taking Nretain singular values and outimage is calculated by multiplying the retained components of the SVD: outimage(:,:,colour_ind) = Uret*Sret*Vret'. Here Uret, etc are the retained components of the original U, etc. This exercise forms part of your coding workbook. You need to include your code, (appropriately commented) and the output from the code (as in step 2 above).
Answered 2 days AfterJul 23, 2022

Answer To: Please see attached files.

Aditi answered on Jul 25 2022
59 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here