Edge detection is a process that finds the regions in an image where there are sharp changes in intensity or a sharp change in color, a high value indicates a steep change and a low value indicated a show change.
An example of is shown below.
In order to detect edges within an image, I first have to use matrix math to calculate areas of different intensities of an image. Areas where there are extreme differences in the intensities of the pixel usually indicate an edge of an object.
The image will be processed in the X and Y directions separately first, and then combined together to form a new image which represent the sum of the X and Y edges of the image.
It is convenient to first convert the image from an RGB scale to a Gray scale image. From there, we will use kernel convolution to process the image.
I will use a kernel 3 by 3 matrix, one for the x - direction and one for the y - direction. There is a gradient in each kernel oriented in different ways.
X - Direction Kernel Y - Direction Kernel
-1 0 1 -1 -2 -1
-2 0 2 0 0 0
-1 0 1 1 2 1
What the Sobel operator essentially does is figure out the amount of the difference by placing the gradient matrix over each pixel in an image.
After the kernel is applied to the input image, two separate measurements are produced of the gradient component of each direction. The two output are then combined to produce a final image. The gradient magnitude of the final image can be approximated by finding the magnitude of each output and summing them together.
Implementation of the algorithm is somewhat straightforward in software, but is very difficult to implement using an FPGA. The reason why I choose this projects is because I wanted to see the difference in performance when implemented in hardware vs. software.
Nexys A7 -100T - FPGA Trainer Board
Vivado 2018.2 Installation - Design Suite
VGA Monitor - Monitor to output images
Camera?? - Gather live feed to perform edge detection
I am not sure if Digilent sells cameras that can connect to FPGA using a Pmod form factor
I am having a hard time finding a camera that can connect to the FPGA
I found VHDL source code I could use for my application, but since I can not find a camera module I doubt it will be very useful