<< Chapter < Page | Chapter >> Page > |
Edges in an image are regions of sharp change, often at the boundaries between objects. One way to quantitatively find edges in an image is to analyze the pixel values of an image and examine the gradient of the pixel values matrix. Edges are identified as maxima in the gradient of an image. By using 2-Dimensional convolution and the pixel value matrix for each frame from a movie, the gradient can be calculated and used to find the edges.
For our adaptive ROI system, the pixel value matrix was convolved with two different matrices (h 1 and h 2 ) using the following formula:
Where:
and
The result of convolution with h 1 gives the horizontal gradient of the frame while convolution with h 2 gives the vertical gradient. These are then combined to find the magnitude of the gradient at all points in the frame.
The gradient magnitudes are then thresholded, and any gradient magnitude greater than the threshold is recognized to be an edge. Thus the result is a matrix of zeros and ones, where a 1 indicates that that pixel is part of an edge, and a 0 indicates it is not part of an edge. For our system, a threshold of 125 gives satisfactory results and recognizes only sharp edges.
Below you can see a frame from Punch Drunk Love as well as the result from the edge detection method. For illustration purposes, the detected edges are displayed in white. The four vertical white lines are there to show the different regions of the screen that are eventually used to decide which region has the most edges in it.
Notification Switch
Would you like to follow the 'Adaptive region of interest for video' conversation and receive update notifications?