Machine learning enables robots to use sensor or image inputs to detect events, choose actions, and respond autonomously without explicit rules for every case. section 9.0
Robotic uses include:
- Detecting faces in camera images and live video. section 9.0
- Driving servo motors so a camera follows detected face movements. section 9.0
- Supporting autonomous tasks such as delivery and construction through sensor-based decisions. section 9.0
Face detection with OpenCV
OpenCV trains Haar feature-based cascade classifiers from positive and negative face images. A pretrained XML model can then classify an image: import cv2, locate the installed data directory, create a CascadeClassifier, read photo.jpg, convert it to grayscale, equalize its histogram, and call detectMultiScale. The resulting coordinates identify detected faces for later motor control. section 9.3.1
Use the Raspberry Pi hardware overview to identify the compact computer, camera support, processing resources, and connectivity that support machine-learning robot projects. section 2.1.1









































