This example uses Dice and the black spots on the dice (the pips) as our object. As the example is quite long, first explaining some key concepts is critical to understanding the example.
Understanding the first example, "Getting a static image, detecting items on it, and outputting the result...