Filter löschen
Filter löschen

How do I load my Dataset using ImageDatastore correctly ?

1 Ansicht (letzte 30 Tage)
Chidiebere Ike
Chidiebere Ike am 29 Mär. 2018
Bearbeitet: Pablo Dias am 30 Aug. 2018
I tried loading my Dataset via my file path using imageDatastore function as stated in the code below. My Folder 'Frontal Face Dataset' and each image in my folder is labelled 'image_0001 to image_0450'
imgRGB = imageDatastore('C:\Users\Frontal Face Dataset\*.jpg')
  • _ I am getting error below_*
imgRGB = ImageDatastore with properties: Files: { 'C:\Users\Frontal Face Dataset\image_0001.jpg' } ReadSize: 1 Labels: {} ReadFcn: @readDatastoreImage Array formation and parentheses-style indexing with objects of class 'matlab.io.datastore.ImageDatastore' is not allowed. Use objects of class 'matlab.io.datastore.ImageDatastore' only as scalars or use a cell array.
Error in demoEfficentLBP (line 6) img = imgRGB(:, :, 0);
Can anyone please help me here.
Thanks Ike
  1 Kommentar
Pablo Dias
Pablo Dias am 30 Aug. 2018
Bearbeitet: Pablo Dias am 30 Aug. 2018
Just try
imds = imageDatastore('C:\Users\Frontal Face Dataset');
imgRGB = imds.read;
Once it works you can fiddle with the options.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by