Hi
I have the following code i want to convert images jpg (TrainingData) into cell arrays ,where each cell containing a 28-by-28 matrix representing a synthetic image of fingerprint
dataDir= fullfile('Data/');exts = {'.jpg','.png','.tif','BMP'}; imds = imageDatastore(fullfile(dataDir),...'IncludeSubfolders',true,'FileExtensions','.jpg','LabelSource','foldernames');countEachLabel(imds); [TrainData, TestData] = splitEachLabel(imds, 0.5);size(TrainData);countEachLabel(TrainData);for i = 1:numImages img = readimage(TrainData, i); img = imbinarize(img); end
Best Answer