Ginni has Published 1522 Articles

How to detect and track the motion of eyeball in OpenCV using C++?

Ginni

Ginni

Updated on 10-Mar-2021 09:16:37

528 Views

Here, we will learn how to detect and track the motion of eyeball in OpenCV.The following program demonstrates to detect the eyeball and track the location.Example#include #include #include #include #include #include using namespace cv; using namespace std; Vec3f eyeBallDetection(Mat& eye, vector& circles) {    vectorsums(circles.size(), 0);    for (int y ... Read More

How to track the eye in OpenCV using C++?

Ginni

Ginni

Updated on 10-Mar-2021 09:13:36

1K+ Views

Here, we will learn how to track the eye in OpenCV. After detective the eyes, the tracking is an effortless and straightforward task. We used the circle to enclose the detected eyes. Tracking the center of the circle means tracking the center of eyes. To track the center of the ... Read More

How to detect the eye in OpenCV using C++?

Ginni

Ginni

Updated on 10-Mar-2021 09:12:36

1K+ Views

Here, we will learn how to detect the eye in OpenCV. We will use haarcascade_eye.xml classifier located in 'C:/opencv/sources/data/haarcascades' to detect the eyes. To detect the eyes, we need to add these headers.The first header is , and it is the header of C++ programming language. Reading writing images and ... Read More

How to track the face in real-time in OpenCV using C++?

Ginni

Ginni

Updated on 10-Mar-2021 09:08:19

354 Views

We will learn how to track the face in real-time in OpenCV. This program is same to the previous program and difference is that we used ellipse instead of rectangle to identify the face and we also used additional 'cout' statement to show the co-ordinate of the face in the ... Read More

How to detect human faces in real-time in OpenCV using C++?

Ginni

Ginni

Updated on 10-Mar-2021 09:06:25

2K+ Views

Detecting face in real-time is similar to detecting a face in still pictures.  The only difference is in real-time face detection, and we have to take a video stream of computer. In this program, we used 'VideoCapture()' function. This function captures video from other camera and stores the frames temporarily ... Read More

How to track the position of the face in OpenCV using C++?

Ginni

Ginni

Updated on 10-Mar-2021 09:05:32

348 Views

When we want to track the position of the face, it is better to enclose the face with ellipse because an ellipse has a center. This center is also the center point of the detected face. As result, tracking the position of detected face becomes more accurate.The following program tracks ... Read More

How to detect the largest face in OpenCV using C++?

Ginni

Ginni

Updated on 10-Mar-2021 09:03:37

305 Views

We will learn how to detect the largest face only. This topic is same as the previous topic. The only difference is we used an additional 'Rect' structure and a 'for loop' to detect the largest face.The actual format of this function −Mat faceROI = image_with_humanface(maxRect)The maxRect have the area ... Read More

How to crop the detected faces in OpenCV using C++?

Ginni

Ginni

Updated on 10-Mar-2021 08:59:54

758 Views

We will know how to crop the detected faces in OpenCV. To crop detected faces, we need multiple matrices. The most appropriate way is to use an image array. In this program using the following two lines, we have declared two image matrices −Mat cropped_faces[4];Mat faceROI[4];The first matrix is to ... Read More

How to count the number of faces in OpenCV using C++?

Ginni

Ginni

Updated on 10-Mar-2021 08:58:49

337 Views

Counting the number of faces located in an image is easy. The program we wrote in the previous section already have the information of number of faces in 'faces.size()'. This code-'faces.size()' gives an integer value.For example, if we write 'int x = faces.size()', the 'x' will contain the number of ... Read More

How to detect the face in still picture in OpenCV using C++?

Ginni

Ginni

Updated on 10-Mar-2021 08:55:37

697 Views

We detect the faces from the image. To detect the face, we used 'detectMultiScale()' function.The actual format of this function is −SyntaxdetectMultiScale(source matrix, vector, searchScaleFactor, minNeighbours, flags, minfeatureSize)By changing the function arguments, we can control the 'detect.MultiSpace()' function. This function takes the following arguments.Source MatrixIt is the matrix where the ... Read More

Advertisements