フィルターのクリア

Why aren't i able to create database to store extracted values?

3 ビュー (過去 30 日間)
Elias Unk
Elias Unk 2017 年 6 月 20 日
コメント済み: Walter Roberson 2017 年 6 月 21 日
My goal is to that take a folder's path as input and extract the features of every image and place it in a file to create a matrix of feature vectors of each sample , each row represent the parameters of a different sample and each column represent a different feature.
image_folder = 'C:\Users\...';
filenames = dir(fullfile(image_folder, '*.jpg')); % read all images with specified extention, its jpg in our case
total_images = numel(filenames); % count total number of photos present in that folder
for n = 1:total_images
full_name= fullfile(image_folder, filenames(n).name);
our_images = imread(full_name);
%%%core features extraction code.....
Vecteur=[v1,v2,v3....v116];
normalized=zscore(Vecteur) ;
A{n} = normalized; % make A as a cell
end
save('features.mat','A'); % create database
The error i'm getting is
Cell contents assignment to a non-cell array object.

採用された回答

Walter Roberson
Walter Roberson 2017 年 6 月 20 日
At some point above that, you initialized A as numeric. Possibly you initialized
A = [];
You need to have A either not initialized at the beginning of the loop, or initialized as a cell array. At the very least,
A = {};
but better would be just before the loop,
A = cell(total_images, 1);
  2 件のコメント
Walter Roberson
Walter Roberson 2017 年 6 月 20 日
I recommend posting it here along with the complete error message.
Walter Roberson
Walter Roberson 2017 年 6 月 21 日
If you cannot post your source and you cannot post the error message, then you need to hire a consultant.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDatabase Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by