function res = D(image)

%
% res = D(image)
%
% image = 2D multi-channel images
%
% This function computes the finite difference transform of the image
%
% Related functions:
%       adjD  
%
%
% (c) Michael Lustig 2005
%
% Modified to accommodate multi-channel images, and be circulant

Dx = image([2:end,1],:,:) - image;
Dy = image(:,[2:end,1],:) - image;

dd = ndims(image);
res = cat(dd+1,Dx,Dy);

