-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
118 changed files
with
7,392 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.asv |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
<deployment-project plugin="plugin.apptool" plugin-version="1.0"> | ||
<configuration build-checksum="3022029705" file="C:\Users\biagi\Documents\MATLAB\MIRO-master\App\MIRO_app.prj" location="C:\Users\biagi\Documents\MATLAB\MIRO-master\App" name="MIRO_app" target="target.mlapps" target-name="Package App"> | ||
<param.appname>MIRO_app</param.appname> | ||
<param.authnamewatermark>B. Mandracchia</param.authnamewatermark> | ||
<param.email /> | ||
<param.company /> | ||
<param.icon>${PROJECT_ROOT}\MIRO_app_resources\icon_24.png</param.icon> | ||
<param.icons> | ||
<file>${PROJECT_ROOT}\MIRO_app_resources\icon_48.png</file> | ||
<file>${PROJECT_ROOT}\MIRO_app_resources\icon_24.png</file> | ||
<file>${PROJECT_ROOT}\MIRO_app_resources\icon_16.png</file> | ||
</param.icons> | ||
<param.summary>MATLAB Graphical User Interface for MIRO noise correction</param.summary> | ||
<param.description /> | ||
<param.screenshot>C:\Users\biagi\AppData\Local\Temp\tp6677b93d_7e8b_4eca_83c9_d5ecd91e1423.png</param.screenshot> | ||
<param.version>1.0</param.version> | ||
<param.products.name /> | ||
<param.products.id /> | ||
<param.products.version /> | ||
<param.platforms> | ||
<item>win64</item> | ||
</param.platforms> | ||
<param.output>${PROJECT_ROOT}</param.output> | ||
<param.guid>fd3d6f83-e7c4-44f7-b209-b7753781f6e8</param.guid> | ||
<unset> | ||
<param.email /> | ||
<param.company /> | ||
<param.description /> | ||
<param.version /> | ||
<param.products.name /> | ||
<param.products.id /> | ||
<param.products.version /> | ||
<param.output /> | ||
</unset> | ||
<fileset.main> | ||
<file>${PROJECT_ROOT}\MIRO_app.mlapp</file> | ||
</fileset.main> | ||
<fileset.depfun> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\Imdecorr\apodImRect.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\Imdecorr\getCorrcoef.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\Imdecorr\getDcorr.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\Imdecorr\getDcorrMax.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\Imdecorr\getRadAvg.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\Imdecorr\im2pol.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\Imdecorr\linmap.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\Imdecorr\ResolutionFinder.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\MIRO.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\MIRO_functions\Fast Wiener\fast_wiener.mexw64</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\MIRO_functions\Fast Wiener\fast_wiener_video.mexw64</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\MIRO_functions\Fast Wiener\MIRO_Fast_Wiener.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\MIRO_functions\Fast Wiener\MIRO_Fast_Wiener_Video.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\MIRO_functions\FPN Correction\MIRO_FPN_correction.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\MIRO_functions\FPN Correction\MIRO_Hotspot.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\MIRO_functions\MIRO_Default_Parameters.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\MIRO_functions\MIRO_main.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\MIRO_functions\MIRO_parse_inputs.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\MIRO_functions\Multiscale Wiener\MIRO_Aggregation.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\MIRO_functions\Multiscale Wiener\MIRO_Collaborative_Wiener_dct.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\MIRO_functions\Multiscale Wiener\MIRO_Collaborative_Wiener_Initialization.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\MIRO_functions\Multiscale Wiener\MIRO_Needle_match.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\MIRO_functions\Multiscale Wiener\MIRO_patch_3DFiltering.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\MIRO_functions\Multiscale Wiener\MIRO_patch_matching_and_processing.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\MIRO_functions\NLM\MIRO_image2vectors_double.mexw64</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\MIRO_functions\NLM\MIRO_nlm.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\MIRO_functions\NLM\MIRO_vectors_nlmeans_double.mexw64</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\MIRO_functions\Shearlet Shrinkage\MIRO_Hotspot2.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\MIRO_functions\Shearlet Shrinkage\MIRO_Shearlet_thresholding.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\MIRO_functions\Shearlet Shrinkage\MIRO_SLcheckFilterSizes.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\MIRO_functions\Shearlet Shrinkage\MIRO_SLgetShearletSystem2D.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\MIRO_functions\Shearlet Shrinkage\MIRO_SLprepareFilters2D.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\MIRO_functions\Shearlet Shrinkage\MIRO_Spectral_weighting.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\MIRO_functions\Shearlet Shrinkage\MIRO_tophat.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\MIRO_utils\animated_comparison.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\MIRO_utils\Block_distance.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\MIRO_utils\cprintf.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\MIRO_utils\Define_SearchWindow.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\MIRO_utils\Display_results_percentage.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\MIRO_utils\Locate_blk.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\MIRO_utils\nrm.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\MIRO_utils\Pyramid.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\MIRO_utils\ReadTiff.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\MIRO_utils\removePad.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\MIRO_utils\Sigma_estimation.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\MIRO_utils\Spectral_filter.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\MIRO_utils\textprogressbar.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\ShearLab\dfilters.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\ShearLab\dmaxflat.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\ShearLab\MakeONFilter.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\ShearLab\mctrans.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\ShearLab\MirrorFilt.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\ShearLab\modulate2.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\ShearLab\SLdshear.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\ShearLab\SLfiltersToGPU2D.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\ShearLab\SLgetShearletIdxs2D.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\ShearLab\SLgetShearlets2D.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\ShearLab\SLgetWedgeBandpassAndLowpassFilters2D.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\ShearLab\SLpadArray.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\ShearLab\SLsheardec2D.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\ShearLab\SLshearrec2D.m</file> | ||
<file>C:\Users\biagi\Documents\MATLAB\MIRO-master\ShearLab\SLupsample.m</file> | ||
</fileset.depfun> | ||
<fileset.resources /> | ||
<fileset.package /> | ||
<build-deliverables> | ||
<file location="C:\Users\biagi\Documents\MATLAB\MIRO-master" name="App" optional="false">C:\Users\biagi\Documents\MATLAB\MIRO-master\App</file> | ||
</build-deliverables> | ||
<workflow /> | ||
<matlab> | ||
<root>C:\Program Files\MATLAB\R2021b</root> | ||
<toolboxes> | ||
<toolbox name="matlabcoder" /> | ||
<toolbox name="neuralnetwork" /> | ||
</toolboxes> | ||
<toolbox> | ||
<matlabcoder> | ||
<enabled>true</enabled> | ||
</matlabcoder> | ||
</toolbox> | ||
<toolbox> | ||
<neuralnetwork> | ||
<enabled>true</enabled> | ||
</neuralnetwork> | ||
</toolbox> | ||
</matlab> | ||
<platform> | ||
<unix>false</unix> | ||
<mac>false</mac> | ||
<windows>true</windows> | ||
<win2k>false</win2k> | ||
<winxp>false</winxp> | ||
<vista>false</vista> | ||
<linux>false</linux> | ||
<solaris>false</solaris> | ||
<osver>10.0</osver> | ||
<os32>false</os32> | ||
<os64>true</os64> | ||
<arch>win64</arch> | ||
<matlab>true</matlab> | ||
</platform> | ||
</configuration> | ||
</deployment-project> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
%% MIRO Demo | ||
% Demo file to demonstrate MIRO processing workflow. You can modify this | ||
% code and use with your own data. | ||
|
||
%% Load Data | ||
|
||
% Paths | ||
FilePath_calibration = '.\Calibration_files\'; | ||
FilePath_data = '.\Raw_data\'; | ||
SavePath = '.\Results\'; | ||
|
||
% Load calibration data | ||
load([FilePath_calibration, 'sCMOS_calibration.mat'],'Offset','Var','Gain'); | ||
Var = Var./(Gain^2); | ||
|
||
% Load shearlet system | ||
% This is not necessary but it can speed up processing if MIRO is called | ||
% more than once. If you don't want to use it, just put shearletSystem = [] | ||
% or remove the corresponding line in the MIRO options | ||
shearletSystem = getSLsys(Offset, 6); | ||
|
||
% load colormap | ||
load([FilePath_calibration, 'cmap.mat'],'glow'); | ||
|
||
% load images | ||
D = dir([FilePath_data '\*.mat']); | ||
|
||
% experimental parameters | ||
expT = [10 20 50 100]; | ||
lambda_ch1 = .461; | ||
lambda_ch2 = .512; | ||
lambda_ch3 = .599; | ||
|
||
% load reference image | ||
load('.\GT\GT'); | ||
|
||
S = zeros(length(expT),2,3); | ||
P = zeros(length(expT),2,3); | ||
|
||
for i = 1:length(D) | ||
|
||
disp(i) | ||
load([D(i).folder '\' D(i).name]); | ||
|
||
%% MIRO | ||
|
||
[miro1, Parameters] = MIRO(im1, ... | ||
'Offset',Offset,... | ||
'Gain',Gain,... | ||
'Var',Var,... | ||
'Lambda',lambda_ch1,... | ||
'DisplayImages',1, ... | ||
'Mode','s',... | ||
'h',6,... | ||
'Exp_time',expT(i)/1e3,... | ||
'shearletSystem',shearletSystem); | ||
colormap(glow) | ||
title(['Channel 1, T = ' num2str(expT(i)) ' ms']) | ||
pause(.01) | ||
|
||
miro2 = MIRO(im2,... | ||
'Offset',Offset,... | ||
'Gain',Gain,... | ||
'Var',Var,... | ||
'Lambda',lambda_ch2,... | ||
'DisplayImages',1,... | ||
'Mode','s',... | ||
'h',4,... | ||
'Exp_time',expT(i)/1e3,... | ||
'shearletSystem',shearletSystem); | ||
colormap(glow) | ||
title(['Channel 2, T = ' num2str(expT(i)) ' ms']) | ||
pause(.01) | ||
|
||
miro3 = MIRO(im3,... | ||
'Offset',Offset,... | ||
'Gain',Gain,... | ||
'Var',Var,... | ||
'Lambda',lambda_ch3,... | ||
'DisplayImages',1,... | ||
'Mode','s',... | ||
'h',4,... | ||
'Exp_time',expT(i)/1e3,... | ||
'k',0,... | ||
'shearletSystem',shearletSystem); | ||
colormap(glow) | ||
title(['Channel 3, T = ' num2str(expT(i)) ' ms']) | ||
pause(.01) | ||
|
||
%% Calculate SSIM & PSNR | ||
|
||
S_mean_ch1(1) = calculate_SSIM(gt1,im1); | ||
S_mean_ch1(2) = calculate_SSIM(gt1,miro1); | ||
|
||
S_mean_ch2(1) = calculate_SSIM(gt2,im2); | ||
S_mean_ch2(2) = calculate_SSIM(gt2,miro2); | ||
|
||
S_mean_ch3(1) = calculate_SSIM(gt3,im3); | ||
S_mean_ch3(2) = calculate_SSIM(gt3,miro3); | ||
|
||
|
||
P_mean_ch1(1) = calculate_PSNR(gt1,im1); | ||
P_mean_ch1(2) = calculate_PSNR(gt1,miro1); | ||
|
||
P_mean_ch2(1) = calculate_PSNR(gt2,im2); | ||
P_mean_ch2(2) = calculate_PSNR(gt2,miro2); | ||
|
||
P_mean_ch3(1) = calculate_PSNR(gt3,im3); | ||
P_mean_ch3(2) = calculate_PSNR(gt3,miro3); | ||
|
||
S(i,:,1) = S_mean_ch1; | ||
P(i,:,1) = P_mean_ch1; | ||
S(i,:,2) = S_mean_ch2; | ||
P(i,:,2) = P_mean_ch2; | ||
S(i,:,3) = S_mean_ch3; | ||
P(i,:,3) = P_mean_ch3; | ||
|
||
%% Save | ||
save(fullfile(SavePath,['MIRO_' num2str(expT(i),'%1.4u')]), 'miro1','miro2','miro3','Parameters',... | ||
'P_mean_ch1','P_mean_ch2','P_mean_ch3','S_mean_ch1','S_mean_ch2','S_mean_ch3'); | ||
|
||
options.overwrite = true; | ||
saveastiff(uint16(miro1),fullfile(SavePath,['MIRO_' num2str(expT(i),'%1.4u') '_ch1.tif']),options); | ||
saveastiff(uint16(miro2),fullfile(SavePath,['MIRO_' num2str(expT(i),'%1.4u') '_ch2.tif']),options); | ||
saveastiff(uint16(miro3),fullfile(SavePath,['MIRO_' num2str(expT(i),'%1.4u') '_ch3.tif']),options); | ||
|
||
end | ||
|
||
%% Display results | ||
f = figure('Name','Measured SSIM & PSNR','NumberTitle','off'); | ||
f.Position(3:4) = [700 420]; f.Color = [1 1 1]; | ||
tiledlayout(2,3); | ||
for i = 1:3 | ||
nexttile | ||
plot(expT,S(:,:,i),'o','MarkerFaceColor','auto','LineWidth',2) | ||
title(['Channel ' num2str(i)]) | ||
ylabel SSIM | ||
xlabel 'Exp. Time (ms)' | ||
set(gca,'TickDir','out','FontSize',10,'Box','off') | ||
end | ||
for i = 1:3 | ||
nexttile | ||
plot(expT,P(:,:,i),'o','MarkerFaceColor','auto','LineWidth',2) | ||
ylabel PSNR | ||
xlabel 'Exp. Time (ms)' | ||
set(gca,'TickDir','out','FontSize',10,'Box','off') | ||
end |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
function [S_mean, S_std, S] = calculate_PSNR(ref,im) | ||
|
||
|
||
ref = nrm(ref); | ||
im = nrm(im); | ||
|
||
|
||
for idx = 1:size(im,3) | ||
S(idx) = psnr(ref,im(:,:,idx)); | ||
end | ||
|
||
S_mean = mean(S); | ||
S_std = std(S); | ||
|
||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
function [S_mean, S_std, S] = calculate_SSIM(ref,im) | ||
|
||
|
||
ref = nrm(ref); | ||
im = nrm(im); | ||
|
||
|
||
for idx = 1:size(im,3) | ||
S(idx) = ssim(ref,im(:,:,idx)); | ||
end | ||
|
||
S_mean = mean(S); | ||
S_std = std(S); | ||
|
||
|
||
end |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.