

{"id":101052,"date":"2021-10-21T09:00:26","date_gmt":"2021-10-21T03:30:26","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=101052"},"modified":"2026-06-01T11:50:53","modified_gmt":"2026-06-01T06:20:53","slug":"abandoned-object-detection","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/abandoned-object-detection\/","title":{"rendered":"Abandoned Object Detection in Video Surveillance using OpenCV"},"content":{"rendered":"<p>Automated video surveillance systems gain huge interest for monitoring public and private places. During the last few years abandoned object detection is a hot topic in the video surveillance community. <strong>Abandoned Object Detection<\/strong> systems analyze moving objects in a scenario and identify stationary objects in that scene, which is considered an abandoned object under some condition.<\/p>\n<p>The <strong>AOD<\/strong> system is a very complex problem, and it is still in the active research field. Because the detection quality depends on lighting changes, high-density moving objects, camera picture quality, etc.<\/p>\n<h3>Applications of AOD<\/h3>\n<ul>\n<li>Video surveillance<\/li>\n<li>Illegal parking detection.<\/li>\n<li>Suspicious object detection.<\/li>\n<\/ul>\n<p>In this project, we\u2019re going to make an Abandoned object detection system using OpenCV and python.<\/p>\n<p>OpenCV is a real-time computer vision and image processing library for python. OpenCV is very popular because it is lightweight and contains more than 2500 image processing algorithms.<\/p>\n<p>As we know that it is a complex problem to solve. So how are we going to solve this?<\/p>\n<p>First, we\u2019ll take a static picture that doesn\u2019t contain any suspicious or moving objects. Then we\u2019ll find the difference between the static picture and real-time frames. After some filtration, any difference will be considered as an extra object. Then we\u2019ll continuously keep track of the position and state of that object. If the object is moving then nothing will happen but if the object stays at the same place for a few times then the object will be considered as an Abandoned object or suspicious object.<\/p>\n<h3>Prerequisites:<\/h3>\n<ul>\n<li>Python 3.x (we used python 3.7.10)<\/li>\n<li>OpenCV &#8211; 4.5.3<\/li>\n<li>Numpy &#8211; 1.19.3<\/li>\n<\/ul>\n<h3>Download Abandoned Object Detection Project Code<\/h3>\n<p>Please download the source code of abandoned object detection with opencv: <a href=\"https:\/\/drive.google.com\/file\/d\/19AD4KpB5bGhjtInJAfTu5y-auiiJECa9\/view?usp=drive_link\"><strong>Abandoned Object Detection Project Code<\/strong><\/a><\/p>\n<p>For this project, we\u2019ll create two different programs. One program will keep track of all objects and find abandoned objects and another program will process all the frames.<\/p>\n<p>So let\u2019s start with program-1<\/p>\n<h3>Tracker:<\/h3>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\"># DataFlair Abandoned object Tracker\r\nimport math\r\n \r\nclass ObjectTracker:\r\n    def __init__(self):\r\n    \t# Store the center positions of the objects\r\n    \tself.center_points = {}\r\n    \t# Keep the count of the IDs\r\n    \t# each time a new object id detected, the count will increase by one\r\n    \tself.id_count = 0\r\n \r\n    \tself.abandoned_temp = {}\r\n \r\n    def update(self, objects_rect):\r\n    \t# Objects boxes and ids\r\n    \tobjects_bbs_ids = []\r\n    \tabandoned_object = []\r\n<\/pre>\n<ul>\n<li>First, we import the math module to perform basic mathematical operations.<\/li>\n<li>Then we created a class named ObjectTracker. And inside the class, we created a method named update. This update method will keep track of all objects and will update the detected object\u2019s current state.<\/li>\n<li>The update method takes a list that contains all the detected object\u2019s positional information. We\u2019ll see how we can get the positional information of all objects in program 2.<\/li>\n<li>We create an empty center_points dictionary which will store all the tracked objects inside the frame.<\/li>\n<li>Abandoned_temp will be used to store temporary detected abandoned objects for later verification.<\/li>\n<li>Id_count is a unique id for each detected object. For any detected new object, id_count will increase by 1.<\/li>\n<\/ul>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\"># Get center point of new object\r\n    \tfor rect in objects_rect:\r\n        \tx, y, w, h = rect\r\n        \tcx = (x + x + w) \/ 2\r\n        \tcy = (y + y + h) \/ 2\r\n<\/pre>\n<ul>\n<li>Here we calculate the center point for each input object.<\/li>\n<\/ul>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\"># Find out if that object was detected already\r\n        \tsame_object_detected = False\r\n        \tfor id, pt in self.center_points.items():\r\n            \tdistance = math.hypot(cx - pt[0], cy - pt[1])\r\n\r\n            \tif distance &lt; 25:\r\n                \tself.center_points[id] = (cx, cy)\r\n \r\n                \tobjects_bbs_ids.append([x, y, w, h, id, distance])\r\n                \tsame_object_detected = True\r\n<\/pre>\n<ul>\n<li>Now we calculate the distance between every new object\u2019s center point and the already presented object\u2019s center point. If<\/li>\n<li>the distance is less than a threshold then the object will be considered as the same object. And we add the object to object_bbs_ids list.<\/li>\n<li>Math.hypot calculates the hypotenuse of a right-angle triangle. It calculates the distance between two points.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/09\/hypotenuse.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-103786\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/09\/hypotenuse.webp\" alt=\"hypotenuse\" width=\"630\" height=\"352\" \/><\/a><\/p>\n<ul>\n<li>After that, we update the center point position for that object.<\/li>\n<\/ul>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">if id in self.abandoned_temp:\r\n                   if distance&lt;1:\r\n                      if self.abandoned_temp[id] &gt;100:\r\n                            abandoned_object.append([id, x, y, w, h, distance])\r\n                      else:\r\n                            self.abandoned_temp[id] += 1  # Increase count for the object\r\n               \t \r\n            Break\r\n\r\n    # If new object is detected then assign the ID to that object\r\n        \tif same_object_detected is False:\r\n            \t# print(False)\r\n            \tself.center_points[self.id_count] = (cx, cy)\r\n            \tself.abandoned_temp[self.id_count] = 1\r\n            \tobjects_bbs_ids.append([x, y, w, h, self.id_count, None])\r\n            \tself.id_count += 1\r\n\r\n<\/pre>\n<ul>\n<li>We know that an abandoned object is a stationary object that doesn\u2019t move. So we again check if the distance is less than 1, then the object is added to the abandoned_temp list.<\/li>\n<li>In each loop, we check the object is still present in the abandoned_temp dictionary. If the object is present for at least 100<\/li>\n<li>frames then we consider the object as an abandoned object otherwise we increase the count by 1.<\/li>\n<li>If the object is not the same then we add the object in relevant dictionaries with a unique id and increase the id by 1.<\/li>\n<\/ul>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\"># Clean the dictionary by center points to remove IDS not used anymore\r\n    \tnew_center_points = {}\r\n    \tabandoned_temp_2 = {}\r\n    \tfor obj_bb_id in objects_bbs_ids:\r\n        \t_, _, _, _, object_id, _ = obj_bb_id\r\n        \tcenter = self.center_points[object_id]\r\n        \t \r\n        \tnew_center_points[object_id] = center\r\n \r\n        \tif object_id in self.abandoned_temp:\r\n            \tcounts = self.abandoned_temp[object_id]\r\n            \tabandoned_temp_2[object_id] = counts\r\n \r\n    \t# Update dictionary with IDs not used removed\r\n    \tself.center_points = new_center_points.copy()\r\n    \tself.abandoned_temp = abandoned_temp_2.copy()\r\n    \treturn objects_bbs_ids , abandoned_object\r\n\r\n<\/pre>\n<ul>\n<li>Here we remove all the objects that are not the frame anymore.<\/li>\n<li>Finally, we return the tracked objects list and abandoned objects list.<\/li>\n<\/ul>\n<p>Our tracker program is done. Now let\u2019s see how the main program works.<\/p>\n<h3>Steps:<\/h3>\n<p>1. Import necessary packages.<br \/>\n2. Preprocess the first frame.<br \/>\n3. Read frames from the video file.<br \/>\n4. Find objects in the current frame.<br \/>\n5. Detect abandoned objects in the frame.<\/p>\n<h4>Step 1 &#8211; Import necessary packages:<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\"># DataFlair Abandoned Object Detection\r\nimport numpy as np\r\nimport cv2\r\nfrom tracker import *\r\n<\/pre>\n<ul>\n<li>First, import all the necessary packages.<\/li>\n<\/ul>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\"># Initialize Tracker\r\ntracker = ObjectTracker()\r\n<\/pre>\n<ul>\n<li>Create a tracker object using ObjectTracker() class that we\u2019ve created in the tracker program.<\/li>\n<\/ul>\n<h4>Step 2 &#8211; Preprocess the first frame:<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\"># location of first frame\r\nfirstframe_path =r'Frame.png'\r\n\r\nfirstframe = cv2.imread(firstframe_path)\r\nfirstframe_gray = cv2.cvtColor(firstframe, cv2.COLOR_BGR2GRAY)\r\nfirstframe_blur = cv2.GaussianBlur(firstframe_gray,(3,3),0)\r\ncv2.imshow(\"First frame\", firstframe_blur)\r\n<\/pre>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/09\/abandoned-object-detection-first-frame.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-103787\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/09\/abandoned-object-detection-first-frame.webp\" alt=\"abandoned object detection first frame\" width=\"1920\" height=\"1024\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/09\/abandoned-object-detection-first-frame.webp 1920w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/09\/abandoned-object-detection-first-frame-768x410.webp 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/09\/abandoned-object-detection-first-frame-1536x819.webp 1536w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/a><\/p>\n<ul>\n<li>Using cv2.imread() we read the first frame from local storage.<\/li>\n<li>Then we convert the image to a grayscale image using cv2.cvtColor(). OpenCV reads an image in BGR format, that\u2019s why we\u2019ve used cv2.COLOR_BGR2GRAY to convert BGR frame to grayscale.<\/li>\n<li>After that, the image is blurred using cv2.GaussianBlur() function. Blurring helps to remove some noises from the image.<\/li>\n<\/ul>\n<h4>Step 3 &#8211; Read frames from the video file:<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\"># location of video\r\nfile_path ='cut.mp4'\r\ncap = cv2.VideoCapture(file_path)\r\n\r\nwhile (cap.isOpened()):\r\n    ret, frame = cap.read()\r\n    \r\n    frame_height, frame_width, _ = frame.shape\r\n<\/pre>\n<ul>\n<li>To read the video file, we\u2019ve used cv2.VideoCapture(). It creates a capture object.<\/li>\n<li>cap.isOpened() checks if the capture object is open or not.<\/li>\n<li>Then using cap.read() we reach each frame from the video file in each loop.<\/li>\n<\/ul>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">frame_gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)\r\nframe_blur = cv2.GaussianBlur(frame_gray,(3,3),0)\r\n<\/pre>\n<ul>\n<li>After that, we again preprocess the current frame using the same method.<\/li>\n<\/ul>\n<h4>Step 4 &#8211; Find objects in the current frame:<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\"># find difference between first frame and current frame\r\n    frame_diff = cv2.absdiff(firstframe, frame)\r\n    cv2.imshow(\"frame diff\",frame_diff)\r\n\r\n    #Canny Edge Detection\r\n    edged = cv2.Canny(frame_diff,5,200)\r\n    cv2.imshow('CannyEdgeDet',edged)\r\n<\/pre>\n<ul>\n<li>Cv2.absdiff finds the difference between the two pictures.<\/li>\n<li>cv2.Canny() detects edges in a frame.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/09\/find-objects-in-current-frame.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-103788\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/09\/find-objects-in-current-frame.webp\" alt=\"find objects in current frame\" width=\"1920\" height=\"1024\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/09\/find-objects-in-current-frame.webp 1920w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/09\/find-objects-in-current-frame-768x410.webp 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/09\/find-objects-in-current-frame-1536x819.webp 1536w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/a><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">kernel = np.ones((10,10),np.uint8) \r\nthresh = cv2.morphologyEx(edged,cv2.MORPH_CLOSE, kernel, iterations=2)\r\n\r\ncv2.imshow('Morph_Close', thresh)\r\n<\/pre>\n<ul>\n<li>cv2.morphologyEx() applies morphological operations .<\/li>\n<li>The higher the kernel size, the more will be eroded or dilated.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/09\/morphology.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-103789\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/09\/morphology.webp\" alt=\"morphology\" width=\"1920\" height=\"1024\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/09\/morphology.webp 1920w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/09\/morphology-768x410.webp 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/09\/morphology-1536x819.webp 1536w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/a><\/p>\n<h4>Step 5 &#8211; Detect abandoned objects in the frame:<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">    cnts, _ = cv2.findContours(thresh, \r\ncv2.RETR_EXTERNAL,cv2.CHAIN_APPROX_SIMPLE)\r\n\r\n    detections=[]\r\n    count = 0\r\n    for c in cnts:\r\n    \tcontourArea = cv2.contourArea(c)\r\n   \t \r\n    \tif contourArea &gt; 50 and contourArea &lt; 10000:\r\n        \tcount +=1\r\n\r\n        \t(x, y, w, h) = cv2.boundingRect(c)\r\n\r\n        \tdetections.append([x, y, w, h])\r\n\r\n    _, abandoned_objects = tracker.update(detections)\r\n<\/pre>\n<ul>\n<li>cv2.findcontours () finds contours of all detected objects. Contour is a curve joining all continuous points that have the same color and intensity.<\/li>\n<li>To remove some noise we calculate the area of contour using cv2.contourArea() function and then we check if the area is greater than a certain threshold.<\/li>\n<li>Using cv2.boundingRect() we get the bounding box for all detected contours. And add to a list called detections.<\/li>\n<li>After getting all bounding boxes we pass the list to our tracker object. The tracker then returns a list of abandoned objects\u2019 location coordinates.<\/li>\n<\/ul>\n<p>Now finally we have all the detected abandoned objects.<\/p>\n<p>for objects in abandoned_objects:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">_, x2, y2, w2, h2, _ = objects\r\n\r\n    \tcv2.putText(frame, \"Suspicious object detected\", (x2, y2 - 10), \r\ncv2.FONT_HERSHEY_PLAIN, 1.2, (0, 0, 255), 2)\r\n    \tcv2.rectangle(frame, (x2, y2), (x2 + w2, y2 + h2), (0, 0, 255), 2)\r\n\r\n\r\n    cv2.imshow('main',frame)\r\n    if cv2.waitKey(15) == ord('q'):\r\n    \tbreak\r\n\r\ncv2.destroyAllWindows()\r\n<\/pre>\n<ul>\n<li>Finally, we draw the rectangle around the detected abandoned object using cv2.rectangle() function and draw a text using cv2.putText() function.<\/li>\n<\/ul>\n<h3>Abandoned Object Detection Output<\/h3>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/09\/abandoned-object-detection-output.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-103790\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/09\/abandoned-object-detection-output.gif\" alt=\"abandoned object detection output\" width=\"585\" height=\"403\" \/><\/a><\/p>\n<h3>Summary<\/h3>\n<p>Abandoned object detection is a computer vision project that helps detect if someone leaves a bag or object in a place and walks away. This system is useful in airports, railway stations, and malls to improve safety. It uses video surveillance and machine learning to check if an object is left alone for a long time. If yes, it raises an alert. The goal is to improve security and reduce risks in public places.<\/p>\n<p>In this project, we\u2019ve built a surveillance system called abandoned object detection. Through this project, we\u2019ve learned to track an object, find the stationary objects in a frame, and also some basic image processing techniques.<span hidden class=\"__iawmlf-post-loop-links\" data-iawmlf-links=\"[{&quot;id&quot;:2498,&quot;href&quot;:&quot;https:\\\/\\\/drive.google.com\\\/file\\\/d\\\/19AD4KpB5bGhjtInJAfTu5y-auiiJECa9\\\/view?usp=drive_link&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20260601062213\\\/https:\\\/\\\/drive.google.com\\\/file\\\/d\\\/19AD4KpB5bGhjtInJAfTu5y-auiiJECa9\\\/view?usp=drive_link&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-06-02 02:33:42&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-08 18:36:00&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-12 09:35:14&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-16 23:10:29&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-21 23:36:22&quot;,&quot;http_code&quot;:200}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-06-21 23:36:22&quot;,&quot;http_code&quot;:200},&quot;process&quot;:&quot;done&quot;}]\"><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Automated video surveillance systems gain huge interest for monitoring public and private places. During the last few years abandoned object detection is a hot topic in the video surveillance community. Abandoned Object Detection systems&#46;&#46;&#46;<\/p>\n","protected":false},"author":10,"featured_media":103791,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36],"tags":[25671,25674,20697,25673,25672,21082],"class_list":["post-101052","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-machine-learning","tag-abandoned-object-detection","tag-abandoned-object-detection-video","tag-machine-learning-project","tag-opencv-abandoned-object-detection","tag-python-abandoned-object-detection","tag-python-project"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Abandoned Object Detection in Video Surveillance using OpenCV - DataFlair<\/title>\n<meta name=\"description\" content=\"Develop an Abandoned object detection system using OpenCV &amp; python. It will keep track of all objects and find abandoned objects.\" \/>\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\/abandoned-object-detection\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Abandoned Object Detection in Video Surveillance using OpenCV - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Develop an Abandoned object detection system using OpenCV &amp; python. It will keep track of all objects and find abandoned objects.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/abandoned-object-detection\/\" \/>\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=\"2021-10-21T03:30:26+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-06-01T06:20:53+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/09\/abandoned-object-detection-video-surveillance.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=\"DataFlair 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=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Abandoned Object Detection in Video Surveillance using OpenCV - DataFlair","description":"Develop an Abandoned object detection system using OpenCV & python. It will keep track of all objects and find abandoned objects.","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\/abandoned-object-detection\/","og_locale":"en_US","og_type":"article","og_title":"Abandoned Object Detection in Video Surveillance using OpenCV - DataFlair","og_description":"Develop an Abandoned object detection system using OpenCV & python. It will keep track of all objects and find abandoned objects.","og_url":"https:\/\/data-flair.training\/blogs\/abandoned-object-detection\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2021-10-21T03:30:26+00:00","article_modified_time":"2026-06-01T06:20:53+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/09\/abandoned-object-detection-video-surveillance.webp","type":"image\/webp"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/abandoned-object-detection\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/abandoned-object-detection\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/a90b082e16aa38d207212d22b0581f33"},"headline":"Abandoned Object Detection in Video Surveillance using OpenCV","datePublished":"2021-10-21T03:30:26+00:00","dateModified":"2026-06-01T06:20:53+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/abandoned-object-detection\/"},"wordCount":1152,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/abandoned-object-detection\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/09\/abandoned-object-detection-video-surveillance.webp","keywords":["abandoned object detection","abandoned object detection video","machine learning project","opencv abandoned object detection","python abandoned object detection","Python project"],"articleSection":["Machine Learning Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/abandoned-object-detection\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/abandoned-object-detection\/","url":"https:\/\/data-flair.training\/blogs\/abandoned-object-detection\/","name":"Abandoned Object Detection in Video Surveillance using OpenCV - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/abandoned-object-detection\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/abandoned-object-detection\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/09\/abandoned-object-detection-video-surveillance.webp","datePublished":"2021-10-21T03:30:26+00:00","dateModified":"2026-06-01T06:20:53+00:00","description":"Develop an Abandoned object detection system using OpenCV & python. It will keep track of all objects and find abandoned objects.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/abandoned-object-detection\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/abandoned-object-detection\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/abandoned-object-detection\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/09\/abandoned-object-detection-video-surveillance.webp","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/09\/abandoned-object-detection-video-surveillance.webp","width":1200,"height":628,"caption":"abandoned-object detection video surveillance"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/abandoned-object-detection\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"Machine Learning Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/machine-learning\/"},{"@type":"ListItem","position":3,"name":"Abandoned Object Detection in Video Surveillance using OpenCV"}]},{"@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\/a90b082e16aa38d207212d22b0581f33","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/dd6de0d647a0185cd6faf264e4ba860b0d85d08d7070766f9cd41bea5bb0b227?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/dd6de0d647a0185cd6faf264e4ba860b0d85d08d7070766f9cd41bea5bb0b227?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/dd6de0d647a0185cd6faf264e4ba860b0d85d08d7070766f9cd41bea5bb0b227?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"The DataFlair Team is passionate about delivering top-notch tutorials and resources on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. With expertise in the tech industry, we simplify complex topics to help learners excel. Stay updated with our latest insights.","url":"https:\/\/data-flair.training\/blogs\/author\/dfadteam1\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/101052","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\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=101052"}],"version-history":[{"count":7,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/101052\/revisions"}],"predecessor-version":[{"id":148566,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/101052\/revisions\/148566"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/103791"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=101052"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=101052"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=101052"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}