

{"id":115659,"date":"2024-02-19T18:00:27","date_gmt":"2024-02-19T12:30:27","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=115659"},"modified":"2026-06-01T12:18:29","modified_gmt":"2026-06-01T06:48:29","slug":"social-distancing-alert-system-using-opencv","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/social-distancing-alert-system-using-opencv\/","title":{"rendered":"OpenCV Project &#8211; Social Distancing Alert System"},"content":{"rendered":"<p>Introducing the Social Distancing Alert System using OpenCV\u2014a groundbreaking solution aimed at keeping people safe and reducing the spread of COVID-19. This system utilizes advanced computer vision technology to effectively detect and monitor social distancing practices in different environments. By doing so, it helps ensure public health and safety by alerting individuals when they are not maintaining a safe distance from others.<\/p>\n<p>In this introduction, we will delve into the system&#8217;s main features and advantages, emphasizing its potential to enhance overall well-being and create a safer environment for everyone.<\/p>\n<h2>How OpenCV Works?<\/h2>\n<p>The Social Distancing Alert System uses cameras and smart software called OpenCV to detect and track people in video footage. It calculates the distances between individuals accurately and compares them to recommended guidelines for social distancing. If people get too close, the system triggers alerts, like visual signals or alarms, to remind them to keep their distance. It can also integrate with other technologies for advanced features like generating compliance reports and monitoring in real-time.<\/p>\n<h3>The Role of HaarCascade<\/h3>\n<p>HarCascade, a specialized algorithm within OpenCV, plays a key role in a Social Distancing Alert System. It uses machine learning to detect human bodies in real-time video. By analyzing the distances between detected individuals, the system alerts us if they are too close, violating social distancing guidelines. OpenCV provides the necessary tools for video analysis and object detection, making it possible to implement this system effectively.<\/p>\n<h3>Distance Calculation<\/h3>\n<p>The provided code uses OpenCV and Haarcascade to detect people in a video and calculate the distance between them. It draws rectangles around the detected individuals and calculates the distance based on the size of their bounding boxes. If the distance between two people is less than a specified threshold, it indicates a violation of social distancing. The code then visually highlights the violating individuals and displays an alert message if any violations are found. Overall, the code helps identify social distancing breaches in the given video.<\/p>\n<h3>Prerequisites Social Distancing Alert System Using OpenCV<\/h3>\n<p>It is important to have a solid understanding of the Python programming language and the OpenCV library. Apart from this, you should have the following system requirements.<\/p>\n<ol>\n<li>Python 3.7 and above<\/li>\n<li>Any Python editor (VS code, Pycharm, etc.)<\/li>\n<\/ol>\n<h3>Download OpenCV Social Distancing Alert System Project<\/h3>\n<p>Please download the source code of OpenCV Social Distancing Alert System:<a href=\"https:\/\/drive.google.com\/file\/d\/1Js7IW_pmvSAxI4cUc3hWrUfdhir2Je4K\/view?usp=drive_link\"><strong> OpenCV Social Distancing Alert System Project Code.<\/strong><\/a><\/p>\n<h3>Installation<\/h3>\n<p><strong>Open windows cmd as administrator<\/strong><\/p>\n<p>1. To install the opencv library run the command from the cmd.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">pip install opencv-python<\/pre>\n<h3>Let\u2019s Implement It<\/h3>\n<p><strong>To implement it follow the below step.<\/strong><\/p>\n<p>1. First of all we are importing all the necessary libraries that are required during implementation.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">import cv2\r\nimport numpy as np\r\nimport time<\/pre>\n<p>2. The function detect_people detects people in a given frame. It converts the frame to grayscale and applies a cascade classifier specifically designed to detect people. It then returns the coordinates and dimensions of the bounding boxes around the detected people in the frame.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">def detect_people(frame, cascade):\r\n    gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)\r\n    detections = cascade.detectMultiScale(gray, scaleFactor=1.1, minNeighbors=5, minSize=(30, 30))\r\n    return detections<\/pre>\n<p><strong> Output of this step<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/12\/function-detect-people.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-132019 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/12\/function-detect-people.webp\" alt=\"function detect people\" width=\"1204\" height=\"1080\" \/><\/a><\/p>\n<p>3. The function compute_distances calculates the distances between detected individuals based on their bounding boxes. It finds the centroid (center point) of each bounding box and computes the Euclidean distance between all pairs of centroids. The function returns the distances as a matrix and also provides a list of the centroids.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">def compute_distances(detections):\r\n    num_detections = len(detections)\r\n    distances = np.zeros((num_detections, num_detections))\r\n    centroids = []\r\n    for i, (x1, y1, w1, h1) in enumerate(detections):\r\n        cx1, cy1 = x1 + w1 \/\/ 2, y1 + h1 \/\/ 2\r\n        centroids.append((cx1, cy1))\r\n        for j, (x2, y2, w2, h2) in enumerate(detections):\r\n            cx2, cy2 = x2 + w2 \/\/ 2, y2 + h2 \/\/ 2\r\n            distances[i, j] = np.sqrt((cx1 - cx2)**2 + (cy1 - cy2)**2)\r\n    return distances, centroids<\/pre>\n<p><strong> Output of this step<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/12\/function-compute-distances.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-132020 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/12\/function-compute-distances.webp\" alt=\"function compute distances\" width=\"1198\" height=\"1080\" \/><\/a><\/p>\n<p>4. The violate_social_distancing function counts violations of social distancing based on the distances between individuals. It returns the total count of violations.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">def violate_social_distancing(distances, threshold=50):\r\n    num_detections = distances.shape[0]\r\n    violations = 0\r\n    for i in range(num_detections):\r\n        for j in range(i+1, num_detections):\r\n            if distances[i, j] &lt; threshold:\r\n                violations += 1\r\n    return violations<\/pre>\n<p>5. The code sets the file path to the Haarcascade XML file for detecting full-body patterns. It then initializes a classifier object using that XML file, which can be used to detect full-body images.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">cascade_path = \"C:\/Users\/yoges\/OneDrive\/Desktop\/dataflair\/Harcascade\/opencv-master\/data\/haarcascades\/haarcascade_fullbody.xml\"\r\ncascade_classifier = cv2.CascadeClassifier(cascade_path)<\/pre>\n<p>6. Pass the path of the video file in the VideoCapture function.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">cap = cv2.VideoCapture(\"C:\/Users\/yoges\/OneDrive\/Desktop\/dataflair\/Social Distancing\/pedestrian.avi\")<\/pre>\n<p>7. Start the While loop.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">while True:<\/pre>\n<p>8. The code snippet reads the next frame from a video source. If no frame is successfully read or the video has ended, the code exits the loop and terminates.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">ret, frame = cap.read()\r\n    if not ret:\r\n        break<\/pre>\n<p>9. In this code snippet, the frame is resized to a size of 512&#215;512 pixels. People are then detected in the resized frame using a cascade classifier. The distances between the detected individuals are calculated, and the number of violations of social distancing is determined based on these distances.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">frame = cv2.resize(frame, (512, 512))\r\npedestrian_detections = detect_people(frame, cascade_classifier)\r\ndistances, centroids = compute_distances(pedestrian_detections)\r\nviolations = violate_social_distancing(distances)<\/pre>\n<p>10. For each pedestrian detected, a green rectangle is drawn around them on the frame using their coordinates. This visually highlights the detected pedestrians.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">for (x, y, w, h) in pedestrian_detections:\r\n        cv2.rectangle(frame, (x, y), (x + w, y + h), (0, 255, 0), 2)<\/pre>\n<p><strong> Output of this step<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/12\/green-rectangle.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-132021 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/12\/green-rectangle.webp\" alt=\"green rectangle\" width=\"772\" height=\"800\" \/><\/a><\/p>\n<p>11. For each centroid representing a detected individual, a red circle is drawn on the frame at their coordinates. This provides a visual representation of the centroids of the detected individuals.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">for (cx, cy) in centroids:\r\n       cv2.circle(frame, (cx, cy), 5, (0, 0, 255), -1)<\/pre>\n<p><strong>Output of this step<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/12\/red-circle-.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-132022 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/12\/red-circle-.webp\" alt=\"red circle \" width=\"764\" height=\"804\" \/><\/a><\/p>\n<p>12. The loop iterates over each pedestrian detection in the pedestrian_detections list, allowing for individual processing or analysis of each detected pedestrian.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">for i in range(len(pedestrian_detections)):<\/pre>\n<p>13. The code snippet compares each pair of pedestrian detections to check if their distance is less than 50. If a violation is detected, it visually highlights the violating pedestrians by drawing red rectangles around them and displaying a &#8220;Violating&#8221; label near each of them on the frame. It also displays an alert message indicating a social distancing violation.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">for j in range(i+1, len(pedestrian_detections)):\r\n            if distances[i, j] &lt; 50:\r\n                x1, y1, w1, h1 = pedestrian_detections[i]\r\n                x2, y2, w2, h2 = pedestrian_detections[j]\r\n                cv2.rectangle(frame, (x1, y1), (x1 + w1, y1 + h1), (0, 0, 255), 2)\r\n                cv2.rectangle(frame, (x2, y2), (x2 + w2, y2 + h2), (0, 0, 255), 2)\r\n\r\n                cv2.rectangle(frame, (x1 + w1, y1), (x1 + w1 + 150, y1 - 30), (0, 0, 255), cv2.FILLED)\r\n                cv2.putText(frame, \"Violating\", (x1 + w1, y1 - 5), cv2.FONT_HERSHEY_SIMPLEX, 0.7, (255, 255, 255), 2)\r\n                cv2.rectangle(frame, (x2 + w2, y2), (x2 + w2 + 150, y2 - 30), (0, 0, 255), cv2.FILLED)\r\n                cv2.putText(frame, \"Violating\", (x2 + w2, y2 - 5), cv2.FONT_HERSHEY_SIMPLEX, 0.7, (255, 255, 255), 2)\r\n                alert_message = \"ALERT! Social Distancing Violation\"\r\n                cv2.putText(frame, alert_message, (10, 30), cv2.FONT_HERSHEY_SIMPLEX, 0.7, (0, 255, 255), 2)<\/pre>\n<p><strong>Note:-\u00a0<\/strong> write this for loop under the step 11th for loop.<\/p>\n<p>14. The code displays the processed frame in a window titled &#8220;DataFlair&#8221; and waits for a key press. If the pressed key is &#8216;q&#8217;, the program stops running.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">cv2.imshow(\"DataFlair\", frame)\r\n    if cv2.waitKey(1) &amp; 0xFF == ord('q'):\r\n        break<\/pre>\n<p><strong>Note:-<\/strong> Write steps 8-14 under the while loop of step 7.<\/p>\n<p>15. The code stops using the video capture and closes all OpenCV windows.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">cap.release()\r\ncv2.destroyAllWindows()<\/pre>\n<h3>OpenCV Social Distancing Alert System Output<\/h3>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/12\/capture-and-closes-all.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-132023 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/12\/capture-and-closes-all.webp\" alt=\"capture and closes all\" width=\"1200\" height=\"1080\" \/><\/a><\/p>\n<h3>OpenCV Social Distancing Alert System Video Output<\/h3>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/12\/social-distancing-alert-system-using-opencv-video.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-132024 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/12\/social-distancing-alert-system-using-opencv-video.webp\" alt=\"social distancing alert system using opencv video\" width=\"600\" height=\"338\" \/><\/a><\/p>\n<h3>Conclusion<\/h3>\n<p>In summary, the Social Distancing Alert System developed with OpenCV and Haarcascade technology is an important tool for keeping people safe and healthy. It uses smart computer algorithms to identify and monitor individuals, making sure they follow social distancing rules. If someone gets too close to others, the system sends an instant alert, allowing for quick intervention to prevent the spread of viruses.<\/p>\n<p>This technology has the potential to significantly reduce the transmission of contagious diseases, protect communities, and improve public health overall. By continuing to improve and widely implement these systems, we can work towards a safer and healthier future for everyone.<span hidden class=\"__iawmlf-post-loop-links\" data-iawmlf-links=\"[{&quot;id&quot;:2527,&quot;href&quot;:&quot;https:\\\/\\\/drive.google.com\\\/file\\\/d\\\/1Js7IW_pmvSAxI4cUc3hWrUfdhir2Je4K\\\/view?usp=drive_link&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20260601064830\\\/https:\\\/\\\/drive.google.com\\\/file\\\/d\\\/1Js7IW_pmvSAxI4cUc3hWrUfdhir2Je4K\\\/view?usp=drive_link&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-06-02 06:41:21&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-20 07:39:41&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-07-03 05:37:05&quot;,&quot;http_code&quot;:200}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-07-03 05:37:05&quot;,&quot;http_code&quot;:200},&quot;process&quot;:&quot;done&quot;}]\"><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introducing the Social Distancing Alert System using OpenCV\u2014a groundbreaking solution aimed at keeping people safe and reducing the spread of COVID-19. This system utilizes advanced computer vision technology to effectively detect and monitor social&#46;&#46;&#46;<\/p>\n","protected":false},"author":86671,"featured_media":132026,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27755],"tags":[30144,21719,30147,30148,30145,30149,30146],"class_list":["post-115659","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-opencv-tutorials","tag-opecnv-projects-ideas","tag-opencv-projects","tag-opencv-social-distancing-alert-system-project","tag-python-opencv-practice","tag-python-opencv-projects-for-practice","tag-social-distancing-alert-system-project","tag-social-distancing-alert-system-using-opencv"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>OpenCV Project - Social Distancing Alert System - DataFlair<\/title>\n<meta name=\"description\" content=\"Social Distancing Alert System developed with OpenCV and Haarcascade technology is an important tool for keeping people safe and healthy.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/social-distancing-alert-system-using-opencv\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"OpenCV Project - Social Distancing Alert System - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Social Distancing Alert System developed with OpenCV and Haarcascade technology is an important tool for keeping people safe and healthy.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/social-distancing-alert-system-using-opencv\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2024-02-19T12:30:27+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-06-01T06:48:29+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/12\/social-distancing-alert-system-opencv.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"TechVidvan Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"TechVidvan Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"OpenCV Project - Social Distancing Alert System - DataFlair","description":"Social Distancing Alert System developed with OpenCV and Haarcascade technology is an important tool for keeping people safe and healthy.","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:\/\/data-flair.training\/blogs\/social-distancing-alert-system-using-opencv\/","og_locale":"en_US","og_type":"article","og_title":"OpenCV Project - Social Distancing Alert System - DataFlair","og_description":"Social Distancing Alert System developed with OpenCV and Haarcascade technology is an important tool for keeping people safe and healthy.","og_url":"https:\/\/data-flair.training\/blogs\/social-distancing-alert-system-using-opencv\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2024-02-19T12:30:27+00:00","article_modified_time":"2026-06-01T06:48:29+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/12\/social-distancing-alert-system-opencv.webp","type":"image\/webp"}],"author":"TechVidvan Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"TechVidvan Team","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/social-distancing-alert-system-using-opencv\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/social-distancing-alert-system-using-opencv\/"},"author":{"name":"TechVidvan Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/0e594f928e31fc96628ac40f6ae74f49"},"headline":"OpenCV Project &#8211; Social Distancing Alert System","datePublished":"2024-02-19T12:30:27+00:00","dateModified":"2026-06-01T06:48:29+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/social-distancing-alert-system-using-opencv\/"},"wordCount":1017,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/social-distancing-alert-system-using-opencv\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/12\/social-distancing-alert-system-opencv.webp","keywords":["opecnv projects ideas","opencv projects","opencv social distancing alert system project","python opencv practice","python opencv projects for practice","social distancing alert system project","social distancing alert system using opencv"],"articleSection":["OpenCV Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/social-distancing-alert-system-using-opencv\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/social-distancing-alert-system-using-opencv\/","url":"https:\/\/data-flair.training\/blogs\/social-distancing-alert-system-using-opencv\/","name":"OpenCV Project - Social Distancing Alert System - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/social-distancing-alert-system-using-opencv\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/social-distancing-alert-system-using-opencv\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/12\/social-distancing-alert-system-opencv.webp","datePublished":"2024-02-19T12:30:27+00:00","dateModified":"2026-06-01T06:48:29+00:00","description":"Social Distancing Alert System developed with OpenCV and Haarcascade technology is an important tool for keeping people safe and healthy.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/social-distancing-alert-system-using-opencv\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/social-distancing-alert-system-using-opencv\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/social-distancing-alert-system-using-opencv\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/12\/social-distancing-alert-system-opencv.webp","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/12\/social-distancing-alert-system-opencv.webp","width":1200,"height":628,"caption":"social distancing alert system opencv"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/social-distancing-alert-system-using-opencv\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"OpenCV Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/opencv-tutorials\/"},{"@type":"ListItem","position":3,"name":"OpenCV Project &#8211; Social Distancing Alert System"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/0e594f928e31fc96628ac40f6ae74f49","name":"TechVidvan Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/c89190da3d4010c71ba476b618ab10fdc2335c82cdfa0ad5002d98d0f2473444?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/c89190da3d4010c71ba476b618ab10fdc2335c82cdfa0ad5002d98d0f2473444?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c89190da3d4010c71ba476b618ab10fdc2335c82cdfa0ad5002d98d0f2473444?s=96&d=mm&r=g","caption":"TechVidvan Team"},"description":"TechVidvan Team provides high-quality content &amp; courses on AI, ML, Data Science, Data Engineering, Data Analytics, programming, Python, DSA, Android, Flutter, full stack web dev, MERN, and many latest technology.","url":"https:\/\/data-flair.training\/blogs\/author\/test001\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/115659","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/86671"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=115659"}],"version-history":[{"count":6,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/115659\/revisions"}],"predecessor-version":[{"id":148600,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/115659\/revisions\/148600"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/132026"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=115659"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=115659"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=115659"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}