Find edges of objects in grayscale pixel stream
Vision HDL Toolbox / Analysis & Enhancement
The Edge Detector block finds the edges in a grayscale pixel stream by using the Sobel, Prewitt, or Roberts method. The block convolves the input pixels with derivative approximation matrices to find the gradient of pixel magnitude along two orthogonal directions. It then compares the sum of the squares of the gradients to the square of a configurable threshold to determine if the gradients represent an edge.
By default, the block returns a binary image as a stream of pixel values. A pixel value of 1 indicates that the pixel is an edge. You can disable the edge output. You can also enable output of the gradient values in the two orthogonal directions at each pixel.
This block uses a streaming pixel interface with a
bus for frame control signals. This interface enables the block to operate independently
of image size and format. The pixel, Edge, and
gradient ports on this block support single pixel streaming or multipixel streaming.
Single pixel streaming accepts and returns a single pixel value each clock cycle.
Multipixel streaming accepts and returns a vector of 4 or 8 pixels per clock cycle to
support high-frame-rate or high-resolution formats. Along with the pixel, the block
accepts and returns a pixelcontrol
bus containing five control
signals. The control signals indicate the validity of each pixel and their location in
the frame. For multipixel streaming, one set of control signals applies to all four or
eight pixels in the vector. To convert a frame (pixel matrix) into a serial pixel stream
and control signals, use the Frame To Pixels block. For a full
description of the interface, see Streaming Pixel Interface.