What can be the input arguments of this user defined function?

조회 수: 2 (최근 30일)
Shaila parvin
Shaila parvin 2014년 3월 17일
답변: Image Analyst 2014년 3월 17일
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

답변 (1개)

Image Analyst
Image Analyst 2014년 3월 17일
It looks like it tells you. If you don't understand, ask the author for further explanation and clarification.

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by