Hi, I was looking for some opensource material for computing image quality metrics such as VSIM, VIF etc. and came across your repo. As instructed in the readme, I ran the configure_metric_mux. The search path is appended successfully, however when test_metric_mux is called from within the configure_metic_mux file there are a few errors in testing the algorithms. As shown below the errors occur in MSSIM, VSNR, VIF, and lastly IFC:
>> configure_metrix_mux
Setting MeTriX MuX path...[Done!]
Compiling list of compilations routines...1 found...[Done!]
Executing compilation routines...
1 - compile_metrix_vsnr
Building VSNR MEX interface for DWT...(Linux/Mac)... [Not Supported!]
Defaulting to Matlab-based DWT...[Success!]
[Done!]
Algorithm mse computed successfully!
Algorithm psnr computed successfully!
Algorithm ssim computed successfully!
Error [test_metrix_mux]: algorithm mssim did not compute correctly!
Error [test_metrix_mux]: algorithm vsnr did not compute correctly!
Error [test_metrix_mux]: algorithm vif did not compute correctly!
Algorithm vifp computed successfully!
Algorithm uqi computed successfully!
Error [test_metrix_mux]: algorithm ifc did not compute correctly!
Algorithm nqm computed successfully!
Algorithm wsnr computed successfully!
Algorithm snr computed successfully!
Total error count: 4
>>
I debugged the code and found the issue to be less number of parameters than expected. The call to mssim_index in metrix_mssim.m provides only two parameters namely reference_image, query_image:
|
function [metrix_value] = metrix_mssim(reference_image, query_image) |
|
|
|
metrix_value = mssim_index( reference_image, query_image ); |
Upon looking into the code or mssim_index one notices that there are five input arguments required:
|
function [mssim, comp, detail] = mssim_index(img1, img2, nlevs,K,lpf) |
However, only two arguments were provided. Further down below there are a few try catch statements:
|
try |
|
K = K; |
|
catch |
|
% Default SSIM parameters (assumes L=255) |
|
K = [0.01 0.03]; |
|
end |
and
|
try |
|
lpf = lpf; |
|
catch |
|
% Use Analysis Low Pass filter from Biorthogonal 9/7 Wavelet |
|
lod = [0.037828455507260; -0.023849465019560; -0.110624404418440; ... |
|
0.377402855612830; 0.852698679008890; 0.377402855612830; ... |
|
-0.110624404418440; -0.023849465019560; 0.037828455507260]; |
|
lpf = lod*lod'; |
|
lpf = lpf/sum(lpf(:)); |
|
end |
I believe these lines imply default parameter values in case the parameters are not defined. That being said when I run the code even after the execution of the aforementioned lines, the workspace has no variable by the name
K or
lpf.
There is/are undoubtedly error(s) in the code. For the time being, I'm going to replace the lines:
|
try |
|
K = K; |
|
catch |
|
% Default SSIM parameters (assumes L=255) |
|
K = [0.01 0.03]; |
|
end |
and
|
try |
|
lpf = lpf; |
|
catch |
|
% Use Analysis Low Pass filter from Biorthogonal 9/7 Wavelet |
|
lod = [0.037828455507260; -0.023849465019560; -0.110624404418440; ... |
|
0.377402855612830; 0.852698679008890; 0.377402855612830; ... |
|
-0.110624404418440; -0.023849465019560; 0.037828455507260]; |
|
lpf = lod*lod'; |
|
lpf = lpf/sum(lpf(:)); |
|
end |
with
if ~exist('K','var')
K = [0.01 0.03]
end
and
if ~exist('lpf','var')
lod = [0.037828455507260; -0.023849465019560; -0.110624404418440; ...
0.377402855612830; 0.852698679008890; 0.377402855612830; ...
-0.110624404418440; -0.023849465019560; 0.037828455507260];
lpf = lod*lod';
lpf = lpf/sum(lpf(:));
end
So, what I am creating this issue for is to know whether these modifications are theoretically correct, as I do not want to make modifications to the code that I might end up regretting later.
Thanks a lot.
Hi, I was looking for some opensource material for computing image quality metrics such as
VSIM,VIFetc. and came across your repo. As instructed in the readme, I ran theconfigure_metric_mux. The search path is appended successfully, however whentest_metric_muxis called from within theconfigure_metic_muxfile there are a few errors in testing the algorithms. As shown below the errors occur inMSSIM,VSNR,VIF, and lastlyIFC:I debugged the code and found the issue to be less number of parameters than expected. The call to
mssim_indexinmetrix_mssim.mprovides only two parameters namelyreference_image,query_image:image-quality-tools/metrix_mux/metrix/metrix_mssim.m
Lines 40 to 42 in 163fff1
Upon looking into the code or
mssim_indexone notices that there are five input arguments required:image-quality-tools/metrix_mux/metrix/mssim/mssim_index.m
Line 56 in 163fff1
However, only two arguments were provided. Further down below there are a few try catch statements:
image-quality-tools/metrix_mux/metrix/mssim/mssim_index.m
Lines 72 to 77 in 163fff1
and
image-quality-tools/metrix_mux/metrix/mssim/mssim_index.m
Lines 79 to 88 in 163fff1
I believe these lines imply default parameter values in case the parameters are not defined. That being said when I run the code even after the execution of the aforementioned lines, the workspace has no variable by the name
Korlpf.There is/are undoubtedly error(s) in the code. For the time being, I'm going to replace the lines:
image-quality-tools/metrix_mux/metrix/mssim/mssim_index.m
Lines 72 to 77 in 163fff1
and
image-quality-tools/metrix_mux/metrix/mssim/mssim_index.m
Lines 79 to 88 in 163fff1
with
and
So, what I am creating this issue for is to know whether these modifications are theoretically correct, as I do not want to make modifications to the code that I might end up regretting later.
Thanks a lot.