Store image into array for classification training (SOM)

조회 수: 2 (최근 30일)
Justin
Justin 2022년 11월 6일
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