-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy patheval_brisque.m
More file actions
31 lines (24 loc) · 856 Bytes
/
eval_brisque.m
File metadata and controls
31 lines (24 loc) · 856 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
function eval_brisque(varargin)
p = inputParser;
addOptional(p, 'FolderPath', '', @(x) ischar(x) || isstring(x));
parse(p, varargin{:});
folder_path = p.Results.FolderPath;
if ~isempty(folder_path)
disp(['Folder path received: ', folder_path]);
files = dir(fullfile(folder_path, '*.png'));
images = cell(1, numel(files));
for i = 1:numel(files)
image_path = fullfile(folder_path, files(i).name);
images{i} = imread(image_path);
end
fprintf('Number of images: %d.\n', numel(images));
brisque_list = zeros(1,numel(images));
for i = 1:numel(images)
brisque_list(i) = brisque(images{i});
end
brisque_avg = mean(brisque_list);
brisque_avg
else
disp('No folder path provided.');
end
end