160 likes | 375 Views
Scott Robinson Aaron Sikorski Peter Phelps. Edge Detection Using a FIR Filter. Outline. Introduction FIR Filter Design Optimization Application Edge Detection Sobel Filter Communications Design Process Flow Conclusion. Introduction.
E N D
Scott Robinson Aaron Sikorski Peter Phelps Edge Detection Using a FIR Filter
Outline • Introduction • FIR Filter Design • Optimization • Application • Edge Detection • Sobel Filter • Communications • Design Process Flow • Conclusion
Introduction • Goal: Improve and apply our previously designed. Implement specific design on NEXYS2 FPGA. • Requirements: The FPGA must communicate with a host PC through the USB interface.
FIR Filter Design • N-bit input values, M-bit tap values, K-bit taps • Each blog is separate module • The multipliers include the Booth encoding and Wallace tree in one module
Optimization of Filter Design • Removed unnecessary pipelining in our full-adder module. • Changed our Booth constants to be generated on the tap values. • Moved the Booth encoding to outside of the Multiplier module. • Greatly reduced the area required while not sacrificing any speed by minimizing the replication of logic.
Changes in Logic Tap 1 … Tap K Input [t] Input [t-K] Old Design New Design Booth Encoder Multiplier K Multiplier 1 Input [t] Input [t-K] Booth Encoder Booth Encoder … … Multiplier 1 Multiplier K Partial Product Generator Partial Product Generator Partial Product Generator Partial Product Generator Wallace Tree Wallace Tree Wallace Tree Wallace Tree
Measures of Improvement Old Design: 132% 272 MHz New Design: 64% 273 MHz
Application – Edge Detection • Find all areas with large brightness change • Generally mark an edge between regions • Used in facial recognition, OCR, obstacle avoidance, tracking http://knol.google.com/k/aerial-extraction-of-roof-surfaces-for-solar-analysis# http://www.wolfram.com/products//mathematica/newin5/importexport.html
Edge Detection in MATLAB • Test were run in Matlab to make sure we knew what we were doing • Also to provide comparison number to make sure we got it right [INSERT MATLAB GENERATED SAMPLES]
Sobel Filter • Sobel filter can be represented as the sum of three FIR filters – see below FIR Filter Adder FIR Filter FIR Filter
Communications – First Pass • Uses a state machine to control input/output destination • Keep it simple by passing minimum inputs/outputs each transmission (3 in/1 out) • Too slow • Estimated 50 minutes on a 150x200 pixel image • Logical complexity does not increase that much for longer transmission (one more state)
Communications – Corrected • Add more states to enable passing more information per transmission • 60 input bytes/20 output bytes • Requires additional states • Speeds now allow 150x200 in <3 minutes
Communications – Host PC • Mix of Matlab and C (based on usb_demo) • Matlab opens the image file and creates a data file that arranges the pixels into tupels • Displays the starting image and waits for the C program
Communications – Host PC • C program reads from this file • Sends out 60 bytes at a time • 20 received bytes are written to another file • Matlab resumes • Reads output from C program • Recreates the processed image
Thank You Questions?