%% Create a step monitor system object
% ISTA iteratively approaches to the optimum solution. In order to
% observe the intermediate results, the following class can be used:
%
% * saivdr.utility.StepMonitoringSystem
% Parameters for StepMonitoringSystem
isverbose = true; % Verbose mode
isvisible = true; % Monitor intermediate results
hfig2 = figure(2); % Figure to show the source, observed and result image
hfig2.Name = 'ISTA-based Image Restoration';
% Instantiation of StepMonitoringSystem
import saivdr.utility.StepMonitoringSystem
stepmonitor = StepMonitoringSystem(...
'DataType', 'Image',...
'SourceImage', orgImg,... % Original image
'ObservedImage', obsImg,... % Observed image
'IsMSE', false,... % Switch for MSE evaluation
'IsPSNR', true,... % Switch for PSNR evaluation
'IsSSIM', false,... % Switch for SSIM evaluation
'IsVerbose', isverbose,... % Switch for verbose mode
'IsVisible', isvisible,... % Switch for display intermediate result
'ImageFigureHandle',hfig2); % Figure handle
% Set the object to the ISTA system object
ista.StepMonitor = stepmonitor;
%% Perform ISTA-based image restoration
% STEP method of IstaImRestoration system object, _ista_ , executes
% the ISTA-based image restoration to deblur the observed image.
% As the result, a restored image
%
% $\hat{\mathbf{u}} = \mathbf{D}\hat{\mathbf{y}}$
%
% is obtained.
fprintf('\n ISTA')
resImg = ista.step(obsImg); % STEP method of IstaImRestoration
%% Extract the final evaluation
% The object of StepMonitoringSystem, _stepmonitor_ , stores the
% evaluation values calculated iteratively in ISTA as a vector. The GET
% method of _stepmonitor_ can be used to extract the number of iterations
% and the sequence of PSNRs.
nItr = stepmonitor.nItr;
psnrs = stepmonitor.PSNRs;
psnr_ista = psnrs(nItr);
%% Perform Wiener filtering
% As a reference, let us show a result of Wiener filter.
% Create a step monitor system object for the PSNR evaluation
stepmonitor = StepMonitoringSystem(...
'SourceImage',orgImg,...
'MaxIter', 1,...
'IsMSE', false,...
'IsPSNR', true,...
'IsSSIM', false,...
'IsVisible', false,...
'IsVerbose', isverbose);
% Use the same blur kernel as that applied to the observed image, obsImg
blurKernel = blur.BlurKernel;
% Estimation of noise to signal ratio
nsr = noise_var/var(orgImg(:));
% Wiener filter deconvolution of Image Processing Toolbox
wnfImg = deconvwnr(obsImg, blurKernel, nsr);
% Evaluation
fprintf('\n Wiener')
psnr_wfdc = stepmonitor.step(wnfImg); % STEP method of StepMonitoringSystem
%% Compare deblurring performances
% In order to compare the deblurring performances between two methods,
% ISTA-based deblurring with NSOLT and Wiener filter, let us show
% the original, observed and two results in one figure together.
hfig3 = figure(3);
% Original image x
subplot(2,2,1)
imshow(orgImg)
title('Original image {\bf u}')
% Observed image u
subplot(2,2,2)
imshow(obsImg)
title('Observed image {\bf x}')
% Result u^ of ISTA
subplot(2,2,3)
imshow(resImg)
title(['{\bf u}\^ by ISTA : ' num2str(psnr_ista) ' [dB]'])
% Result u^ of Wiener filter
subplot(2,2,4)
imshow(wnfImg)
title(['{\bf u}\^ by Wiener: ' num2str(psnr_wfdc) ' [dB]'])
%% Create a step monitor system object
% ISTA iteratively approaches to the optimum solution. In order to
% observe the intermediate results, the following class can be used:
%
% * saivdr.utility.StepMonitoringSystem
% Parameters for StepMonitoringSystem
isverbose = true; % Verbose mode
isvisible = true; % Monitor intermediate results
hfig2 = figure(2); % Figure to show the source, observed and result image
uiki Kobayashi, Shogo Muramatsu, Shunsuke Ono, "Proximal Gradient-Based Loop Unrolling with Interscale Thresholding," Proc. Assoc. Annual Summit and Conf. (APSIPA ASC), Dec. 2021
Genki Fujii, Yuta Yoshida, Shogo Muramatsu, Shunsuke Ono, Samuel Choi, Takeru Ota, Fumiaki Nin, Hiroshi Hibino, "OCT Volumetric Data Restoration with Latent Distribution of Refractive Index," Proc. of 2019 IEEE International Conference on Image Processing (ICIP), pp.764-768, Sept. 2019
Yuhei Kaneko, Shogo Muramatsu, Hiroyasu Yasuda, Kiyoshi Hayasaka, Yu Otake, Shunsuke Ono, Masahiro Yukawa, "Convolutional-Sparse-Coded Dynamic Mode Decompsition and Its Application to River State Estimation," Proc. of 2019 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp.1872-1876, May 2019
Shogo Muramatsu, Samuel Choi, Shunske Ono, Takeru Ota, Fumiaki Nin, Hiroshi Hibino, "OCT Volumetric Data Restoration via Primal-Dual Plug-and-Play Method," Proc. of 2018 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp.801-805, Apr. 2018
Shogo Muramatsu, Kosuke Furuya and Naotaka Yuki, "Multidimensional Nonseparable Oversampled Lapped Transforms: Theory and Design," IEEE Trans. on Signal Process., Vol.65, No.5, pp.1251-1264, DOI:10.1109/TSP.2016.2633240, March 2017
Kota Horiuchi and Shogo Muramatsu, "Fast convolution technique for Non-separable Oversampled Lapped Transforms," Proc. of Asia Pacific Signal and Information Proc. Assoc. Annual Summit and Conf. (APSIPA ASC), Dec. 2016
Shogo Muramatsu, Masaki Ishii and Zhiyu Chen, "Efficient Parameter Optimization for Example-Based Design of Non-separable Oversampled Lapped Transform," Proc. of 2016 IEEE Intl. Conf. on Image Process. (ICIP), pp.3618-3622, Sept. 2016
Shogo Muramatsu, "Structured Dictionary Learning with 2-D Non-separable Oversampled Lapped Transform," Proc. of 2014 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp.2643-2647, May 2014
Kousuke Furuya, Shintaro Hara and Shogo Muramatsu, "Boundary Operation of 2-D non-separable Oversampled Lapped Transforms," Proc. of Asia Pacific Signal and Information Proc. Assoc. Annual Summit and Conf. (APSIPA ASC), Nov. 2013
Shogo Muramatsu and Natsuki Aizawa, "Image Restoration with 2-D Non-separable Oversampled Lapped Transforms," Proc. of 2013 IEEE International Conference on Image Process. (ICIP), pp.1051-1055, Sep. 2013
Shogo Muramatsu and Natsuki Aizawa, "Lattice Structures for 2-D Non-separable Oversampled Lapped Transforms," Proc. of 2013 IEEE International Conference on Acoustics, Speech and Signal Process. (ICASSP), pp.5632-5636, May 2013