Description: The provided Matlab functions demonstrate a simple method for training and testing a color detection system. In general, a color detection algorithm searches an image for pixels that have a specific color. In this demo the HSV color space has been used, instead of the RGB space. According to that model, H(ue) dimension represents the "color", S(aturation) dimension represents the dominance of that color and the V(alue) dimension represents the brightness. Therefore, the color detection algorithm can search in terms of color position and color "purity", instead of searching for specific RGB values. We have to note here, that in order to detect the desired color, it is needed to define a tolerance in each HSV dimension. For example a tolerance equal to 0.050 in the H dimension means that the algorithm will detect pixels whose H value has a distance (from the desired value) less than 0.050.
File list (Check if you may need any files):
balls.JPG
colorDetectHSV.m
documentation.html
example.jpg
example.m
figure3.jpg
figure3B.jpg
getHSVColorFromDirectory.m
license.txt
method.jpg
selectPixelsAndGetHSV.m