|
ARDUINO UNO REV3 |
x 1 | |
|
MG 996RSeamuing
|
x 1 |
|
arduino IDEArduino
|
Full-auto nerf gun that shoots you in face, using OpenCV
I've been building this project as a way to learn computer vision.
I've been documenting the build progress on my YouTube channel: https://www.youtube.com/channel/UCcT3iGeJJfpGU1QehvG48tg/videosw
Currently the project sort of works as an initial version, but I may come back to it at some point and try to improve it. If you want to see the final testing watch this video, and then below I'll put more details about the build process
I started with creating a prototype to test the face-tracking without the nerf gun, which would both mean it would be lighter and easier to quickly to together, and also that I wouldn't be constantly shot by nerf bullets whilst trying to get the software working.
The testing setup comprises of two servos, one for pan and one for tilt, with a webcam mounted on top, as shown below:
The webcam is plugged into a computer running a python script with OpenCV. That detects a face, and sends the coordinates of where it is within the image to an Arduino, which moves the pan and tilt servos so that the centre of the face (green dot) is within the centre of the image (white square).
I used a guide by Shubham Santosh (https://create.arduino.cc/projecthub/shubhamsantosh99/face-tracker-using-opencv-and-arduino-55412e) for this part, so thanks to him for pretty much half the project!
I could then design and print a larger and more sturdy two axis mount for the nerf gun, and a firing mechanism which is triggered when the face is within the centre of the screen (shooting me in the face, apologies for my lack of eye protection!)
And after that, all that was left to do was test it!
It works, although currently motion is a bit jerky, and it might be worth adding in a feature to scan the room if no face is detected.
To see the test (and me get shot in the face) check out the testing video: https://www.youtube.com/watch?v=N5vzpi4yF7A&ab_channel=AdamBeedle
Full-auto nerf gun that shoots you in face, using OpenCV
- Comments(3)
- Likes(4)
- Engineer Dec 14,2023
- DrkZ May 27,2023
- Andre Almeida Pinto May 01,2023
- Sebastian Mackowiak Mar 21,2023
- 0 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
More by adambeedle
- Robot that swings and climbs walls like Spider-Man I've been building this project for over a month as a way to get to grips with electronics/robotics/...
- Full-auto nerf gun that shoots you in face, using OpenCV I've been building this project as a way to learn computer vision.I've been documenting the build pr...
-
-
-
-
-
-
3D printed Enclosure Backplate for Riden RD60xx power supplies
154 1 1 -
-