CCTV Tracking using MediaPipe
Instruction – CCTV Tracking using MediaPipe, Servo Webcam, and Raspberry Pi 4
Open the provided Adam_pycode_pid.txt document file.
Copy all the code inside the file.
Paste the code into your Raspberry Pi.
Save it as a .py file (Example: body_servo_tracker.py)
Make sure to install the required libraries first.
You can install them from the terminal using:
pip install mediapipe opencv-python RPi.GPIO
After installing, run the Python code on your Raspberry Pi using:
python3 adam_folder/body_servo_tracker.py --servo-pin 18 camera-index 0
Important Notes
Make sure you are using Raspberry Pi 4.
Ensure the webcam is connected properly to the Raspberry Pi.
Make sure the servo signal pin is connected to GPIO 18.
Check that the camera index is correct. If 0 does not work, try another index such as 1.
Ensure the servo has a proper power supply if needed.
24 Views

