Autonomous Humanoid Detection and Targeting

Tired of people snooping on your screen? Upset that your privacy filter can't keep up with the realities of curious bypassers? Fear no more!

The Autonomous Humanoid Detection and Targeting Sentry will automagically paint a 5mW 350nm laser on peeping toms detected in the vicinity of your device. It intelligently tracks and lases the nearest target, who poses the greatest threat to exposing your dodgy virtual activities.


The Autonomous Humanoid Detection and Targeting Sentry is inspired by the thousands of hours wasted and hundreds of weekends burnt by bright young Singaporean males performing mindless sentry duties.

What It Does

The Autonomous Humanoid Detection and Targeting Sentry is an area denial device. The Pi camera captures still frames and detects all faces in the frame. The nearest, or largest detected face is located, and the servos will adjust to target the eyes of the intruder, posing an existential threat to his vision.

How We Built It

Servo mounted on servo provides two degrees of freedom - longitudinal and latitudinal. Mounting the laser on top topmost servo makes its able to target anywhere in the camera's field of view. Next, we calibrated the values for the server so that we can translate the coordinates of the face in the camera into angles for the servo.

Challenges We Ran Into

The Raspberry Pi only provides one PWM output pin, and hence only one servo can be controlled. Calibrated values do not work all the times. The linear interpolation used is inaccurate when faces are too near or too far from the distance used in calibration. Our own eyes have been mutilated incessantly by the sentry during testing.

Accomplishments That We Are Proud Of

Calibration of the servos such that the laser dot correspond to the positions on the camera.
Using OpenCV's Haar Cascade to detect faces.
Finding a workaround for the PWM pin limitations - originally software PWM, then hardware.
Multi-processing with message passing for parallel processing of computationally intensive components.
Resourcefulness and Ice Lemon Tea.

What We Learnt

The fact that there are 2 PWM pins on the Raspberry Pi.
Buy Airport WiFi for hackathons.

What's Next

Protection of Key Installations
Patrolling the Mexican border
Enforcing DMZ on the 38th parallel (and Sinai Desert)
Home security

Built With

Python, Raspberry Pi, OpenCV, WiringPi, piCamera

Built With

  • almost-an-arduino
  • breadboard
  • camera
  • duct-tape
  • gpiozero
  • haar-cascades
  • ice-lemon-tea
  • kit-kat
  • light-amplification-by-stimulated-emission-of-radiation
  • opencv
  • picamera
  • pre-emptive-multitasking-by-completely-fair-scheduler
  • pulse-width-modulation
  • python
  • raspberry-pi
  • servo
  • wiringpi
Share this project: