Why do I have this error when using indexImages ??

조회 수: 1 (최근 30일)
amal fahad
amal fahad 2016년 11월 25일
댓글: amal fahad 2016년 11월 26일
When I tried ti run this code which I copied from MATLAB documentation:
setDir = fullfile(toolboxdir('vision'),'visiondata','imageSets','cups');
imds = imageDatastore(setDir);
imageIndex = indexImages(imds);
I got this error
Error using indexImages
Expected input number 1, imgSet, to be one of these types:
imageSet
Instead its type was matlab.io.datastore.ImageDatastore.
Error in indexImages>parseInputs (line 125)
validateattributes(imgSet, {'imageSet'},{'scalar'}, mfilename, 'imgSet',1);
Error in indexImages (line 99)
[bag, params] = parseInputs(imgSet, varargin{:});
Why? could anyone please clarify? I'm pretty novice in MATLAB, so I would be grateful if you give me very clear answer. Thanks.
  댓글 수: 2
Walter Roberson
Walter Roberson 2016년 11월 25일
Odd.
Which MATLAB release are you using?
amal fahad
amal fahad 2016년 11월 26일
Thanks for the reply Im using R2016a

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2016년 11월 26일
In R2016a and earlier, indexImages did not permit an imageDataStore to be passed to it. You are looking at R2016b documentation but trying to operate with an earlier version. The R2016a documentation for the function is at http://www.mathworks.com/help/releases/R2016a/vision/ref/indeximages.html

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by