All Projects → AngeloJacobo → FPGA_RealTime_and_Static_Sobel_Edge_Detection

AngeloJacobo / FPGA_RealTime_and_Static_Sobel_Edge_Detection

Licence: MIT license
Pipelined implementation of Sobel Edge Detection on OV7670 camera and on still images

Programming Languages

Verilog
626 projects

Projects that are alternatives of or similar to FPGA RealTime and Static Sobel Edge Detection

kianRiscV
KianRISC-V! No RISC-V, no fun! RISC-V CPU with strong design rules and unittested! CPU you can trust! kianv rv32im risc-v a hdmi soc with harris computer architecture in verilog: multicycle, singlecycle and 5-stage pipelining Processor. Multicycle Soc with firmware that runs raytracer, mandelbrot, 3d hdmi gfx, dma controller, etc.....
Stars: ✭ 167 (+1092.86%)
Mutual labels:  fpga, verilog, pipelined
spu32
Small Processing Unit 32: A compact RV32I CPU written in Verilog
Stars: ✭ 51 (+264.29%)
Mutual labels:  fpga, verilog
virtio
Virtio implementation in SystemVerilog
Stars: ✭ 38 (+171.43%)
Mutual labels:  fpga, verilog
LVDS-7-to-1-Serializer
An Verilog implementation of 7-to-1 LVDS Serializer. Which can be used for comunicating FPGAs with LVDS TFT Screens.
Stars: ✭ 33 (+135.71%)
Mutual labels:  fpga, verilog
platform-lattice ice40
Lattice iCE40: development platform for PlatformIO
Stars: ✭ 34 (+142.86%)
Mutual labels:  fpga, verilog
cnn open
A hardware implementation of CNN, written by Verilog and synthesized on FPGA
Stars: ✭ 157 (+1021.43%)
Mutual labels:  fpga, verilog
verilog-sid-mos6581
MOS6581 SID chip emulator in SystemVerilog
Stars: ✭ 22 (+57.14%)
Mutual labels:  fpga, verilog
yahdl
A programming language for FPGAs.
Stars: ✭ 20 (+42.86%)
Mutual labels:  fpga, verilog
MobileNet-in-FPGA
Generator of verilog description for FPGA MobileNet implementation
Stars: ✭ 107 (+664.29%)
Mutual labels:  fpga, verilog
SpinalCrypto
SpinalHDL - Cryptography libraries
Stars: ✭ 36 (+157.14%)
Mutual labels:  fpga, verilog
yarvi
Yet Another RISC-V Implementation
Stars: ✭ 59 (+321.43%)
Mutual labels:  fpga, verilog
fpga-nn
NN on FPGA
Stars: ✭ 16 (+14.29%)
Mutual labels:  fpga, verilog
drec-fpga-intro
Materials for "Introduction to FPGA and Verilog" at MIPT DREC
Stars: ✭ 66 (+371.43%)
Mutual labels:  fpga, verilog
gateware-ts
Hardware definition library and environment for designing and building digital hardware for FPGAs, using only open source tools
Stars: ✭ 83 (+492.86%)
Mutual labels:  fpga, verilog
ics-adpcm
Programmable multichannel ADPCM decoder for FPGA
Stars: ✭ 18 (+28.57%)
Mutual labels:  fpga, verilog
sphinxcontrib-hdl-diagrams
Sphinx Extension which generates various types of diagrams from Verilog code.
Stars: ✭ 37 (+164.29%)
Mutual labels:  fpga, verilog
verifla
Fork of OpenVeriFla - FPGA debugging logic analyzer to use with your designs - examples (so far) for ice40/IceStorm
Stars: ✭ 21 (+50%)
Mutual labels:  fpga, verilog
yafpgatetris
Yet Another Tetris on FPGA Implementation
Stars: ✭ 29 (+107.14%)
Mutual labels:  fpga, verilog
xeda
Cross EDA Abstraction and Automation
Stars: ✭ 25 (+78.57%)
Mutual labels:  fpga, verilog
async fifo
A dual clock asynchronous FIFO written in verilog, tested with Icarus Verilog
Stars: ✭ 117 (+735.71%)
Mutual labels:  fpga, verilog

Created by: Angelo Jacobo
Date: August 22,2021

image

About:

This project implements a pipelined Sobel Edge Detection using FPGA. This project is two-part:

  • First is video processing. Video inputs(640x480@30FPS) are retrieved from OV7670 camera and is processed real-time via pipelined convolution module. Data are then stored and retrieved from SDRAM. Threshold value for edge detection is configurable via key[1:0]. key[2] is for alternating display between raw video and edge detected video. Full codes are on folder "src1".
  • Second is image processing. Image inputs(640x480) are extracted from jpeg files using Matlab and is sent to FPGA serially. Python script is used to handle the UART protocol. Sobel edge detection is also done by the pipelined convolution module. Data are then stored and retrieved from SDRAM. Below are the sample images and its results. Full codes and instructions for running the scripts for Matlab and python are on folder "src2"

Inside the src1 folder are:

  • top_module.v -> Combines the camera_interface, sdram_interface, and vga_interface modules.
               key[1:0] for increasing/decreasing threshold value for Sobel edge detection
               key[2] to change display between raw video or edge detected video
  • camera_interface.v -> Configures the register of OV7670 via SCCB protocol. Pixel data is retrieved from
              the camera and then passed to asyn_fifo
  • sdram_interface.v -> Controls logic sequence for storing the pixel data retrieved from the camera_interface
              and sobel_convolution, then sending it to the asyn_fifo connected
              to vga_interface
  • vga_interface.v -> Passes the pixel data retrieved from sdram to the vga_core
  • sobel_convolution.v -> Pipelined convolution logic. Pixel data from camera asyn_fifo are retrieved, processed,
              and then sent to asyn_fifo of vga_interface per clock cycle
  • asyn_fifo.v -> FIFO with separate clock domains for read and write. Solves the clock domain crossing issue(see
               image below)
  • i2c_top.v -> Bit-bang implementation of SCCB(which is very similar to i2c)
  • sdram_controller.v -> Controller for storing to and retrieving data from SDRAM. Optimized to a memory
               bandwidth of 316MB/s
  • vga_core.v -> VGA controller. Set at 640x480 @ 60fps
  • top_module.ucf -> Constraint file for top_module.v

NOTE: dcm_24MHz.v , dcm_25MHz.v , and dcm_165MHz.v are PLL instantiations specific to Xilinx. Replace these files(and also the instantiation of these PLLs on the source code) when implementing this design to other FPGAs.

Inside the src2 folder are:

  • top_module.v -> Combines the sdram_interface, vga_interface, and UART modules.
               key[1:0] for increasing/decreasing threshold value for Sobel edge detection
  • sdram_interface.v -> Stores the pixel data processed by sobel_convolution module and
              then sending it to the asyn_fifo connected to vga_interface
  • vga_interface.v -> Passes the pixel data retrieved from sdram to the vga_core
  • uart.v -> UART driver. Set to a baud rate of 100_000 (115_200 produce data errors)
  • sobel_convolution.v -> Pipelined convolution logic. Pixel data from uart are retrieved, processed, and then sent to
              asyn_fifo of vga_interface per clock cycle
  • asyn_fifo.v -> FIFO with separate clock domains for read and write. Solves the clock domain crossing issue(see
               image below)
  • sdram_controller.v -> Controller for storing to and retrieving data from SDRAM. Optimized to a memory
               bandwidth of 316MB/s
  • vga_core.v -> VGA controller. Set at 640x480 @ 60fps
  • top_module.ucf -> Constraint file for top_module.v

NOTE: dcm_24MHz.v , dcm_25MHz.v , and dcm_165MHz.v are PLL instantiations specific to Xilinx. Replace these files(and also the instantiation of these PLLs on the source code) when implementing this design to other FPGAs.

Logic Flow:

Camera_Interface

Image Edge Detection Results(Click Image for Higher Resolution):

Donate

Support these open-source projects by donating

paypal

Inquiries

Connect with me at my linkedin: https://www.linkedin.com/in/angelo-jacobo/

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].