![Hiwonder SpiderPi User Manual Download Page 20](http://html1.mh-extra.com/html/hiwonder/spiderpi/spiderpi_user-manual_2140532020.webp)
3.
Cloud Head Colour Tracking
In the last lesson, we have learned about the Raspberry Pi color recognition
function. In this lesson, we will learn how to let the robot recognise the
colour and let the camera follow the object of the target colour as well
1 ) Start the VNC to remotely connect to the robot. Open the LX
terminal (shortcut Ctrl+Alt+T ), enter the command as shown below and
press "Enter" to locate the image recognition directory.
Image 3-1 Image Recognition Program Location
2 ) Next, enter the command shown on the image below. In the pop-up
window, we can see the real-time image. If there is a blue object in the
camera's field of view, the robot head will follow the movement of the
object. The object cannot move too fast. Otherwise, it cannot catch it
Image 3-2 Cloud Head Colour Tracking Programs Running Command
Image 3-3 Cloud Head Bule Colour Object Tracking
3 ) Press "Ctrl+C" on the keyboard at the same time to stop running the
game program.