What can be the input arguments of this user defined function?
1 次查看(过去 30 天)
显示 更早的评论
I download this code. But I don't understand what can be its possible input arguments. Can anyone please help me?
function [textureFeatures, filteredImages] = ExtractTextureFeatures(image, maxFreq, numberOfFrequencies, numberOfOrientations, eta, gamma, k)
%Input: image (grayscale image)
% maxFreq (max central frequency of the filter bank)
% numberOfFrequencies (number of frequencies)
% numberOfOrientations (number of orientations)
% eta, gamma (smoothing parameters)
% k (frequency spacing: 2 = octave, sqrt(2) = half octave)
%
%Output: textureFeatures (mean and std of the absolute value of each transformed image)
% filteredImages (transformed images)
bank = sg_createfilterbank(size(image), maxFreq, numberOfFrequencies, numberOfOrientations, 'eta', eta, 'gamma', gamma, 'k', k);
filteredImages_raw = sg_filterwithbank(image,bank);
normalize = 'Y';
if normalize == 'Y'
filteredImages = sg_resp2samplematrix(filteredImages_raw,'normalize',1);
else
filteredImages = sg_resp2samplematrix(filteredImages_raw,'normalize',0);
end
nImages = size(filteredImages);
nImages = nImages(3);
index = 1;
for i = 1:nImages
textureFeatures(index) = mean2(abs(filteredImages(:,:,i)));
index = index + 1;
textureFeatures(index) = std2(abs(filteredImages(:,:,i)));
index = index + 1;
end
end
0 个评论
回答(1 个)
Image Analyst
2014-3-17
It looks like it tells you. If you don't understand, ask the author for further explanation and clarification.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Octave 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!