{"id":19722,"date":"2023-06-09T17:05:00","date_gmt":"2023-06-09T11:35:00","guid":{"rendered":"https:\/\/www.mygreatlearning.com\/blog\/viola-jones-algorithm\/"},"modified":"2024-09-02T17:01:39","modified_gmt":"2024-09-02T11:31:39","slug":"viola-jones-algorithm","status":"publish","type":"post","link":"https:\/\/www.mygreatlearning.com\/blog\/viola-jones-algorithm\/","title":{"rendered":"Face Detection using Viola Jones Algorithm"},"content":{"rendered":"\n<p>In the realm of computer vision, face detection stands as a fundamental and captivating task. Detecting and locating faces within images or video streams forms the cornerstone of numerous applications, from facial recognition systems to digital image processing. Among the many algorithms developed to tackle this challenge, the Viola-Jones algorithm has emerged as a groundbreaking approach renowned for its speed and accuracy.<\/p>\n\n\n\n<p>The Viola-Jones algorithm, pioneered by Paul Viola and Michael Jones in 2001, revolutionized the field of face detection. Its efficient and robust methodology opened doors to a wide range of applications that rely on accurately identifying and analyzing human faces. By harnessing the power of Haar-like features, integral images, machine learning, and cascades of classifiers, the Viola-Jones algorithm showcases the synergy between computer science and image processing.<\/p>\n\n\n\n<p>In this blog, we will delve into the intricacies of the Viola-Jones algorithm, unraveling its underlying mechanisms and exploring its applications. From its training process to its implementation in real-world scenarios, we will unlock the power of face detection and witness firsthand the transformative capabilities of the Viola-Jones algorithm.<\/p>\n\n\n<figure class=\"wp-block-image aligncenter size-large is-resized zoomable\" data-full=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/08\/dp.png\"><img decoding=\"async\" width=\"489\" height=\"360\" src=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/08\/dp.png\" alt=\"Viola jones algorithm\" class=\"wp-image-19841\" style=\"width:327px;height:241px\" srcset=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/08\/dp.png 489w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/08\/dp-300x221.png 300w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/08\/dp-80x60.png 80w\" sizes=\"(max-width: 489px) 100vw, 489px\" \/><figcaption class=\"wp-element-caption\">                        Detecting face and eyes <\/figcaption><\/figure>\n\n\n\n<ol class=\"wp-block-list\">\n<li><a href=\"#sh1\">What is face detection?<\/a><\/li>\n\n\n\n<li><a href=\"#sh2\">What is Viola Jones algorithm?<\/a>\n<ol class=\"wp-block-list\">\n<li><a href=\"#sh21\">What are Haar-Like Features?<\/a><\/li>\n\n\n\n<li><a href=\"#sh22\">What are Integral Images?<\/a><\/li>\n\n\n\n<li><a href=\"#sh23\">How is AdaBoost used in viola jones algorithm?<\/a><\/li>\n\n\n\n<li><a href=\"#sh24\">What are Cascading Classifiers?<\/a><\/li>\n<\/ol>\n<\/li>\n\n\n\n<li><a href=\"#sh3\">Using a Viola Jones Classifier to detect faces in a live webcam feed<\/a><\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.mygreatlearning.com\/academy\/learn-for-free\/courses\/computer-vision-essentials\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" src=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/June-29-banner-for-GL-computer-vision-1.png\" alt=\"computer vision\"\/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-is-face-detection\"><strong>What is face detection?<\/strong><\/h2>\n\n\n\n<p>Object detection is one of the computer technologies that is connected to image processing and <a href=\"https:\/\/www.mygreatlearning.com\/blog\/what-is-computer-vision-the-basics\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"computer vision (opens in a new tab)\">computer vision<\/a>. It is concerned with detecting instances of an object such as human faces, buildings, trees, cars, etc. The primary aim of face detection algorithms is to determine whether there is any face in an image or not.<\/p>\n\n\n\n<p>In recent years, we have seen significant advancement of technologies that can detect and recognise faces. Our mobile cameras are often equipped with such technology where we can see a box around the faces. Although there are quite advanced face detection algorithms, especially with the introduction of deep learning, the introduction of viola jones algorithm in 2001 was a&nbsp; breakthrough in this field. Now let us explore the viola jones algorithm in detail.<br><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-is-viola-jones-algorithm\"><strong>What is Viola Jones algorithm?<\/strong><\/h2>\n\n\n\n<p>Viola Jones algorithm is named after two computer vision researchers who proposed the method in 2001, Paul Viola and Michael Jones in their paper, \"Rapid Object Detection using a Boosted Cascade of Simple Features\". Despite being an outdated framework, Viola-Jones is quite powerful, and its application has proven to be exceptionally notable in real-time face detection. This algorithm is painfully slow to train but can detect faces in real-time with impressive speed.<\/p>\n\n\n\n<p>Given an image(this algorithm works on grayscale image), the algorithm looks at many smaller subregions and tries to find a face by looking for specific features in each subregion. It needs to check many different positions and scales because an image can contain many faces of various sizes. Viola and Jones used Haar-like features to detect faces in this algorithm.<\/p>\n\n\n\n<p>The Viola Jones algorithm has four main steps, which we shall discuss in the sections to follow:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Selecting Haar-like features<\/li>\n\n\n\n<li>Creating an integral image<\/li>\n\n\n\n<li>Running AdaBoost training<\/li>\n\n\n\n<li>Creating classifier cascades<\/li>\n<\/ol>\n\n\n\n    <div class=\"courses-cta-container\">\n        <div class=\"courses-cta-card\">\n            <div class=\"courses-cta-header\">\n                <div class=\"courses-learn-icon\"><\/div>\n                <span class=\"courses-learn-text\">Texas McCombs, UT Austin<\/span>\n            <\/div>\n            <p class=\"courses-cta-title\">\n                <a href=\"https:\/\/onlineexeced.mccombs.utexas.edu\/online-ai-machine-learning-course\" class=\"courses-cta-title-link\">Post Graduate Program in AI &amp; Machine Learning: Business Applications<\/a>\n            <\/p>\n            <p class=\"courses-cta-description\">Master in-demand AI and machine learning skills with this executive-level AI course\u2014designed to transform professionals into strategic tech leaders.<\/p>\n            <div class=\"courses-cta-stats\">\n                <div class=\"courses-stat-item\">\n                    <div class=\"courses-stat-icon courses-user-icon\"><\/div>\n                    <span>Duration: 7 months<\/span>\n                <\/div>\n                <div class=\"courses-stat-item\">\n                    <div class=\"courses-stat-icon courses-star-icon\"><\/div>\n                    <span>4.72\/5 Rating<\/span>\n                <\/div>\n            <\/div>\n            <a href=\"https:\/\/onlineexeced.mccombs.utexas.edu\/online-ai-machine-learning-course\" class=\"courses-cta-button\">\n                Take your First Step\n                <div class=\"courses-arrow-icon\"><\/div>\n            <\/a>\n        <\/div>\n    <\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-are-haar-like-features\"><strong>What are Haar-Like Features?<\/strong><\/h2>\n\n\n\n<p>In the 19th century a Hungarian mathematician, Alfred Haar gave the concepts of Haar wavelets, which are a sequence of rescaled \"square-shaped\" functions which together form a wavelet family or basis. Voila and Jones adapted the idea of using Haar wavelets and developed the so-called Haar-like features.&nbsp;<\/p>\n\n\n\n<p>Haar-like features are digital image features used in object recognition. All human faces share some universal properties of the human face like the eyes region is darker than its neighbour pixels, and the nose region is brighter than the eye region.<br><\/p>\n\n\n\n<p>A simple way to find out which region is lighter or darker is to sum up the pixel values of both regions and compare them. The sum of pixel values in the darker region will be smaller than the sum of pixels in the lighter region. If one side is lighter than the other, it may be an edge of an eyebrow or sometimes the middle portion may be shinier than the surrounding boxes, which can be interpreted as a nose This can be accomplished using Haar-like features and with the help of them, we can interpret the different parts of a face.&nbsp;<\/p>\n\n\n\n<p>There are 3 types of Haar-like features that Viola and Jones identified in their research:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Edge features<\/li>\n\n\n\n<li>Line-features<\/li>\n\n\n\n<li>Four-sided features<\/li>\n<\/ol>\n\n\n\n<p>Edge features and Line features are useful for detecting edges and lines respectively. The four-sided features are used for finding diagonal features.<\/p>\n\n\n\n<p>The value of the feature is calculated as a single number: the sum of pixel values in the black area minus the sum of pixel values in the white area. The value is zero for a plain surface in which all the pixels have the same value, and thus, provide no useful information.&nbsp;<br><\/p>\n\n\n\n<p>Since our faces are of complex shapes with darker and brighter spots, a Haar-like feature gives you a large number when the areas in the black and white rectangles are very different. Using this value, we get a piece of valid information out of the image.<\/p>\n\n\n\n<p>To be useful, a Haar-like feature needs to give you a large number, meaning that the areas in the black and white rectangles are very different. There are known features that perform very well to detect human faces:<\/p>\n\n\n\n<p>For example, when we apply this specific haar-like feature to the bridge of the nose, we get a good response. Similarly, we combine many of these features to understand if an image region contains a human face.<br><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-are-integral-images\"><strong>What are Integral Images?<\/strong><\/h2>\n\n\n\n<p>In the previous section, we have seen that to calculate a value for each feature, we need to perform computations on all the pixels inside that particular feature. In reality, these calculations can be very intensive since the number of pixels would be much greater when we are dealing with a large feature.&nbsp;<br><\/p>\n\n\n\n<p>The integral image plays its part in allowing us to perform these intensive calculations quickly so we can understand whether a feature of several features fit the criteria.<\/p>\n\n\n\n<p>An integral image (also known as a summed-area table) is the name of both a data structure and an algorithm used to obtain this data structure. It is used as a quick and efficient way to calculate the sum of pixel values in an image or rectangular part of an image.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"how-is-adaboost-used-in-viola-jones-algorithm\"><strong>How is AdaBoost used in viola jones algorithm?<\/strong><\/h2>\n\n\n\n<p>Next, we use a Machine Learning algorithm known as AdaBoost. But why do we even want an algorithm?<br><\/p>\n\n\n\n<p>The number of features that are present in the 24x24 detector window is nearly 160,000, but only a few of these features are important to identify a face. So we use the AdaBoost algorithm to identify the best features in the 160,000 features.&nbsp;<br><\/p>\n\n\n\n<p>In the Viola-Jones algorithm, each Haar-like feature represents a weak learner. To decide the type and size of a feature that goes into the final classifier, AdaBoost checks the performance of all classifiers that you supply to it.<br><\/p>\n\n\n\n<p>To calculate the performance of a classifier, you evaluate it on all subregions of all the images used for training. Some subregions will produce a strong response in the classifier. Those will be classified as positives, meaning the classifier thinks it contains a human face. Subregions that don\u2019t provide a strong response don\u2019t contain a human face, in the classifiers opinion. They will be classified as negatives.<br><\/p>\n\n\n\n<p>The classifiers that performed well are given higher importance or weight. The final result is a strong classifier, also called a boosted classifier, that contains the best performing weak classifiers.<br><\/p>\n\n\n\n<p>So when we\u2019re training the AdaBoost to identify important features, we\u2019re feeding it information in the form of training data and subsequently training it to learn from the information to predict. So ultimately, the algorithm is setting a minimum threshold to determine whether something can be classified as a useful feature or not.<\/p>\n\n\n\n    <div class=\"courses-cta-container\">\n        <div class=\"courses-cta-card\">\n            <div class=\"courses-cta-header\">\n                <div class=\"courses-learn-icon\"><\/div>\n                <span class=\"courses-learn-text\">Advance Data Science with MIT<\/span>\n            <\/div>\n            <p class=\"courses-cta-title\">\n                <a href=\"https:\/\/idss-gl.mit.edu\/mit-idss-data-science-machine-learning-online-program\" class=\"courses-cta-title-link\">MIT Data Science and Machine Learning Course<\/a>\n            <\/p>\n            <p class=\"courses-cta-description\">Unlock the power of data. Build hands-on data science and machine learning skills to drive innovation in your career.<\/p>\n            <div class=\"courses-cta-stats\">\n                <div class=\"courses-stat-item\">\n                    <div class=\"courses-stat-icon courses-user-icon\"><\/div>\n                    <span>Duration: 12 weeks<\/span>\n                <\/div>\n                <div class=\"courses-stat-item\">\n                    <div class=\"courses-stat-icon courses-star-icon\"><\/div>\n                    <span>4.62\/5 Rating<\/span>\n                <\/div>\n            <\/div>\n            <a href=\"https:\/\/idss-gl.mit.edu\/mit-idss-data-science-machine-learning-online-program\" class=\"courses-cta-button\">\n                Discover the Program\n                <div class=\"courses-arrow-icon\"><\/div>\n            <\/a>\n        <\/div>\n    <\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-are-cascading-classifiers\"><strong>What are Cascading Classifiers?<\/strong><\/h2>\n\n\n\n<p>Maybe the AdaBoost will finally select the best features around say 2500, but it is still a time-consuming process to calculate these features for each region. We have a 24x24 window which we slide over the input image, and we need to find if any of those regions contain the face. The job of the cascade is to quickly discard non-faces, and avoid wasting precious time and computations. Thus, achieving the speed necessary for real-time face detection.<\/p>\n\n\n\n<p>We set up a cascaded system in which we divide the process of identifying a face into multiple stages. In the first stage, we have a classifier which is made up of our best features, in other words, in the first stage, the subregion passes through the best features such as the feature which identifies the nose bridge or the one that identifies the eyes. In the next stages, we have all the remaining features.<br><\/p>\n\n\n\n<p>When an image subregion enters the cascade, it is evaluated by the first stage. If that stage evaluates the subregion as positive, meaning that it thinks it\u2019s a face, the output of the stage is maybe.<br><\/p>\n\n\n\n<p>When a subregion gets a maybe, it is sent to the next stage of the cascade and the process continues as such till we reach the last stage.<\/p>\n\n\n\n<p>If all classifiers approve the image, it is finally classified as a human face and is presented to the user as a detection.<br><\/p>\n\n\n\n<p>Now how does it help us to increase our speed? Basically, If the first stage gives a negative evaluation, then the image is immediately discarded as not containing a human face. If it passes the first stage but fails the second stage, it is discarded as well. Basically, the image can get discarded at any stage of the classifier<br><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"using-a-viola-jones-classifier-to-detect-faces-in-a-live-webcam-feed\"><strong>Using a Viola-Jones Classifier to detect faces in a live webcam feed<\/strong><\/h2>\n\n\n\n<p>In this section, we are going to implement the Viola-Jones algorithm using OpenCV and detect faces in our webcam feed in real-time. We will also use the same algorithm to detect the eyes of a person too. This is quite simple and all you need is to install OpenCV and Python on your PC. You can refer to <a href=\"https:\/\/www.mygreatlearning.com\/blog\/facial-recognition-using-python\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"this (opens in a new tab)\">this<\/a> article to know about OpenCV and how to install it<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>In OpenCV, we have several trained Haar Cascade models which are saved as XML files. Instead of creating and training the model from scratch, we use this file. We are going to use \u201chaarcascade_frontalface_alt2.xml\u201d file in this project. Now let us start coding.<\/p>\n\n\n\n<p>The first step is to find the path to the \u201chaarcascade_frontalface_alt2.xml\u201d and \"haarcascade_eye_tree_eyeglasses.xml\" files. We do this by using the os module of Python language.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import os\ncascPathface = os.path.dirname(\n    cv2.__file__) + \"\/data\/haarcascade_frontalface_alt2.xml\"\ncascPatheyes = os.path.dirname(\n    cv2.__file__) + \"\/data\/haarcascade_eye_tree_eyeglasses.xml\"<\/code><\/pre>\n\n\n\n<p> The next step is to load our classifier. We are using two classifiers, one for detecting the face and others for detection eyes. The path to the above XML file goes as an argument to CascadeClassifier() method of OpenCV. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>faceCascade = cv2.CascadeClassifier(cascPath)\neyeCascade = cv2.CascadeClassifier(cascPatheyes)\n<\/code><\/pre>\n\n\n\n<p> After loading the classifier, let us open the webcam using this simple OpenCV one-liner code <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>video_capture = cv2.VideoCapture(0)<\/code><\/pre>\n\n\n\n<p> Next, we need to get the frames from the webcam stream, we do this using the read() function. We use the infinite loop to get all the frames until the time we want to close the stream. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>while True:\n    # Capture frame-by-frame\n    ret, frame = video_capture.read()<\/code><\/pre>\n\n\n\n<p>The read() function returns:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>The actual video frame read (one frame on each loop)<\/li>\n\n\n\n<li>A return code<\/li>\n<\/ol>\n\n\n\n<p>The return code tells us if we have run out of frames, which will happen if we are reading from a file. This doesn\u2019t matter when reading from the webcam since we can record forever, so we will ignore it.<\/p>\n\n\n\n<p>For this specific classifier to work, we need to convert the frame into greyscale.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)<\/code><\/pre>\n\n\n\n<p> The faceCascade object has a method detectMultiScale(), which receives a frame(image) as an argument and runs the classifier cascade over the image. The term MultiScale indicates that the algorithm looks at subregions of the image in multiple scales, to detect faces of varying sizes. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>faces = faceCascade.detectMultiScale(gray,\n                                         scaleFactor=1.1,\n                                         minNeighbors=5,\n                                         minSize=(60, 60),\n                                         flags=cv2.CASCADE_SCALE_IMAGE)<\/code><\/pre>\n\n\n\n<p>Let us go through these arguments of this function:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>scaleFactor \u2013 Parameter specifying how much the image size is reduced at each image scale. By rescaling the input image, you can resize a larger face to a smaller one, making it detectable by the algorithm. 1.05 is a good possible value for this, which means you use a small step for resizing, i.e. reduce the size by 5%, you increase the chance of a matching size with the model for detection is found.<\/li>\n\n\n\n<li>minNeighbors \u2013 Parameter specifying how many neighbours each candidate rectangle should have to retain it. This parameter will affect the quality of the detected faces. Higher value results in fewer detections but with higher quality. 3~6 is a good value for it.<\/li>\n\n\n\n<li>flags \u2013Mode of operation<\/li>\n\n\n\n<li>minSize \u2013 Minimum possible object size. Objects smaller than that are ignored.<\/li>\n<\/ul>\n\n\n\n<p>The variable faces now contain all the detections for the target image. Detections are saved as pixel coordinates. Each detection is defined by its top-left corner coordinates and width and height of the rectangle that encompasses the detected face.<br><\/p>\n\n\n\n<p>To show the detected face, we will draw a rectangle over it.OpenCV\u2019s rectangle() draws rectangles over images, and it needs to know the pixel coordinates of the top-left and bottom-right corner. The coordinates indicate the row and column of pixels in the image. We can easily get these coordinates from the variable face.<\/p>\n\n\n\n<p>Also as now, we know the location of the face, we define a new area which just contains the face of a person and name it as faceROI.In faceROI we detect the eyes and encircle them using the circle function.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>for (x,y,w,h) in faces:\n        cv2.rectangle(frame, (x, y), (x + w, y + h),(0,255,0), 2)\n        faceROI = frame&#091;y:y+h,x:x+w]\n        eyes = eyeCascade.detectMultiScale(faceROI)\n        for (x2, y2, w2, h2) in eyes:\n            eye_center = (x + x2 + w2 \/\/ 2, y + y2 + h2 \/\/ 2)\n            radius = int(round((w2 + h2) * 0.25))\n            frame = cv2.circle(frame, eye_center, radius, (255, 0, 0), 4)<\/code><\/pre>\n\n\n\n<p>The function rectangle() accepts the following arguments:<br><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The original image<\/li>\n\n\n\n<li>The coordinates of the top-left point of the detection<\/li>\n\n\n\n<li>The coordinates of the bottom-right point of the detection<\/li>\n\n\n\n<li>The colour of the rectangle (a tuple that defines the amount of red, green, and blue (0-255)).In our case, we set as green just keeping the green component as 255 and rest as zero.<\/li>\n\n\n\n<li>The thickness of the rectangle lines<\/li>\n<\/ul>\n\n\n\n<p>Next, we just display the resulting frame and also set a way to exit this infinite loop and close the video feed. By pressing the \u2018q\u2019 key, we can exit the script here<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cv2.imshow('Video', frame)\n    if cv2.waitKey(1) &amp; 0xFF == ord('q'):\n        break<\/code><\/pre>\n\n\n\n<p>The next two lines are just to clean up and release the picture.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>video_capture.release()\ncv2.destroyAllWindows()<\/code><\/pre>\n\n\n\n<p>Here are the full code and output.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import cv2\nimport os\ncascPathface = os.path.dirname(\n    cv2.__file__) + \"\/data\/haarcascade_frontalface_alt2.xml\"\ncascPatheyes = os.path.dirname(\n    cv2.__file__) + \"\/data\/haarcascade_eye_tree_eyeglasses.xml\"\n\nfaceCascade = cv2.CascadeClassifier(cascPathface)\neyeCascade = cv2.CascadeClassifier(cascPatheyes)\n\nvideo_capture = cv2.VideoCapture(0)\nwhile True:\n    # Capture frame-by-frame\n    ret, frame = video_capture.read()\n    gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)\n    faces = faceCascade.detectMultiScale(gray,\n                                         scaleFactor=1.1,\n                                         minNeighbors=5,\n                                         minSize=(60, 60),\n                                         flags=cv2.CASCADE_SCALE_IMAGE)\n    for (x,y,w,h) in faces:\n        cv2.rectangle(frame, (x, y), (x + w, y + h),(0,255,0), 2)\n        faceROI = frame&#091;y:y+h,x:x+w]\n        eyes = eyeCascade.detectMultiScale(faceROI)\n        for (x2, y2, w2, h2) in eyes:\n            eye_center = (x + x2 + w2 \/\/ 2, y + y2 + h2 \/\/ 2)\n            radius = int(round((w2 + h2) * 0.25))\n            frame = cv2.circle(frame, eye_center, radius, (255, 0, 0), 4)\n\n        # Display the resulting frame\n    cv2.imshow('Video', frame)\n    if cv2.waitKey(1) &amp; 0xFF == ord('q'):\n        break\nvideo_capture.release()\ncv2.destroyAllWindows()<\/code><\/pre>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<p>This brings us to the end of this article where we learned about the Viola Jones algorithm and its implementation in OpenCV.<\/p>\n\n\n<figure class=\"wp-block-image size-large zoomable\" data-full=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/June-29-banner-for-GL-computer-vision-1.png\"><a href=\"https:\/\/www.mygreatlearning.com\/academy\/learn-for-free\/courses\/computer-vision-essentials\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" width=\"1000\" height=\"242\" src=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/June-29-banner-for-GL-computer-vision-1.png\" alt=\"viola jones algorithm\" class=\"wp-image-17202\" srcset=\"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/June-29-banner-for-GL-computer-vision-1.png 1000w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/June-29-banner-for-GL-computer-vision-1-300x73.png 300w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/June-29-banner-for-GL-computer-vision-1-768x186.png 768w, https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/June-29-banner-for-GL-computer-vision-1-696x168.png 696w\" sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><\/a><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>In the realm of computer vision, face detection stands as a fundamental and captivating task. Detecting and locating faces within images or video streams forms the cornerstone of numerous applications, from facial recognition systems to digital image processing. Among the many algorithms developed to tackle this challenge, the Viola-Jones algorithm has emerged as a groundbreaking [&hellip;]<\/p>\n","protected":false},"author":41,"featured_media":19761,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[2],"tags":[],"content_type":[],"class_list":["post-19722","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-artificial-intelligence"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.3 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Detect Face Recognition using Viola Jones Algorithm<\/title>\n<meta name=\"description\" content=\"Viola Jones algorithm is named after two computer vision researchers who proposed the method in 2001, Paul Viola and Michael Jones in their paper, &quot;Rapid Object Detection using a Boosted Cascade of Simple Features&quot;.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.mygreatlearning.com\/blog\/viola-jones-algorithm\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Face Detection using Viola Jones Algorithm\" \/>\n<meta property=\"og:description\" content=\"Viola Jones algorithm is named after two computer vision researchers who proposed the method in 2001, Paul Viola and Michael Jones in their paper, &quot;Rapid Object Detection using a Boosted Cascade of Simple Features&quot;.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.mygreatlearning.com\/blog\/viola-jones-algorithm\/\" \/>\n<meta property=\"og:site_name\" content=\"Great Learning Blog: Free Resources what Matters to shape your Career!\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/GreatLearningOfficial\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-06-09T11:35:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-09-02T11:31:39+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/08\/shutterstock_723081889.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"527\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Great Learning Editorial Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/Great_Learning\" \/>\n<meta name=\"twitter:site\" content=\"@Great_Learning\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Great Learning Editorial Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"12 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/viola-jones-algorithm\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/viola-jones-algorithm\\\/\"},\"author\":{\"name\":\"Great Learning Editorial Team\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/person\\\/6f993d1be4c584a335951e836f2656ad\"},\"headline\":\"Face Detection using Viola Jones Algorithm\",\"datePublished\":\"2023-06-09T11:35:00+00:00\",\"dateModified\":\"2024-09-02T11:31:39+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/viola-jones-algorithm\\\/\"},\"wordCount\":2429,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/viola-jones-algorithm\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/shutterstock_723081889.jpg\",\"articleSection\":[\"AI and Machine Learning\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/viola-jones-algorithm\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/viola-jones-algorithm\\\/\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/viola-jones-algorithm\\\/\",\"name\":\"How to Detect Face Recognition using Viola Jones Algorithm\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/viola-jones-algorithm\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/viola-jones-algorithm\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/shutterstock_723081889.jpg\",\"datePublished\":\"2023-06-09T11:35:00+00:00\",\"dateModified\":\"2024-09-02T11:31:39+00:00\",\"description\":\"Viola Jones algorithm is named after two computer vision researchers who proposed the method in 2001, Paul Viola and Michael Jones in their paper, \\\"Rapid Object Detection using a Boosted Cascade of Simple Features\\\".\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/viola-jones-algorithm\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/viola-jones-algorithm\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/viola-jones-algorithm\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/shutterstock_723081889.jpg\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/shutterstock_723081889.jpg\",\"width\":1000,\"height\":527,\"caption\":\"Viola jones algorithm\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/viola-jones-algorithm\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"AI and Machine Learning\",\"item\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/artificial-intelligence\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Face Detection using Viola Jones Algorithm\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\",\"name\":\"Great Learning Blog\",\"description\":\"Learn, Upskill &amp; Career Development Guide and Resources\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\"},\"alternateName\":\"Great Learning\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\",\"name\":\"Great Learning\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/GL-Logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/GL-Logo.jpg\",\"width\":900,\"height\":900,\"caption\":\"Great Learning\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/GreatLearningOfficial\\\/\",\"https:\\\/\\\/x.com\\\/Great_Learning\",\"https:\\\/\\\/www.instagram.com\\\/greatlearningofficial\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/school\\\/great-learning\\\/\",\"https:\\\/\\\/in.pinterest.com\\\/greatlearning12\\\/\",\"https:\\\/\\\/www.youtube.com\\\/user\\\/beaconelearning\\\/\"],\"description\":\"Great Learning is a leading global ed-tech company for professional training and higher education. It offers comprehensive, industry-relevant, hands-on learning programs across various business, technology, and interdisciplinary domains driving the digital economy. These programs are developed and offered in collaboration with the world's foremost academic institutions.\",\"email\":\"info@mygreatlearning.com\",\"legalName\":\"Great Learning Education Services Pvt. Ltd\",\"foundingDate\":\"2013-11-29\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"1001\",\"maxValue\":\"5000\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/person\\\/6f993d1be4c584a335951e836f2656ad\",\"name\":\"Great Learning Editorial Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"caption\":\"Great Learning Editorial Team\"},\"description\":\"The Great Learning Editorial Staff includes a dynamic team of subject matter experts, instructors, and education professionals who combine their deep industry knowledge with innovative teaching methods. Their mission is to provide learners with the skills and insights needed to excel in their careers, whether through upskilling, reskilling, or transitioning into new fields.\",\"sameAs\":[\"https:\\\/\\\/www.mygreatlearning.com\\\/\",\"https:\\\/\\\/in.linkedin.com\\\/school\\\/great-learning\\\/\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/Great_Learning\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCObs0kLIrDjX2LLSybqNaEA\"],\"award\":[\"Best EdTech Company of the Year 2024\",\"Education Economictimes Outstanding Education\\\/Edtech Solution Provider of the Year 2024\",\"Leading E-learning Platform 2024\"],\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/author\\\/greatlearning\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Detect Face Recognition using Viola Jones Algorithm","description":"Viola Jones algorithm is named after two computer vision researchers who proposed the method in 2001, Paul Viola and Michael Jones in their paper, \"Rapid Object Detection using a Boosted Cascade of Simple Features\".","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.mygreatlearning.com\/blog\/viola-jones-algorithm\/","og_locale":"en_US","og_type":"article","og_title":"Face Detection using Viola Jones Algorithm","og_description":"Viola Jones algorithm is named after two computer vision researchers who proposed the method in 2001, Paul Viola and Michael Jones in their paper, \"Rapid Object Detection using a Boosted Cascade of Simple Features\".","og_url":"https:\/\/www.mygreatlearning.com\/blog\/viola-jones-algorithm\/","og_site_name":"Great Learning Blog: Free Resources what Matters to shape your Career!","article_publisher":"https:\/\/www.facebook.com\/GreatLearningOfficial\/","article_published_time":"2023-06-09T11:35:00+00:00","article_modified_time":"2024-09-02T11:31:39+00:00","og_image":[{"width":1000,"height":527,"url":"http:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/08\/shutterstock_723081889.jpg","type":"image\/jpeg"}],"author":"Great Learning Editorial Team","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/Great_Learning","twitter_site":"@Great_Learning","twitter_misc":{"Written by":"Great Learning Editorial Team","Est. reading time":"12 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.mygreatlearning.com\/blog\/viola-jones-algorithm\/#article","isPartOf":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/viola-jones-algorithm\/"},"author":{"name":"Great Learning Editorial Team","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/person\/6f993d1be4c584a335951e836f2656ad"},"headline":"Face Detection using Viola Jones Algorithm","datePublished":"2023-06-09T11:35:00+00:00","dateModified":"2024-09-02T11:31:39+00:00","mainEntityOfPage":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/viola-jones-algorithm\/"},"wordCount":2429,"commentCount":0,"publisher":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/viola-jones-algorithm\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/08\/shutterstock_723081889.jpg","articleSection":["AI and Machine Learning"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.mygreatlearning.com\/blog\/viola-jones-algorithm\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.mygreatlearning.com\/blog\/viola-jones-algorithm\/","url":"https:\/\/www.mygreatlearning.com\/blog\/viola-jones-algorithm\/","name":"How to Detect Face Recognition using Viola Jones Algorithm","isPartOf":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/viola-jones-algorithm\/#primaryimage"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/viola-jones-algorithm\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/08\/shutterstock_723081889.jpg","datePublished":"2023-06-09T11:35:00+00:00","dateModified":"2024-09-02T11:31:39+00:00","description":"Viola Jones algorithm is named after two computer vision researchers who proposed the method in 2001, Paul Viola and Michael Jones in their paper, \"Rapid Object Detection using a Boosted Cascade of Simple Features\".","breadcrumb":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/viola-jones-algorithm\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.mygreatlearning.com\/blog\/viola-jones-algorithm\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/viola-jones-algorithm\/#primaryimage","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/08\/shutterstock_723081889.jpg","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/08\/shutterstock_723081889.jpg","width":1000,"height":527,"caption":"Viola jones algorithm"},{"@type":"BreadcrumbList","@id":"https:\/\/www.mygreatlearning.com\/blog\/viola-jones-algorithm\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/www.mygreatlearning.com\/blog\/"},{"@type":"ListItem","position":2,"name":"AI and Machine Learning","item":"https:\/\/www.mygreatlearning.com\/blog\/artificial-intelligence\/"},{"@type":"ListItem","position":3,"name":"Face Detection using Viola Jones Algorithm"}]},{"@type":"WebSite","@id":"https:\/\/www.mygreatlearning.com\/blog\/#website","url":"https:\/\/www.mygreatlearning.com\/blog\/","name":"Great Learning Blog","description":"Learn, Upskill &amp; Career Development Guide and Resources","publisher":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization"},"alternateName":"Great Learning","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.mygreatlearning.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization","name":"Great Learning","url":"https:\/\/www.mygreatlearning.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/GL-Logo.jpg","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/GL-Logo.jpg","width":900,"height":900,"caption":"Great Learning"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/GreatLearningOfficial\/","https:\/\/x.com\/Great_Learning","https:\/\/www.instagram.com\/greatlearningofficial\/","https:\/\/www.linkedin.com\/school\/great-learning\/","https:\/\/in.pinterest.com\/greatlearning12\/","https:\/\/www.youtube.com\/user\/beaconelearning\/"],"description":"Great Learning is a leading global ed-tech company for professional training and higher education. It offers comprehensive, industry-relevant, hands-on learning programs across various business, technology, and interdisciplinary domains driving the digital economy. These programs are developed and offered in collaboration with the world's foremost academic institutions.","email":"info@mygreatlearning.com","legalName":"Great Learning Education Services Pvt. Ltd","foundingDate":"2013-11-29","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"1001","maxValue":"5000"}},{"@type":"Person","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/person\/6f993d1be4c584a335951e836f2656ad","name":"Great Learning Editorial Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","caption":"Great Learning Editorial Team"},"description":"The Great Learning Editorial Staff includes a dynamic team of subject matter experts, instructors, and education professionals who combine their deep industry knowledge with innovative teaching methods. Their mission is to provide learners with the skills and insights needed to excel in their careers, whether through upskilling, reskilling, or transitioning into new fields.","sameAs":["https:\/\/www.mygreatlearning.com\/","https:\/\/in.linkedin.com\/school\/great-learning\/","https:\/\/x.com\/https:\/\/twitter.com\/Great_Learning","https:\/\/www.youtube.com\/channel\/UCObs0kLIrDjX2LLSybqNaEA"],"award":["Best EdTech Company of the Year 2024","Education Economictimes Outstanding Education\/Edtech Solution Provider of the Year 2024","Leading E-learning Platform 2024"],"url":"https:\/\/www.mygreatlearning.com\/blog\/author\/greatlearning\/"}]}},"uagb_featured_image_src":{"full":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/08\/shutterstock_723081889.jpg",1000,527,false],"thumbnail":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/08\/shutterstock_723081889-150x150.jpg",150,150,true],"medium":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/08\/shutterstock_723081889-300x158.jpg",300,158,true],"medium_large":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/08\/shutterstock_723081889-768x405.jpg",768,405,true],"large":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/08\/shutterstock_723081889.jpg",1000,527,false],"1536x1536":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/08\/shutterstock_723081889.jpg",1000,527,false],"2048x2048":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/08\/shutterstock_723081889.jpg",1000,527,false],"web-stories-poster-portrait":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/08\/shutterstock_723081889.jpg",640,337,false],"web-stories-publisher-logo":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/08\/shutterstock_723081889.jpg",96,51,false],"web-stories-thumbnail":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/08\/shutterstock_723081889.jpg",150,79,false]},"uagb_author_info":{"display_name":"Great Learning Editorial Team","author_link":"https:\/\/www.mygreatlearning.com\/blog\/author\/greatlearning\/"},"uagb_comment_info":0,"uagb_excerpt":"In the realm of computer vision, face detection stands as a fundamental and captivating task. Detecting and locating faces within images or video streams forms the cornerstone of numerous applications, from facial recognition systems to digital image processing. Among the many algorithms developed to tackle this challenge, the Viola-Jones algorithm has emerged as a groundbreaking&hellip;","_links":{"self":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts\/19722","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/users\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/comments?post=19722"}],"version-history":[{"count":19,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts\/19722\/revisions"}],"predecessor-version":[{"id":110762,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts\/19722\/revisions\/110762"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/media\/19761"}],"wp:attachment":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/media?parent=19722"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/categories?post=19722"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/tags?post=19722"},{"taxonomy":"content_type","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/content_type?post=19722"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}