Effacer les filtres
Effacer les filtres

create my .mat file

1 vue (au cours des 30 derniers jours)
J A
J A le 22 Avr 2019
Hello!
I saw the next tutorial: https://www.mathworks.com/videos/object-recognition-deep-learning-and-machine-learning-for-computer-vision-121144.html.
At the Demo 2 was doing with deep lerning a food detection. For this was use a .mat file.
I want to use the code for road sign detection but I don't know how to create my .mat file.
I have 25 images for input and I want to do a .mat file.
I searched on Internet and I found the following code.
%Generate mat file
srcFile = dir('..\ROAD-SIGN\*.jpg')
result = cell(1,length(srcFile))
for i = 1 : length(srcFile)
filename = strcat('...\ROAD-SIGN\',srcFile(i).name)
I = imread(filename);
%figure, imshow(I);
I = imresize(I,[273 273]);
result{i} = I;
%figure, imshow(result{i});
end
save images1.mat, result;
length(srcFile)
load('images1.mat')
for j = 1:length(srcFile)
figure, imshow(result{j});
end
%Read mat file
for j =1 :length(srcFile)
filename = strcat('...\ROAD-SIGN\',srcFile(j).name);
I = imread(filename);
a='I';
input = load('images1.mat',a);
figure, imshow(input.(a));
end
whos -file images1.mat
But it isn't working because in the main program is useing the layer attribut. In my code for a .mat file I don't have the layer attribute.
Can anyone help me with a solution, please?

Réponses (0)

Catégories

En savoir plus sur Image Data Workflows dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by