why i cannot get full database?

hi matlab community, ask shown in figure below, the matlab database did not show full database . it just shown []. Can someone help me? this is for my FYP. Can see coding attach. I really appreciate your help!

4 件のコメント

Nikhil
Nikhil 2023 年 6 月 6 日
Hey,
What does Dmos.mat file contains? And can you provide it.
Govind KM
Govind KM 2023 年 6 月 6 日
Hi Rachel,
The output of the code you have shared would be the same as your image, there is no error as far as i can see. What output are you expecting?
RACHEL LYN JAHIRIN
RACHEL LYN JAHIRIN 2023 年 6 月 6 日
i expect to get the number of distortion classes. which is 1-jpeg, 2-jp2k, 3-whitenoise, 4-gblur, 5-fastfading.
RACHEL LYN JAHIRIN
RACHEL LYN JAHIRIN 2023 年 6 月 6 日
can see the attach file. the dmos.mat file

サインインしてコメントする。

回答 (1 件)

Govind KM
Govind KM 2023 年 6 月 7 日

0 投票

Hi Rachel,
I am assuming that you want the third column of the table to be filled with the distortion class as per your code. However, you have filled the first column correctly in your code by adding the previous index value to the row index, but you haven't done the same for when you assign values to the third column. So the corrected code would be as follows.
load('dmos.mat');
FYPdatabase=cell(numel(dmos),4);
FYPdatabase(:,2)=num2cell(dmos);
addpath('C:\Users\User\Desktop\LIVE database\databaserelease2\fastfading');
for i=1:174
A=imread(sprintf('img%d.bmp',i));
A1=rgb2gray(A);
A2=double(A1);
FYPdatabase{i,1}=A2;
FYPdatabase{i,3}=5;
end
addpath('C:\Users\User\Desktop\LIVE database\databaserelease2\gblur');
for i=1:174
A=imread(sprintf('img%d.bmp',i));
A1=rgb2gray(A);
A2=double(A1);
FYPdatabase{174+i,1}=A2;
FYPdatabase{174+i,3}=4; %Corrected row index
end
addpath('C:\Users\User\Desktop\LIVE database\databaserelease2\jp2k');
for i=1:227
A=imread(sprintf('img%d.bmp',i));
A1=rgb2gray(A);
A2=double(A1);
FYPdatabase{348+i,1}=A2;
FYPdatabase{348+i,3}=2; %Corrected row index
end
addpath('C:\Users\User\Desktop\LIVE database\databaserelease2\jpeg');
for i=1:233
A=imread(sprintf('img%d.bmp',i));
A1=rgb2gray(A);
A2=double(A1);
FYPdatabase{575+i,1}=A2;
FYPdatabase{575+i,3}=1; %Corrected row index
end
addpath('C:\Users\User\Desktop\LIVE database\databaserelease2\wn');
for i=1:174
A=imread(sprintf('img%d.bmp',i));
A1=rgb2gray(A);
A2=double(A1);
FYPdatabase{808+i,1}=A2;
FYPdatabase{808+i,3}=3; %Corrected row index
end

カテゴリ

ヘルプ センター および File ExchangeMatrix Indexing についてさらに検索

製品

リリース

R2023a

質問済み:

2023 年 6 月 6 日

回答済み:

2023 年 6 月 7 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by