Auball: Difference between revisions
(Created page with "Back to AU Robot Servers == Ball finder plugin== A plugin intended for finding coloured balls in a camera image. File:ball_5271_18.png Figure. There is 2 or 3 col...") |
|||
Line 42: | Line 42: | ||
In the demo code there is a - rather high - number of parameters, these are | In the demo code there is a - rather high - number of parameters, these are | ||
poolImg=28 (r/w) image pool number to use as source | |||
poolDebugImg=45 (r/w) first image pool number to use for interim images | |||
redHue=175 (r/w) hue value (in HSV formet) for red ball range [0-180] | redHue=175 (r/w) hue value (in HSV formet) for red ball range [0-180] | ||
(~120=red) | (~120=red) |
Revision as of 14:51, 11 February 2020
Back to AU Robot Servers
Ball finder plugin
A plugin intended for finding coloured balls in a camera image.
Figure. There is 2 or 3 coloured objects, 2 red in the front and a darker blue in the back.
convert to HSV
The same image in HSV format
Figure. A high hue value shown as blue, a high saturation in green (e.g. the dark red in the front and the blue lit in the back), the intensity (value) is shown in red (ex. the cup in the front). White objects have a hue of 0, the hue of dark objects is unreliable.
Crop
The image is cropped to the interesting Range Of Interest, here the top 100 rows are removed.
Split into planes
The individual planes shown as grayscale images.
Figure. Hue, 0 is yellow (dark like the table, green is about 50 (rather dark), blue is about 115 (brighter), red is about 170 (bright). Maximum is 179, then it is back to 0.
Figure. Saturation, the brighter the more saturated the colour.
Figure. Intensity, this is a grayscale version of the original image.
Parameters
In the demo code there is a - rather high - number of parameters, these are
poolImg=28 (r/w) image pool number to use as source poolDebugImg=45 (r/w) first image pool number to use for interim images redHue=175 (r/w) hue value (in HSV formet) for red ball range [0-180] (~120=red) redCnt=2 (r) Number of red balls found in last image blueHue=112 (r/w) hue value (in HSV formet) for blue ball range [0-180] (~0=blue) blueCnt=1 (r) Number of blue balls found in last image BallSize=0.12 (r/w) Size of the ball (diameter [m]) topLine=100 (r/w) is the topmost line that could be a ball on the floor. size=14 80 (r/w) size limits of ball in pixels [min max] hough=700 70 5 (r/w) params for Hough (canny high [0-1000], hough vote [0..255], Hough resolution 1(fine)..8(rough)) colLim=13 13 (rw) Color limit (+/-) for circle center hue match [red blue] [0..180] mrc=1 (rw) Should result be send to MRC (smrcl) debug=1 (rw) make more debug images and printout filter=1 5 (rw) smooth image before detect [filter 0-1, size NxN] opening=2 (rw) Opening before Hough circles limitSat=70 (rw) do not use pixels with saturation lower than this (0..255) limitVal=70 (rw) do not use pixels with a lower V-value (intensity) lower than this (0..255)