

{"id":78782,"date":"2020-07-20T12:23:29","date_gmt":"2020-07-20T06:53:29","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=78782"},"modified":"2025-07-29T19:24:33","modified_gmt":"2025-07-29T13:54:33","slug":"road-lane-line-detection","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/road-lane-line-detection\/","title":{"rendered":"Road Lane line detection &#8211; Computer Vision Project in Python"},"content":{"rendered":"<div class='__iawmlf-post-loop-links' style='display:none;' data-iawmlf-post-links='[{&quot;id&quot;:1044,&quot;href&quot;:&quot;https:\\\/\\\/homepages.inf.ed.ac.uk\\\/rbf\\\/HIPR2\\\/hough.htm&quot;,&quot;archived_href&quot;:&quot;&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[],&quot;broken&quot;:false,&quot;last_checked&quot;:null,&quot;process&quot;:&quot;done&quot;}]'><\/div>\n<p>Lane Line detection is a critical component for self driving cars and also for computer vision in general. This concept is used to describe the path for self-driving cars and to avoid the risk of getting in another lane.<\/p>\n<p>In this article, we will build a machine learning project to detect lane lines in real-time. We will do this using the concepts of computer vision using OpenCV library. To detect the lane we have to detect the white markings on both sides on the lane.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/06\/lane-line-detection-ml-project.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-78783\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/06\/lane-line-detection-ml-project.gif\" alt=\"lane line detection ml project\" width=\"1292\" height=\"991\" data-wp-editing=\"1\" \/><\/a><\/p>\n<h3>Road Lane-Line Detection with Python &amp; OpenCV<\/h3>\n<p>Using computer vision techniques in Python, we will identify road lane lines in which autonomous cars must run. This will be a critical part of autonomous cars, as the self-driving cars should not cross it&#8217;s lane and should not go in opposite lane to avoid accidents.<\/p>\n<h3>Frame Masking and Hough Line Transformation<\/h3>\n<p>To detect white markings in the lane, first, we need to mask the rest part of the frame.\u00a0We do this using frame masking. The frame is nothing but a NumPy array of image pixel values. To mask the unnecessary pixel of the frame, we simply update those pixel values to 0 in the NumPy array.<\/p>\n<p>After making we need to detect lane lines. The technique used to detect mathematical shapes like this is called Hough Transform. Hough transformation can detect shapes like rectangles, circles, triangles, and lines.<\/p>\n<h3>Code Download<\/h3>\n<p>Please download the source code: <a href=\"https:\/\/data-flair.training\/blogs\/download-lane-line-detection-project-source-code\/\"><strong>Lane Line Detection Project Code<\/strong><\/a><\/p>\n<p><strong>Follow the below steps for lane line detection in Python:<\/strong><\/p>\n<p>1. Imports:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">import matplotlib.pyplot as plt\r\n\r\nimport numpy as np\r\nimport cv2\r\nimport os\r\nimport matplotlib.image as mpimg\r\nfrom moviepy.editor import VideoFileClip\r\nimport math\r\n<\/pre>\n<p>2. Apply frame masking and find region of interest:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">def interested_region(img, vertices):\r\n    if len(img.shape) &gt; 2: \r\n        mask_color_ignore = (255,) * img.shape[2]\r\n    else:\r\n        mask_color_ignore = 255\r\n        \r\n    cv2.fillPoly(np.zeros_like(img), vertices, mask_color_ignore)\r\n    return cv2.bitwise_and(img, np.zeros_like(img))\r\n<\/pre>\n<p>3. Conversion of pixels to a line in <a href=\"https:\/\/homepages.inf.ed.ac.uk\/rbf\/HIPR2\/hough.htm\">Hough Transform space<\/a>:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">def hough_lines(img, rho, theta, threshold, min_line_len, max_line_gap):\r\n    lines = cv2.HoughLinesP(img, rho, theta, threshold, np.array([]), minLineLength=min_line_len, maxLineGap=max_line_gap)\r\n    line_img = np.zeros((img.shape[0], img.shape[1], 3), dtype=np.uint8)\r\n    lines_drawn(line_img,lines)\r\n    return line_img\r\n<\/pre>\n<p>4. Create two lines in each frame after Hough transform:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">def lines_drawn(img, lines, color=[255, 0, 0], thickness=6):\r\n    global cache\r\n    global first_frame\r\n    slope_l, slope_r = [],[]\r\n    lane_l,lane_r = [],[]\r\n\r\n    \u03b1 =0.2 \r\n  for line in lines:\r\n        for x1,y1,x2,y2 in line:\r\n            slope = (y2-y1)\/(x2-x1)\r\n            if slope &gt; 0.4:\r\n                slope_r.append(slope)\r\n                lane_r.append(line)\r\n            elif slope &lt; -0.4:\r\n                slope_l.append(slope)\r\n                lane_l.append(line)\r\n        img.shape[0] = min(y1,y2,img.shape[0])\r\n    if((len(lane_l) == 0) or (len(lane_r) == 0)):\r\n        print ('no lane detected')\r\n        return 1\r\n    slope_mean_l = np.mean(slope_l,axis =0)\r\n    slope_mean_r = np.mean(slope_r,axis =0)\r\n    mean_l = np.mean(np.array(lane_l),axis=0)\r\n    mean_r = np.mean(np.array(lane_r),axis=0)\r\n    \r\n    if ((slope_mean_r == 0) or (slope_mean_l == 0 )):\r\n        print('dividing by zero')\r\n        return 1\r\n    \r\n    x1_l = int((img.shape[0] - mean_l[0][1] - (slope_mean_l * mean_l[0][0]))\/slope_mean_l) \r\n    x2_l = int((img.shape[0] - mean_l[0][1] - (slope_mean_l * mean_l[0][0]))\/slope_mean_l)   \r\n    x1_r = int((img.shape[0] - mean_r[0][1] - (slope_mean_r * mean_r[0][0]))\/slope_mean_r)\r\n    x2_r = int((img.shape[0] - mean_r[0][1] - (slope_mean_r * mean_r[0][0]))\/slope_mean_r)\r\n    \r\n   \r\n    if x1_l &gt; x1_r:\r\n        x1_l = int((x1_l+x1_r)\/2)\r\n        x1_r = x1_l\r\n        y1_l = int((slope_mean_l * x1_l ) + mean_l[0][1] - (slope_mean_l * mean_l[0][0]))\r\n        y1_r = int((slope_mean_r * x1_r ) + mean_r[0][1] - (slope_mean_r * mean_r[0][0]))\r\n        y2_l = int((slope_mean_l * x2_l ) + mean_l[0][1] - (slope_mean_l * mean_l[0][0]))\r\n        y2_r = int((slope_mean_r * x2_r ) + mean_r[0][1] - (slope_mean_r * mean_r[0][0]))\r\n    else:\r\n        y1_l = img.shape[0]\r\n        y2_l = img.shape[0]\r\n        y1_r = img.shape[0]\r\n        y2_r = img.shape[0]\r\n      \r\n    present_frame = np.array([x1_l,y1_l,x2_l,y2_l,x1_r,y1_r,x2_r,y2_r],dtype =\"float32\")\r\n    \r\n    if first_frame == 1:\r\n        next_frame = present_frame        \r\n        first_frame = 0        \r\n    else :\r\n        prev_frame = cache\r\n        next_frame = (1-\u03b1)*prev_frame+\u03b1*present_frame\r\n             \r\n    cv2.line(img, (int(next_frame[0]), int(next_frame[1])), (int(next_frame[2]),int(next_frame[3])), color, thickness)\r\n    cv2.line(img, (int(next_frame[4]), int(next_frame[5])), (int(next_frame[6]),int(next_frame[7])), color, thickness)\r\n    \r\n    cache = next_frame\r\n<\/pre>\n<p>5. Process each frame of video to detect lane:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">def weighted_img(img, initial_img, \u03b1=0.8, \u03b2=1., \u03bb=0.):\r\n    return cv2.addWeighted(initial_img, \u03b1, img, \u03b2, \u03bb)\r\n\r\n\r\ndef process_image(image):\r\n\r\n    global first_frame\r\n\r\n    gray_image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)\r\n    img_hsv = cv2.cvtColor(image, cv2.COLOR_RGB2HSV)\r\n\r\n\r\n    lower_yellow = np.array([20, 100, 100], dtype = \"uint8\")\r\n    upper_yellow = np.array([30, 255, 255], dtype=\"uint8\")\r\n\r\n    mask_yellow = cv2.inRange(img_hsv, lower_yellow, upper_yellow)\r\n    mask_white = cv2.inRange(gray_image, 200, 255)\r\n    mask_yw = cv2.bitwise_or(mask_white, mask_yellow)\r\n    mask_yw_image = cv2.bitwise_and(gray_image, mask_yw)\r\n\r\n    gauss_gray= cv2.GaussianBlur(mask_yw_image, (5, 5), 0)\r\n\r\n    canny_edges=cv2.Canny(gauss_gray, 50, 150)\r\n\r\n    imshape = image.shape\r\n    lower_left = [imshape[1]\/9,imshape[0]]\r\n    lower_right = [imshape[1]-imshape[1]\/9,imshape[0]]\r\n    top_left = [imshape[1]\/2-imshape[1]\/8,imshape[0]\/2+imshape[0]\/10]\r\n    top_right = [imshape[1]\/2+imshape[1]\/8,imshape[0]\/2+imshape[0]\/10]\r\n    vertices = [np.array([lower_left,top_left,top_right,lower_right],dtype=np.int32)]\r\n    roi_image = interested_region(canny_edges, vertices)\r\n\r\n    theta = np.pi\/180\r\n\r\n    line_image = hough_lines(roi_image, 4, theta, 30, 100, 180)\r\n    result = weighted_img(line_image, image, \u03b1=0.8, \u03b2=1., \u03bb=0.)\r\n    return result\r\n<\/pre>\n<p>6. Clip the input video to frames and get the resultant output video file:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">first_frame = 1\r\nwhite_output = '__path_to_output_file__'\r\nclip1 = VideoFileClip(\"__path_to_input_file__\")\r\nwhite_clip = clip1.fl_image(process_image)\r\nwhite_clip.write_videofile(white_output, audio=False)\r\n<\/pre>\n<h3>Code for Lane Line Detection Project GUI:<\/h3>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">import tkinter as tk\r\nfrom tkinter import *\r\nimport cv2\r\nfrom PIL import Image, ImageTk\r\nimport os\r\nimport numpy as np\r\n\r\n\r\nglobal last_frame1                                   \r\nlast_frame1 = np.zeros((480, 640, 3), dtype=np.uint8)\r\nglobal last_frame2                                      \r\nlast_frame2 = np.zeros((480, 640, 3), dtype=np.uint8)\r\nglobal cap1\r\nglobal cap2\r\ncap1 = cv2.VideoCapture(\"path_to_input_test_video\")\r\ncap2 = cv2.VideoCapture(\"path_to_resultant_lane_detected_video\")\r\n\r\ndef show_vid():                                       \r\n    if not cap1.isOpened():                             \r\n        print(\"cant open the camera1\")\r\n    flag1, frame1 = cap1.read()\r\n    frame1 = cv2.resize(frame1,(400,500))\r\n    if flag1 is None:\r\n        print (\"Major error!\")\r\n    elif flag1:\r\n        global last_frame1\r\n        last_frame1 = frame1.copy()\r\n        pic = cv2.cvtColor(last_frame1, cv2.COLOR_BGR2RGB)     \r\n        img = Image.fromarray(pic)\r\n        imgtk = ImageTk.PhotoImage(image=img)\r\n        lmain.imgtk = imgtk\r\n        lmain.configure(image=imgtk)\r\n        lmain.after(10, show_vid)\r\n\r\n\r\ndef show_vid2():\r\n    if not cap2.isOpened():                             \r\n        print(\"cant open the camera2\")\r\n    flag2, frame2 = cap2.read()\r\n    frame2 = cv2.resize(frame2,(400,500))\r\n    if flag2 is None:\r\n        print (\"Major error2!\")\r\n    elif flag2:\r\n        global last_frame2\r\n        last_frame2 = frame2.copy()\r\n        pic2 = cv2.cvtColor(last_frame2, cv2.COLOR_BGR2RGB)\r\n        img2 = Image.fromarray(pic2)\r\n        img2tk = ImageTk.PhotoImage(image=img2)\r\n        lmain2.img2tk = img2tk\r\n        lmain2.configure(image=img2tk)\r\n        lmain2.after(10, show_vid2)\r\n\r\nif __name__ == '__main__':\r\n    root=tk.Tk()                                     \r\n    lmain = tk.Label(master=root)\r\n    lmain2 = tk.Label(master=root)\r\n\r\n    lmain.pack(side = LEFT)\r\n    lmain2.pack(side = RIGHT)\r\n    root.title(\"Lane-line detection\")            \r\n    root.geometry(\"900x700+100+10\") \r\n    exitbutton = Button(root, text='Quit',fg=\"red\",command=   root.destroy).pack(side = BOTTOM,)\r\n    show_vid()\r\n    show_vid2()\r\n    root.mainloop()                                  \r\n    cap.release()\r\n<\/pre>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/06\/lane-line-detection-ml-project-2.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-78784\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/06\/lane-line-detection-ml-project-2.gif\" alt=\"lane line detection ml python project\" width=\"1291\" height=\"991\" \/><\/a><\/p>\n<h3>Summary<\/h3>\n<p>Self-driving cars need to detect road lanes to stay in the right direction. With Python and OpenCV, we can build a project that finds lane lines in a driving video. This helps cars or bots stay in their lane by recognizing white or yellow lines on the road. The project uses basic image processing like edge detection and Hough transform.<\/p>\n<p>This is an intermediate Python project in machine learning, which is helpful for the data science aspirants to master machine learning and gain expertise.<\/p>\n<p>In this lane line detection project, we use OpenCV. Before detecting lane lines, we masked remaining objects and then identified the line with Hough transformation.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Lane Line detection is a critical component for self driving cars and also for computer vision in general. This concept is used to describe the path for self-driving cars and to avoid the risk&#46;&#46;&#46;<\/p>\n","protected":false},"author":10,"featured_media":78787,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36],"tags":[21721,21686,22470,21082],"class_list":["post-78782","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-machine-learning","tag-advanced-computer-vision-projects","tag-deep-learning-project","tag-lane-line-detection","tag-python-project"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Road Lane line detection - Computer Vision Project in Python - DataFlair<\/title>\n<meta name=\"description\" content=\"Lane line detection in real-time - Develop a machine learning project to detect lane lines with the concepts of computer vision using OpenCV library.\" \/>\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\/road-lane-line-detection\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Road Lane line detection - Computer Vision Project in Python - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Lane line detection in real-time - Develop a machine learning project to detect lane lines with the concepts of computer vision using OpenCV library.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/road-lane-line-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=\"2020-07-20T06:53:29+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-07-29T13:54:33+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/06\/python-project-lane-line-detection.jpg\" \/>\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\/jpeg\" \/>\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=\"3 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Road Lane line detection - Computer Vision Project in Python - DataFlair","description":"Lane line detection in real-time - Develop a machine learning project to detect lane lines with the concepts of computer vision using OpenCV library.","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\/road-lane-line-detection\/","og_locale":"en_US","og_type":"article","og_title":"Road Lane line detection - Computer Vision Project in Python - DataFlair","og_description":"Lane line detection in real-time - Develop a machine learning project to detect lane lines with the concepts of computer vision using OpenCV library.","og_url":"https:\/\/data-flair.training\/blogs\/road-lane-line-detection\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2020-07-20T06:53:29+00:00","article_modified_time":"2025-07-29T13:54:33+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/06\/python-project-lane-line-detection.jpg","type":"image\/jpeg"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/road-lane-line-detection\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/road-lane-line-detection\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/a90b082e16aa38d207212d22b0581f33"},"headline":"Road Lane line detection &#8211; Computer Vision Project in Python","datePublished":"2020-07-20T06:53:29+00:00","dateModified":"2025-07-29T13:54:33+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/road-lane-line-detection\/"},"wordCount":430,"commentCount":31,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/road-lane-line-detection\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/06\/python-project-lane-line-detection.jpg","keywords":["Advanced Computer Vision Projects","deep learning project","lane line detection","Python project"],"articleSection":["Machine Learning Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/road-lane-line-detection\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/road-lane-line-detection\/","url":"https:\/\/data-flair.training\/blogs\/road-lane-line-detection\/","name":"Road Lane line detection - Computer Vision Project in Python - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/road-lane-line-detection\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/road-lane-line-detection\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/06\/python-project-lane-line-detection.jpg","datePublished":"2020-07-20T06:53:29+00:00","dateModified":"2025-07-29T13:54:33+00:00","description":"Lane line detection in real-time - Develop a machine learning project to detect lane lines with the concepts of computer vision using OpenCV library.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/road-lane-line-detection\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/road-lane-line-detection\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/road-lane-line-detection\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/06\/python-project-lane-line-detection.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/06\/python-project-lane-line-detection.jpg","width":1200,"height":628,"caption":"python project lane line detection"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/road-lane-line-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":"Road Lane line detection &#8211; Computer Vision Project in Python"}]},{"@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\/78782","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=78782"}],"version-history":[{"count":8,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/78782\/revisions"}],"predecessor-version":[{"id":146343,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/78782\/revisions\/146343"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/78787"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=78782"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=78782"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=78782"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}