Using each colour intensity RGB components, histograms for each pixel were made. All of the green components were removed. Using a maximum intensity of 25000, the red values cut off 67-133 and 67-135 gave better values with all 5 balls found but white patches on the table.
Changing the red and blue bands to give the best results, 5 balls found and edge of the table, the felt was blocked out. If it finds a red between 85 and 151, a blue between 47 and 170, and green between 0 and 255, these values are set to zero and all other values set to 255 (white)
Matlab has a function 'edge' which can apply different edge detection techniques: canny, sobel, log, roberts, prewitt, and zero cross.
The best results were found using the canny technique.
No comments:
Post a Comment