In this project, we are going to demonstrate how one can drive a car by just detecting hand gestures on the steering wheel. Let’s say the requirement is something like this –
- If driver wants to start the car then put both of your hands on the steering wheel.
- If someone having no hands on a steering wheel that means brakes of car will be applied slowly.
- If one hand is detected on the steering wheel that means he/she can drive the car upto a certain limit due to safety purpose.
- If someone having both of the hands on the steering wheel that means that he/she can drive at any speed because according to our system you are safe and can safely handle car with both of your hands.
For this project we need to import two Python libraries that is OpenCV and numpy. How to install these two libraries.
1) pip install opencv-python 2) pip install numpy
Below is the implementation :
We have imported two libraries named opencv and numpy. Then in the next line we use the function
VideoCapture(0) of opencv and passed the parameter as 0 because your laptop webcam supports port 0 to use the camera. Now, use the function
CascadeClassifier('hand.xml') and pass the xml file as parameter. Store the file of hand.xml in the same directory as of Python file.
Code #2 :
In this code section, we use the counter that can help us to start the car’s engine and after the car starts we use the counting of contours on a steering wheel.
GitHub link of the project – Click Here
- OpenCV and Keras | Traffic Sign Classification for Self-Driving Car
- Overview of Kalman Filter for Self-Driving Car
- Real-Time Edge Detection using OpenCV in Python | Canny edge detection method
- Python | Corner detection with Harris Corner Detection method using OpenCV
- Python | Corner Detection with Shi-Tomasi Corner Detection Method using OpenCV
- Object Detection with Detection Transformer (DERT) by Facebook
- Draw a car using Turtle in Python
- Project Idea | (Games using Hand Gestures)
- Project Idea | (Dynamic Hand Gesture Recognition using neural network)
- Detect and Recognize Car License Plate from a video in real time
- Project Idea | Hand-Web Browser
- Detection of a specific color(blue here) using OpenCV with Python
- Python Program to detect the edges of an image using OpenCV | Sobel edge detection method
- Face Detection using Python and OpenCV with webcam
- Python | Real time weather detection using Tkinter
- Python | Smile detection using OpenCV
- Python | Document field detection using Template Matching
- Circle Detection using OpenCV | Python
- White and black dot detection using OpenCV | Python
- Text detection using Python
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.