% r2R	Compute R_xx from r_xx, subroutine to filter optimization
%	R_xx=r2R(r_xx,M_h,N_h,k,l)
%	Convert a 2D correlation matrix to the correlation matrix for the
%	corresponding 1D field, with a displacement for the center of (k,l).
%	Given a subimage of size M_hxN_h with x(m,n) as the lower rigth corner.
%	Let x_(m,n) represent the vector obtained by lexicographically
%	ordering the columns of this subimage. If r_xx is the autocorrelation
%	matrix of this image, up to lag N, R_xx=E{x_(m,n),x_(m+k,n+l)}.
%	Similarly if r is a cross-correlation matrix.
%	
%	See also: OPTXF, FSTATS, DFSTATS