To improve the significance of the data
2 ビュー (過去 30 日間)
古いコメントを表示
Average gradient (AG). The AG reflects the ability to express the details of an image and can be used to measure the
relative clarity of the image. AG is formulated as:
This is the code AG
[dfdx,dfdy] = gradient(f) ;
M = (dfdx.^2+dfdy.^2)/2 ;
AG = mean(mean(M)) ;
But need help with this equation
To improve the significance of the data, a comprehensive evaluation parameter was set in the experiment so that the average values of different sets of test data could be presented in a consistent manner:
where n is the sample size, Yi is the result of testing on a certain sample, and Y is the average value.
How to code this equation?
0 件のコメント
回答 (1 件)
Image Analyst
2019 年 12 月 1 日
Run through all your images calling mean2
Then run through them all again dividing by the mean and getting your gradient with imgradient() or imgradientxy(), which ever you want.
See for FAQ for code https://matlab.fandom.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F.
for k = 1 : numFiles
% Get gray scale image..... using FAQ... then
means(k) = mean2(grayImage);
end
% Get the the mean of all the image means.
meanMean = mean(means)
% Now go through again
for k = 1 : numFiles
% Get gray scale image..... using FAQ... then
grayImage = meanMean * double(grayImage) / means(k); % Cast to uint 8 if you want in in uint8 instead of double.
% Now call imgradient()
end
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!