Python OpenCV : auto aiming Robot won't let go of me!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
meet Mr Arjuna timbi he's an adorable little robot that can continually aim at moving things using a single eye and some python Wizardry our first Mr python course they were expected to create something useful as a final project and I always prefer coolness over usefulness so I came up with this idea of a laser turret that can lock on its Target and it also gave me a nice problem to exercise my brain a little by little I mean constraining to just hand detection as I'm a hardware guy I don't want to spend all my time programming so the first thing we want to do is to know where our hand is relative to the camera and this is where python shines with its ton of Library support I can track my hand in a few seconds now once we have the tracking info we can calculate the virtual distance between these two points which would give us a value in pixels so it's a measuring tape and carefully plotting the data of this distance versus how far my hand is from the camera we straight away arrive at these two straight line equations using simple high school math and the polyphoid function in Python to find out this curve right here these equations are what I call camera equations it will tell you how far your hand is from the camera based upon this distance notice one thing that the distance between these two points always remains constant in real life we will use this fact to calculate the X and Y values which is again just basic math you'd figure it out or check out the link to my code in the description all these distances are with respect to the camera to calculate the turret angles we need to know the X Y and Z values between the camera and the turret and compensate accordingly then calculate the angles for which I wrote a library angles.py finally these angles are sent through serial communication to Mr timby whose body I forged using on ship and a 3D printer somehow one of the motors stopped working turns out it was damaged from the start but this is how it looks when both these servers work foreign
Info
Channel: Dhruv Wadhwa
Views: 16,328
Rating: undefined out of 5
Keywords:
Id: i2odaMNlr0s
Channel Id: undefined
Length: 2min 19sec (139 seconds)
Published: Mon Jul 31 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.