I also can't completely understand this line: digitData.ReadFcn = @(loc)imresize(imread(loc),[128 128],'nearest','Colormap','original'); But I found it in MathWorks documentation
CNN training and testing (resizing training images)
1 次查看(过去 30 天)
显示 更早的评论
Dear All,,, It's my first time to use the Convolutional Neural Net training commands. I'm using this line to resize my training images
Folder = '256_ObjectCategories'; digitData = imageDatastore(Folder,'IncludeSubfolders',true,'LabelSource','foldernames'); digitData.ReadFcn = @(loc)imresize(imread(loc),[128 128],'nearest','Colormap','original');
However, I still get this error:
Unexpected image size: All images must have the same size.
Any help please ?
回答(1 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!