demo_denoising_one_lambda

PURPOSE ^

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 
0002 fc = 45;
0003 
0004 clc;
0005 echo off;
0006 
0007 if (isempty(who('Id')))
0008    disp('To run this script there should be an image named Id in the workspace.');
0009    disp('Id should contain the degraded image.');
0010    disp('apply_degradation.m  can be used to simulate several degradations');
0011    disp('For instace:');
0012    disp('    load barbara256');
0013    disp('    [Id,PSF]=apply_degradetion(Im,''blur_gn'',0.3,400);');
0014    return;
0015 end
0016 
0017 Val_min = 0.001;
0018 
0019 lim_frec = [0 3];
0020 
0021 vari = 400;
0022 
0023 [W,PSF,H,noise,Blurred]=degrade2(rand(256),fc,Val_min,lim_frec,vari);
0024 
0025 Nlambdas = 1;
0026 lambdas = 4;
0027 
0028 disp(['Restoring image using L2 (' num2str(Nlambdas) ' values of lambda)']);
0029 
0030 imrl2=restore(Id,'L2',PSF,lambdas);
0031 
0032 figure;
0033 imshow(imrl2/255);
0034 title('Restored (L2)');
0035 
0036 disp('Press any key...');
0037 pause;
0038 
0039 disp(['Restoring image using CSF (' num2str(Nlambdas) ' values of lambda)']);
0040 
0041 imrcsf=restore(Id,'CSF',PSF,lambdas);
0042 
0043 figure;
0044 imshow(imrcsf/255);
0045 title('Restored (CSF)');
0046 
0047 disp('Press any key...');
0048 pause;
0049 
0050 disp(['Restoring image using AR4 (' num2str(Nlambdas) ' values of lambda)']);
0051 
0052 imrar4=restore(Id,'AR4',PSF,lambdas);
0053 
0054 figure;
0055 imshow(imrar4/255);
0056 title('Restored (AR4)');
0057 
0058 disp('Press any key...');
0059 pause;
0060 
0061 disp(['Restoring image using AR8 (' num2str(Nlambdas) ' values of lambda)']);
0062 
0063 imrar8=restore(Id,'AR8',PSF,lambdas);
0064 
0065 figure;
0066 imshow(imrar8/255);
0067 title('Restored (AR8)');
0068 
0069 disp('Press any key...');
0070 pause;
0071 
0072 disp(['Restoring image using AR12 (' num2str(Nlambdas) ' values of lambda)']);
0073 
0074 imrar12=restore(Id,'AR12',PSF,lambdas);
0075 
0076 figure;
0077 imshow(imrar12/255);
0078 title('Restored (AR12)');
0079 
0080 disp('Press any key...');
0081 pause;
0082 
0083 disp(['Restoring image using PERCEPTUAL (' num2str(Nlambdas) ' values of lambda)']);
0084 
0085 imrper=restore(Id,'PER',PSF,lambdas);
0086 
0087 figure;
0088 imshow(imrper/255);
0089 title('Restored (PERCEPTUAL)');
0090 
0091

Generated on Fri 07-Mar-2014 13:28:33 by m2html © 2005