コード例 #1
0
        private void RowFFT(ref Complex[,] inputs)
        {
            for (int i = 0; i < _ImageHeight; i++)
            {
                DFT dft = new DFT();
                for (int j = 0; j < _ImageWidth; j++)
                {
                    dft.append(inputs[j, i]);
                }

                dft.setInverse(_IsInverse);
                List <Complex> res = dft.transform();

                for (int j = 0; j < res.Count; j++)
                {
                    _output[j, i] = res[j];
                }
            }
        }
コード例 #2
0
        private void ColFFT(ref Complex[,] inputs)
        {
            for (int i = 0; i < _ImageWidth; i++)
            {
                DFT dft = new DFT();
                for (int j = 0; j < _ImageHeight; j++)
                {
                    dft.append(inputs[i, j]);
                }

                dft.setInverse(_IsInverse);
                List <Complex> res = dft.transform();

                for (int j = 0; j < res.Count; j++)
                {
                    _output[i, j] = res[j];
                    updateMaxVal(res[j].Magnitude());
                }
            }
        }