0

我想对颅脑 MRI 的图像切片执行二维傅立叶变换。我已经尝试了以下代码但没有成功:(错误消息包含在下面

>> clear all
>> 
>> info = dicominfo('MR000026.dcm');
Y = dicomread(info);
J=imadjust(Y,stretchlim(Y),[0 1]);
F = fftshift(fft2(fftshift(J)));
Undefined function 'fftn' for input arguments of type 'int16'.

Error in fft2 (line 19)
        f = fftn(x);

>> info = dicominfo('MR000026.dcm');
Y = dicomread(info);
F = fftshift(fft2(fftshift(Y)));
Undefined function 'fftn' for input arguments of type 'int16'.

Error in fft2 (line 19)
        f = fftn(x);

>> info = dicominfo('MR000026.dcm');
Y = dicomread(info);
F = fft2(Y);
Undefined function 'fftn' for input arguments of type 'int16'.

Error in fft2 (line 19)
        f = fftn(x);

4

1 回答 1

2

您收到的错误消息说明了一切:fft2不适用于uint16输入类型。在处理之前
将 Y 转换为:double

Y = im2double( Y );

甚至只是

Y = double( Y );
于 2013-06-13T21:45:40.507 回答