Ball Detection: Difference between revisions
No edit summary |
|||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
==Design Choice== | ==Design Choice== | ||
<p> | <p> | ||
Using a vision based ball detection approach is almost a given if we take into account the fact that we are searching for a non-tracking or invasive method. Nevertheless, several methods were researched and compared:</p> | |||
Line 8: | Line 8: | ||
<p> | <p> | ||
The final design choice was to use | The final design choice was to use a color detection method and it was made based on the amount of previous experience, non-invasive, robustness and easy to implement criteria.</p> | ||
==Methodology== | ==Methodology== | ||
Line 22: | Line 22: | ||
[[File:Color thresholder app.jpg|thumb|right|upright=1.5|Color Thresholder App used for a Red Ball + Soccer Lines mask creation. Source: MATLAB]] | [[File:Color thresholder app.jpg|thumb|right|upright=1.5|Color Thresholder App used for a Red Ball + Soccer Lines mask creation. Source: MATLAB]] | ||
===Color based filtering=== | |||
<p> | <p> | ||
In order to carry out the color filtering creating a mask is required. Thus, knowing the color we are going to filter in advanced is a must. In this project, the ‘Color Thresholder’ App from MATLAB was used to create the masking functions.</p> | In order to carry out the color filtering creating a mask is required. Thus, knowing the color we are going to filter in advanced is a must. In this project, the ‘Color Thresholder’ App from MATLAB was used to create the masking functions.</p> | ||
===Circular shape matching=== | |||
<p> | <p> | ||
The Hough transform is used to detect the circular shape of the ball. Parameters like the sensitivity of the metric and the radius we are looking for should be defined beforehand for an effective matching. Assuming we are only going to have a certain circular shape with a pre-defined radius, based on the theta of the camera’s FOV and the height at which the frame was taken, only the sensitivity of the Hough Transform should be tuned to get the ball candidate with a relative low false positive rate.</p> | The Hough transform is used to detect the circular shape of the ball. Parameters like the sensitivity of the metric and the radius we are looking for should be defined beforehand for an effective matching. Assuming we are only going to have a certain circular shape with a pre-defined radius, based on the theta of the camera’s FOV and the height at which the frame was taken, only the sensitivity of the Hough Transform should be tuned to get the ball candidate with a relative low false positive rate.</p> | ||
</ | |||
==Ball detection output== | |||
<p> | |||
The Ball Detection sub-task outputs the coordinates in pixels of the center of the ball in the frame.</p> | |||
==Use in refereeing== | ==Use in refereeing== | ||
<p> | <p> | ||
One condition to enable | One condition to enable [[Refereeing Out of Pitch]] is to have detected a ball within the frame.</p> |
Latest revision as of 14:49, 31 March 2016
Design Choice
Using a vision based ball detection approach is almost a given if we take into account the fact that we are searching for a non-tracking or invasive method. Nevertheless, several methods were researched and compared:
The final design choice was to use a color detection method and it was made based on the amount of previous experience, non-invasive, robustness and easy to implement criteria.
Methodology
Color detection methods are based on removing pixels that do not pass a certain pre-defined color threshold. Thus, filtering will output an image with only the color based pixels we are looking for. From that point onwards, matching and selecting the object becomes the main concern. For selecting the ball candidate, a circular shape matching will be used taking into account that a ball will be seen as a circle from all perspectives, assuming there is no occlusion.
The whole detection process can be divided into two main parts:
- Color based filtering
- Circular shape matching
Color based filtering
In order to carry out the color filtering creating a mask is required. Thus, knowing the color we are going to filter in advanced is a must. In this project, the ‘Color Thresholder’ App from MATLAB was used to create the masking functions.
Circular shape matching
The Hough transform is used to detect the circular shape of the ball. Parameters like the sensitivity of the metric and the radius we are looking for should be defined beforehand for an effective matching. Assuming we are only going to have a certain circular shape with a pre-defined radius, based on the theta of the camera’s FOV and the height at which the frame was taken, only the sensitivity of the Hough Transform should be tuned to get the ball candidate with a relative low false positive rate.
Ball detection output
The Ball Detection sub-task outputs the coordinates in pixels of the center of the ball in the frame.
Use in refereeing
One condition to enable Refereeing Out of Pitch is to have detected a ball within the frame.