This preview shows page 1. Sign up to view the full content.
Unformatted text preview: ity. The convolution has added pixel that can be disturbing but the main on is
that there was very sharp transition between pixels at the edges of the table.
Red ball and green block: convolution
As we mentioned previously, we used the same approach for the red ball and the green blocks detection,
but varying the filter size only. First we take the RGB 3 dimensional matrix of the raw image and extract
the green and the blue dimension out of it. Using a 3 by 3 matrix of ones as a filter, we convoluted the red
component matrix in order to highlight the pixels which were representing the red ball. Because we
wanted this matrix to be shown as an image while we were debugging, we then normalized the values so
that the maximum pixel value would be 255. Finally, using the Matlab function "find", we get the pixel
number that has the first occurrence of pixel value equals to 255, shift this value into half of the filter size
and use that pixel position as the position of the red ball detected. Just before moving on to the n...
View Full Document
This document was uploaded on 02/14/2014 for the course CSCI 6505 at Dalhousie.
- Fall '12
- Machine Learning