我已经了解了如何从单个图像中提取特征,如本示例中所述:https ://www.mathworks.com/help/vision/ref/extractlbpfeatures.html
现在,我正在为我的 matlab 项目处理 1000 张图像的数据集,以提取自行车、汽车和摩托车的特征。我的数据集中有三个单独的文件夹,包括自行车、汽车和摩托车。在执行期间,我收到错误消息,
Error using extractLBPFeatures>parseInputs (line 148)
Expected I to be one of these types:
double, single, int16, uint16, uint8, logical
Instead its type was imageSet.
Error in extractLBPFeatures (line 129)
params = parseInputs(I,varargin{:});
Error in LBP (line 21)
bycycleLBP = extractLBPFeatures(bycycleData,'Upright',false);
我应该怎么办?下面是我的示例代码 ==>
imSet = imageSet('dataset\train','recursive');
bicycleData = imSet(1);
carData = imSet(2);
motorbikeData = imSet(3);
%%Extract LBP Features
bicycleLBP = extractLBPFeatures(bicycleData,'Upright',false);
carLBP = extractLBPFeatures(carData,'Upright',false);
motorbikeLBP = extractLBPFeatures(motorbikeData,'Upright',false);
bicycle = bicycleLBP.^2;
car = carLBP.^2;
motorbike = motorbikeLBP.^2;
figure
bar([bicycle; car; motorbike]','grouped');
title('LBP Features Of bicycle, car and motorbike');
xlabel('LBP Histogram Bins');
legend('Bicycle','Car','Motorbike');
请帮助我实现我的示例代码。