Presentation is loading. Please wait.

Presentation is loading. Please wait.

Interactive Frequency Filtering Program Geoff Franz.

Similar presentations


Presentation on theme: "Interactive Frequency Filtering Program Geoff Franz."— Presentation transcript:

1 Interactive Frequency Filtering Program Geoff Franz

2 Overview Concept and Problem Statement Solution User’s Guide Program Components Suggestions for Future Revisions Demo

3 Concept and Problem Statement Sometimes you find images that suffer from obvious frequency-domain artifacts (e.g., halftoning, banding, etc) I don’t know of any programs that let someone interactively filter in the frequency domain and see the results in real time

4 Solution Write my own!

5 User’s Guide – Startup Screen This is what the user sees when the program is launched.

6 User’s Guide – Opening an Image This is what the user sees when a large image is opened.

7 User’s Guide – Opening an Image This is what the user sees when a small image is opened.

8 User’s Guide – Drawing the Mask The white lines are what the user sees when drawing with a small brush.

9 User’s Guide – Drawing the Mask The white lines are what the user sees when drawing with a large brush.

10 User’s Guide – Drawing the Mask The black areas are the result of drawing the mask.

11 User’s Guide – Mask Smoothing The program can also create smoothed masked areas.

12 User’s Guide – Final Result This is an example of a possible end result.

13 Program Components These are the procedures and functions I wrote to solve the problem Gaus, Show_FFT, Image_Display, Drawline_Draw_Events, Wid_Base_0_Event, IFF_GUI Info structure They are explained in the following slides

14 Gaus Returns a Gaussian function given an input. Equation: The Gaus function has obvious applications outside of this program, although it’s been written many times before

15 Show_FFT Prepares a shifted FFT array for display  Zeroes out the DC component  Applies an overall logarithmic brightness transform  Applies a radially-dependent brightness transform Displays the modified FFT in the chosen window

16 Image_Display Reads in an image Computes the FFT and creates a mask Initializes an “info” structure that is used for the remainder of the program Displays the image in the left and right panels, and calls Show_FFT to display the FFT in the center panel Enables button events in the center draw widget

17 Info Structure info = {image:image, $ ;the image itself pixID:-1, $ ;window ID of the hidden pix map fftimage:fftimage,$ ;FFT of the image wid0:wid0, wid1:wid1, wid2:wid2, $ ; window IDs imageID:WID_DRAW_0,$ ;left draw widget ID drawID:WID_DRAW_1,$ ;center draw widget ID filtID:WID_DRAW_2, $ ;right draw widget ID xsize:xs, ysize:ys, $ ;dimensions of the image xstart:-1, ystart:-1,$ ;starting location of the drawn line mask:mask, $ ;mask for the FFT xmid:xmid, ymid:ymid, $ ;central pixel location xvalues:ptr_new(),yvalues:ptr_new(),$ ;vertices for drawing the line buttonUsed:'None', $ ;which mouse button is currently selected ;this could be used to enable different ;functionality from the right mouse button drawColor:!D.N_colors-1} ;set the draw color to white

18 Drawline_Draw_Events Loosely based on David Fanning’s drawline.pro example This code handles all mouse events in the center draw widget Uses the IDL PlotS procedure to draw the lines on the screen Reads the slider to determine brush thickness Modifies the mask and updates the screen

19 Wid_Base_0_Event Handles all other events (buttons and slider) The following code is contained within this procedure:  Testing if an image is valid before opening  Saving the filtered image  Smoothing the mask  Revert back to the original state

20 IFF_GUI This is where the widgets are created. Not too exciting.

21 Suggestions for Future Revisions All of my suggestions fall into one of three categories: Robustness and bug fixes Features (low-hanging fruit) Aesthetics

22 Suggestions: Robustness Properly handle TIFF, PNG, GIF, and color images of all kinds Fix the bug where if the user clicks outside the draw widget, drags the mouse inside, and releases, the program crashes when it tries to dereference a null pointer Fix the bug where it crashes if a user clicks on a button (other than open image) before an image is loaded

23 Suggestions: Features Undo last line drawn button Display color images and work on the channels individually Add the ability to draw boxes and circles Add the ability to save to different file formats other than PNG

24 Suggestions: Aesthetics Make the GUI shrink to accommodate smaller images, so less space is wasted

25 Demo The following is a demonstration of my program


Download ppt "Interactive Frequency Filtering Program Geoff Franz."

Similar presentations


Ads by Google