From 193cd3427108bd127e09f391f7fe51f6b62590e9 Mon Sep 17 00:00:00 2001 From: scuri Date: Fri, 26 Jun 2009 17:14:56 +0000 Subject: *** empty log message *** --- html/examples/fft.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 html/examples/fft.lua (limited to 'html/examples/fft.lua') diff --git a/html/examples/fft.lua b/html/examples/fft.lua new file mode 100644 index 0000000..3589635 --- /dev/null +++ b/html/examples/fft.lua @@ -0,0 +1,17 @@ +require"imlua" +require"imlua_process" +require"imlua_fftw" + +local filename = "lena.jpg" +local image = im.FileImageLoad(filename) + +local complex = im.ImageCreate(image:Width(), image:Height(), image:ColorSpace(), im.CFLOAT) +im.ProcessFFT(image, complex) + +local c = complex[0][5][10] -- component=0(Red), y = 5 x =10 +print(c[1], c[2]) + +complex[0][5][10] = { 2*c[1], c[2]/2 } + +local c = complex[0][5][10] +print(c[1], c[2]) -- cgit v1.2.3