Ginni has Published 1597 Articles

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

Ginni

Ginni

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

249 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

209 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

575 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

253 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

555 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

563 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

How to work with Mouse Events using OpenCV in C++?

Ginni

Ginni

Updated on 10-Mar-2021 08:48:25

1K+ Views

Mouse Events is one of the most useful features of OpenCV. In OpenCV, we can track the mouse pointer's position and track the clicks (right, left and middle-click). OpenCV has a wide application in robotics and computer vision. In robotics and computer vision tracking mouse pointer and clicks are frequently ... Read More

How to rotate a video in OpenCV using C++?

Ginni

Ginni

Updated on 10-Mar-2021 08:47:25

372 Views

Rotating a video is similar to rotate an image. The only difference is instead of load a still picture into an image matrix, we have loaded a video or take video stream from the camera.Here, we are not loading the video but taking a video using the camera. If you ... Read More

How to change the size of an image and add a border in OpenCV using C++?

Ginni

Ginni

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

169 Views

In this topic, we will see another application of trackbar. Here, we will use track-bar to change the size of an image and add a border to the image and change the border's size using the track-bar.Using the following program, we can change the size of an image, add a ... Read More

Advertisements