QuestionQuestion

Transcribed TextTranscribed Text

Consider the one dimensional image restoration problem of finding f = (fi /n) € R" such that is minimized, where d € R" is the obtained data (blurred image), K is the given blurring matrix, and Ja is the approximate Tikhonov Total Variation function (see Lecture Note for more details). This problem can be solved by the Picard iteration Set m = 0. A.z. = 1, f = zeros(in), A/ = ones(n). while > € m=m+1 evaluate L(fm). Solve [KTK + - KTd - Update end where at each step L(f) D'diag(©2 -1 1 D and -1 1 Q (Notice that we have simplified the computations by setting Ar = 1). Problem: Write a program in MATLAB/Julia that does the following tasks: 1. Set n = 100 and set forg = (fi fr) by 7 [1,10] [11,25] 26,45 46,55 56, 70] 71,80 [81,90] [91,100] f; 0.2 0.7 0.4 0.6 0.8 0.2 0.5 0.4 2. Set m = 2 and find the (sparse) matrix K = by Rig - my/2w exp ( (1-1) = 0, otherwise. 3. Generate the blurred image d from the original image f by the following command (in Julia) d = K*f+0.01*rand(n) (in MATLAB) d = K*f+0.01*rand(n, 1); 4. Use E = 10-4, 3 = 10-5 and select two values a of your choice in the interval [10-3,1] to find the (reconstruction) image / with the algorithm above. 5. For each value of a, plot the original image forg: the blurred image d. and the reconstruction f in the same figure. 1 Instructions: Please submit your assignments with hard copy or a SINGLE PDF that includes: the program and all figures. Help & Tips: Sparse matrices work just like regular ones, i.e., you can add, subtract, multiply, etc. See examples below for how to generate sparse matrices. # Julia # MATLAB n 100; n = 100; A spzeros(n,n); A sparse(n,n); for i=1:n for i=1:n A[i,i]=-1; A(i, i)=-1; end end 2

Solution PreviewSolution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

clear; clc; close all;
global beta epsil
%Original image
f_org=[0.2*ones(1,10), 0.7*ones(1,20),0.4*ones(1,15),0.6*ones(1,10),0.8*ones(1,15),0.2*ones(1,10),0.5*ones(1,10),0.4*ones(1,10)]';%Original 1D image
n=length(f_org);
m=2;
%Generate the blurring sparse kernel
K=zeros(n,n);
for i=1:n
    for j=1:n
       if abs(i-j)<=2*m
            K(i,j)=(1/(m*sqrt(2*pi)))*exp(-(i-j)^2/(2*m^2));
       end
    end
end
%Generate blurred image
d=K*f_org+0.01*rand(n,1);
%Reconstruct image
epsil=1e-4; beta=1e-5;
alpha1=0.1; alpha2=0.002;
f_reconstructed_alph1=picardSolve(d,K,alpha1);
plotResults(f_org,d,f_reconstructed_alph1,alpha1);
f_reconstructed_alph1=picardSolve(d,K,alpha2);
plotResults(f_org,d,f_reconstructed_alph1,alpha2);...

By purchasing this solution you'll be able to access the following files:
Solution.zip.

$50.00
for this solution

or FREE if you
register a new account!

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available MATLAB for Mathematics Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats