Ginni has Published 1580 Articles

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

Ginni

Ginni

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

912 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

269 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

264 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

225 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

611 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

264 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

579 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

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

Ginni

Ginni

Updated on 10-Mar-2021 08:52:23

588 Views

Color tracking is similar to color detection. For tracking purpose, we added extra few lines to calculate the area of the detected object and then track the current position of that area and finally used line() function of OpenCV to show the object's path of motion.The following program demonstrates how ... Read More

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

Ginni

Ginni

Updated on 10-Mar-2021 08:50:24

2K+ Views

We will understand how to detect specific color and track object based on color. Performance of color detection and color detection based tracking system is environment dependent.If you change light of the room or if you change background color, there will be significant effect on color detection.The following program demonstrates ... Read More

Advertisements