<<Prev 1 2 3 4 5 6 Next>>
Ball Size
We don't really need the exact size of the ball since our movements will be based on any arbitrary measurement
that is consistent from one frame to another. When that measurement decreases we should move forward, when it
increases we should move backwards.
By adding in the Center of Gravity module we now have
some RoboRealm variables that we can use for this task. We will chose COG_BOX_SIZE and configure the
module to show a bounding box around 80% of the pixels. The COG_BOX_SIZE is the width OR height of the bounding
box as the bounding box in this case is always ensured to be square.
Below we can see the Center of Gravity graphical overlay for two images. One closer than the other.
The COG_BOX_SIZE for image #1 is 148 while for image #2 it is 61. It is clear that we can use this
number as a movement indicator to the BucketBot.
This works well but we have a problem when images get much further away ...
<<Prev 1 2 3 4 5 6 Next>>
|