更新时间:2023-11-18 20:16:16
您应该在进入外循环之前初始化特征矩阵(如果您知道LBP的大小):
you should initialize the feature matrix before entering the outer loop (if you could know the size of LBP):
featureMatrix = zeros(total_images,size_LBP); % where size_LBP is the number of columns of LBP.
然后将循环中的featureMatrix {x} = hist(LBP,0:255);
替换为:
then replace featureMatrix {x} = hist(LBP,0:255);
in the loop with:
featureMatrix(x,:) = hist(LBP,255);
我希望这对您有用!