Store image into array for classification training (SOM)

2 次查看(过去 30 天)
Hi there, i currently have over 7000 images that i want to train for classifcation of certain characters. I tried loading them into a matrix but it ends up as a 3D array like this:
arrayImage 128x128x7112 double
clear,clc;
files = dir('*.png');
num = length(files);
arrayImage = zeros(128,128,num);
i = 1;
for file = files'
img = imread(file.name);
arrayImage(:,:,i) = img;
i = i + 1;
end
I think matlab's neural net clustering only reads in a 2D matrix. How can i store them as a 2D array so i can load them into SOM for training. I attached some examples of images i want to store and use for training.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Image Data Workflows 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by