0
我使用blockproc
將圖像分割成10x10個重疊的圖像塊,我想提取這些塊的特徵,但Matlab給出錯誤。任務的代碼粘貼在這裏。 Matlab的錯誤是如何使用blockproc處理塊數據以進行特徵提取
Error in ==> blockproc at 214
output_block = userfunDispatcher(fun,input_struct,trim_border);
Error in ==> Main at 57
B1 = blockproc(g,[4 4],fun,'BorderSize',[3 3]); %[M + 2*V, N + 2*H]
代碼:
[email protected](block_struct)feature_extraction(block_struct.data);
B=1 blockproc(g,[4 4],fun,'BorderSize',[3 3]);
特徵提取功能代碼
function features=feature_extraction(name_images)
[num_im,q]=size(name_images);
features=zeros(num_im,12);
for i=1:num_im
A=imread(name_images(i,:));
A=double(A);
%Normalization of the pixels intensity in [0, N_gray-1]
A=round((N_gray-1)*((A-min(A(:)))/(max(A(:))-min(A(:)))));
features(i,1)=mean2(A);
features(i,2)=std2(A);
features(i,3)=skewness(A(:));
features(i,4)=kurtosis(A(:));
end
請指引我有什麼不妥之處,我會如何解決它。有沒有其他方法可以做到這一點?
是的錯誤是有關的功能,我已經修復它。感謝你們對我的幫助 –