1 / 52

EECS 373 Design of Microprocessor-Based Systems Farhan Hormasji Matthew Diffenderfer

EECS 373 Design of Microprocessor-Based Systems Farhan Hormasji Matthew Diffenderfer University of Michigan Efficient Algorithms November 27, 2012. Outline. Overview DFT algorithms FFT Cooley–Tukey FFT Bluestein's FFT Goertzel Edge Detection Algorithms Canny Sobel Prewitt

Download Presentation

EECS 373 Design of Microprocessor-Based Systems Farhan Hormasji Matthew Diffenderfer

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. EECS 373 Design of Microprocessor-Based Systems Farhan Hormasji Matthew Diffenderfer University of Michigan Efficient Algorithms November 27, 2012

  2. Outline • Overview • DFT algorithms • FFT • Cooley–Tukey FFT • Bluestein's FFT • Goertzel • Edge Detection Algorithms • Canny • Sobel • Prewitt • Roberts Cross • Questions

  3. Algorithms What to look for: • Usefulness • Methodology • Implementation Tradeoffs: • Cost • Code Size • Runtime • Availability

  4. Outline • Overview • DFT algorithms • FFT • Cooley–Tukey FFT • Bluestein's FFT • Goertzel • Edge Detection Algorithms • Canny • Sobel • Prewitt • Roberts Cross • Questions

  5. Discrete Fourier Transform (DFT): Overview • What? • Converts a sampled function from time domain to frequency domain • Use? • DFTs reveal periodicities in input data as well as the relative strengths of any periodic components

  6. Discrete Fourier Transform (DFT): Mathematical Interpretation

  7. Discrete Fourier Transform (DFT): Applications • Spectral Analysis • Most signals are sinusoidal • DFT tells you frequency, phase, and amplitude components • Frequency Response of Systems • All input and output signals can be represented as cosine waves • By observing change in magnitude and phase, any linear system can be described • Convolution in the Frequency Domain • Convolution in time domain is multiplication in frequency domain • Speed of computation greatly reduced

  8. Fast Fourier Transform (FFT): Overview • What? • An efficient algorithm to compute the DFT and its inverse • Why use it? • O(Nlog2N) • Tradeoff • Input data must be a power of 2 • If it’s not, data is either truncated or padded with zeros • Many different types

  9. FFT: Cooley-Tukey algorithm • Most common FFT algorithm • Divide and conquer algorithm • Methodology • Breaks up DFT of N samples into N=N1N2 • Benefit • Can be combined with any other DFT algorithm • What Matlabfft function does for optimization

  10. FFT: Cooley-Tukey algorithmMethodology

  11. Fast Fourier Transform (FFT): Bluestein • Also called chirp z-transform algorithm • Methodology • Expresses DFT as a convolution • Benefit • Computes DFT of arbitrary sizes • Can be used to compute more general transforms • Tradeoff • Only O(Nlog2N) complexity for prime-sized DFTs

  12. Fast Fourier Transform (FFT): BluesteinMethodology

  13. Goertzel Algorithm

  14. Goertzel Algorithm • Tradeoff • O(NM) • N is number of DFT terms, M is the set of DFT terms to calculate • Benefit • Simple structure of algorithm makes it well suited to small processors • More efficient than FFT for small number of frequencies ( if M < log2N) • Applications • Used to recognize DTMF tones produced by buttons on telephone keypad • Call progress (dial tone, busy)

  15. Runtime Performance Comparison

  16. Runtime Performance Comparison:Matlab

  17. Outline • Overview • DFT algorithms • FFT • Cooley–Tukey FFT • Bluestein's FFT • Goertzel • Edge Detection Algorithms • Canny • Sobel • Prewitt • Roberts Cross • Questions

  18. Edge DetectionOverview • Use • Tool used in image processing • Goal is to identify points in a digital image where image brightness changes sharply or has discontinuities • Reduce amount of data in image so that further image processing may occur • Reduce images to shapes • Applications • Most image processing

  19. Edge Detection: Canny • Use • Optimal edge detection • the algorithm should mark as many real edges in the image as possible • edges marked should be as close as possible to the edge in the real image • a given edge in the image should only be marked once • image noise should not create false edges • Benefits • Adaptable to most images • Generally has short runtime, well-suited for real time implementations in FPGAs • Constraints • Size of Gaussian filter • Calibration of thresholds

  20. Edge Detection: CannyMethodology • Convolves image with Gaussian filter • To eliminate noise • Uses other types of edge detection to determine intensity gradient vertically, horizontally, and diagonally • 4 filters • Goes through matrix to determine if gradient magnitude is a local maximum based on gradient direction • Determine high and low threshold • Go through image and mark pixel as edge or non-edge based on thresholds

  21. Edge Detection: Sobel • Use • Discrete differentiation operator • Computes the gradient of the image intensity • Benefits • Few number of computations • Can be implemented simply in both hardware and software • Tradeoffs • Poor gradient approximation for high frequency variations in image

  22. Edge Detection: SobelMethodology • 2 kernels convolved with original image to calculate gradient in vertical and horizontal direction • Where A is the original image • Compare gradient value to threshold similar to Canny algorithm

  23. Edge Detection: Prewitt • Same as Sobel algorithm but with two key differences • The two kernels used have slightly different values • Magnitude and Direction of gradient in Sobel: • Magnitude and Direction of gradient in Prewitt:

  24. Edge Detection: Roberts Cross • Use • One of the first edge detectors • Intensity of edges should correspond as close as possible to what a human would perceive • Benefits • Only finds gradient in diagonal direction due to simple kernels, so algorithm has high simplicity • Tradeoffs • Speed of modern computers make this simplicity negligable • Edge detection suffers from sensitivity to noise

  25. Edge Detection: Roberts CrossMethodology • 2 kernels convolved with original image to calculate gradient in diagonal direction • Magnitude and direction of gradient found similar to Sobal • Compare gradient value to threshold similar to Canny algorithm

  26. Block M

  27. Canny

  28. Sobel

  29. Prewitt

  30. Roberts Cross

  31. Edge Pixels Detected: Block M

  32. Prabal

  33. Canny

  34. Sobel

  35. Prewitt

  36. Roberts Cross

  37. Edge Pixels Detected: Prabal

  38. Blur

  39. Canny

  40. Sobel

  41. Prewitt

  42. Roberts Cross

  43. Edge Pixels Detected: Blur

  44. Gray

  45. Canny

  46. Sobel

  47. Prewitt

  48. Roberts Cross

  49. Edge Pixels Detected: Grayscale

  50. Final Comparison

More Related