190 likes | 364 Views
Real Time Image Warper using Digilent Spartan 3 FPGA. By Shan e Agnew Supervisor: Dr. Fearghal Morgan Final Year Project. Contents. Initial aims / Specifications Introduction Camera Bitmaps VHDL Graphical User Interface Future Work Summary. Initial aims / Specifications.
E N D
Real Time Image Warper using Digilent Spartan 3 FPGA By Shane Agnew Supervisor: Dr. Fearghal Morgan Final Year Project
Contents • Initial aims / Specifications • Introduction • Camera • Bitmaps • VHDL • Graphical User Interface • Future Work • Summary
Initial aims / Specifications • Generate image data • Incorporate a communication protocol into the design • Perform all required file formatting • Implement digital signal processing on-board the FPGA • Develop a real-time multi-functional video processing application
Camera • Trust 120 Spacecam • Standard web camera • 24-bit BMP Output • Software provided • 24-bit BMPs • Simple to use • Uncompressed data • Most web-cameras support them • 1 byte for each of red, green and blue, hence RGB value
Bitmaps • 8-bit BMPs • Limited SRAM memory available • 3 times less communication overhead • 3 times less file access • Less awkward to process and store in SRAM • Single byte represents a single pixel
Bitmaps – Greyscale • Greyscale • 256 colours available • Black represents 0, white represented by 255 • 24-bit BMP converted to 8-bit by processing each pixel’s RGB value
Bitmaps – Colours • Colours • 256 Colours created using RGB values from 0% 0% 0% to 100% 100% 100%, e.g. 20% red 0% green 20% blue • 24-bit pixels rounded to these boundaries • Colours sorted by hue to give a natural colour progression
VHDL – DPIMREF • Sample provided by Digilent • Provides VHDL side USB interface with USB 2.0 Peripheral Device • Altered to generate rxDatValid and txDatAck signals • These signals along with the rxDat and txDat input and output data lines allow communication with rest of the appliedVHDLUSBSimple system
VHDL – IOCtrlr • Responds to USB transfer signals, rxdatValid and txDatAck, generated by the DPIMREF • Allows the system registers (CSRs) to be setup, both DSP and Input/Output • Keeps track of the total number of bytes written or read from SRAM and increments the current SRAM address accordingly • Controls DSP activation
VHDL – DSPBlk • Six DSP functions implemented: • Delta function • Colour inversion • Flip image over y-axis • Distortion • Morphing • Colour change • Effective demonstrations of the Spartan 3’s power but more complex DSP functions are possible
Graphical User Interface • Allows a user to check the contents of any SRAM location • Can activate the camera software to take pictures • Image loading and conversion from 24-bit to 8-bit BMPs • DSP options as mentioned previously • Option to perform all operations in colour or greyscale
Future Work • Implement more complicated DSP, including: • Edge detection • Object Extraction • Object warping • Provide networking solution to allow Electronics department to host the project and make it accessible anywhere in the world
Summary • Initial aims / Specifications • Introduction • Camera • Bitmaps • VHDL • Graphical User Interface • Future Work • Summary