function image_out = cv_rng_shade(image_in)
%
% cv_rng_shade - generate shaded image from range image
% Call: image_out = cv_rng_shade(image_in);
% On input:
%     image_in: range image
% On output:
%     image_out: shaded (intensity) image 
% Author:
%     Tom Henderson
%     7 January 1999
% Custom Functions Used:
%     none
% Method:
%     Take norm of gradient (related to cosine)
% Testing:
%      See cv_rng_shade.test in testing directory
%
[gx,gy] = gradient(image_in);
image_out = (1./sqrt(1 + gx.^2 + gy.^2));