aboutsummaryrefslogtreecommitdiffstats
path: root/img/force_field_transform_fft.jl
diff options
context:
space:
mode:
Diffstat (limited to 'img/force_field_transform_fft.jl')
-rw-r--r--img/force_field_transform_fft.jl29
1 files changed, 0 insertions, 29 deletions
diff --git a/img/force_field_transform_fft.jl b/img/force_field_transform_fft.jl
deleted file mode 100644
index c5bf905..0000000
--- a/img/force_field_transform_fft.jl
+++ /dev/null
@@ -1,29 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# To do force field transform using FFT
-#
-# Aaron LI
-# 2015/07/16
-#
-
-function forcefieldtransform_fft(img)
- rows, cols = size(img)
- pic = zeros(3*rows, 3*cols)
- pic[1:rows, 1:cols] = img
- # unit force field
- unit_ff = complex(zeros(3*rows, 3*cols))
- for r = 1:(2*rows-1)
- for c = 1:(2*cols)
- d = (rows+cols*im) - (r+c*im)
- if (r, c) == (rows, cols)
- unit_ff[r, c] = 0 + 0im
- else
- unit_ff[r, c] = d / abs(d)^3
- end
- end
- end
- # FIXME matrix sizes
- ff = sqrt(rows*cols) * ifft(fft(pic) .* fft(unit_ff))
- #ff_crop = ff[rows:2*rows, cols:2*cols]
-end
-