在Matlab中进行这个例子图像类别分类时,我发现使用以下命令获取SURF特征的词汇表出错了。
bag = bagOfFeatures(trainingSet);
错误如下:
Error using bagOfFeatures/parseInputs (line 1023)
The value of 'imgSets' is invalid. Expected imgSets to be one of these types:
imageSet
Instead its type was matlab.io.datastore.ImageDatastore.
我正在使用ImageDatastore输入,而不是imgSets,但我正在遵循Mathworks的一个例子。有人能解释一下为什么会出现这种情况,以及如何将trainingSet转换为imgSets类型吗?