OpenStructure
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
fft_li.py

This scripts loads one or more images and shows their Fourier Transforms on the screen. A viewer is opened for each loaded image. The Fourier Transform honors the origin of the reference system, which is assumed to be at the center of the image.

Usage:

giplt view_ft.py <image1> [<image2> <image3> .... ]



import sys
if len(sys.argv)<2:
images=io.LoadImageList(['square.png','circle.png'])
else:
images=io.LoadImageList(sys.argv[1:])
viewers=[]
i=1
main_area=gui.GostyApp.Instance().perspective.main_area
for im in images:
im.CenterSpatialOrigin()
im.ApplyIP(img.alg.DFT())
v=gui.CreateDataViewer(im,"Image")
viewers.append(v)
i+=1