Hello Friends! In this blog, you will learn to find out the distance between you and your webcam. Take a look at the video below. Let's get started. For this project, we will be using face detection using the Haar Cascade method. Therefore, we need to download the cascade classifier for face detection from Github. You can download and paste the file from this link . Let us first understand what is Haar Cascade? Haar Cascade is a machine learning object detection algorithm used to identify objects in an image or video and based on various features. If you want to read a more detailed version of it, check out this link . Now, we will start by importing the libraries and define a variable to capture video from my webcam. import cv2 import numpy as np cap = cv2.VideoCapture( 0 ) Let us import our classifier file which we downloaded from Github. face = cv2.CascadeClassifier( 'haarcascade_frontalface_alt.xml' ) write a while loop and capture the image frames. Also, w...
In this blog, you will get to learn a lot about computer vision. The blog posts are written in such a way that even a newbie can understand. This blog tries to clear the most fundamental concepts of image processing and computer vision.