function [glnu] = GLNU(I, phi) % % Written by: % -- % John L. Weatherwax 2005-08-04 % % email: wax@alum.mit.edu % % Please send comments and especially bug reports to the % above email address. % % Epage % %----- if( nargin>1 ) % compute the GLNU for just one displacement and angular direction Q = Q_RL(I,phi); tmp = sum( Q, 2 ); num = sum( tmp.^2 ); den = sum(Q(:)); glnu = num/den; else % compute the GLNU for all angles and average all_phis = [ 0, 45, 90, 135 ]; all_glnus = zeros(1,length(all_phis)); for ii=1:length(all_phis) a = GLNU(I,all_phis(ii)); % recursively call the three argument case all_glnus(ii) = a; end glnu = mean(all_glnus); end