changeset 270:8b2c0c8adc68

imtranslate: use real() instead of abs() as this allows images with negative values
author hauberg
date Sun, 30 Dec 2007 10:37:01 +0000
parents 7c568c4e40b6
children 30128ba21872
files inst/imtranslate.m
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/inst/imtranslate.m
+++ b/inst/imtranslate.m
@@ -60,7 +60,7 @@
 	py = exp(-2*pi*i*b*(0:dimy-1)/dimy)';
 	P = py * px;
 	y = x .* P;
-	Y = abs( ifftshift(ifft2(fftshift(y))) );
+	Y = real( ifftshift(ifft2(fftshift(y))) );
 	#Y = ifftshift(ifft2(fftshift(y)));
 
 	if ( strcmp(bbox, "crop")==1 )