summaryrefslogtreecommitdiff
path: root/macros/FFT.sci
blob: 3ada8748fdc557cab94940f7f608e618a786095c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
function fourierTransform=FFT(inputMatrix)
// This funtions returns discrete Fourier Transform of 2D input matrix
//
// Calling Sequence
// fourierTransform=FFT(inputMatrix);
//
// Parameters
// inputMatrix: Input matrix must be 2-D.
//
// Description
// It returns the 2D discrete Fourier transform of two dimensional input matrix.
//
// Examples
// I=imread("cameraman.tif");
// fourier=FFT(I);

	[rows cols channels]=size(inputMatrix);
	if channels <> 1 then
		error(msprintf("Wrong input, input must be 2-D matrix"));
	end
	fourierTransform=opencv_FFT(inputMatrix);
endfunction