

{"id":120213,"date":"2024-03-05T18:00:17","date_gmt":"2024-03-05T12:30:17","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=120213"},"modified":"2024-03-05T18:32:16","modified_gmt":"2024-03-05T13:02:16","slug":"drawing-polylines-convex-polylines-arrowed-lines-using-opencv","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/drawing-polylines-convex-polylines-arrowed-lines-using-opencv\/","title":{"rendered":"Drawing Polylines, Convex Polylines, Arrowed Lines using OpenCV"},"content":{"rendered":"<p>In the captivating realm of computer vision, the art of visual expression knows no bounds. A universe of imaginative possibilities is accessible thanks to OpenCV, the formidable image processing library.<\/p>\n<p>In this article, we set out on an exciting quest to learn how to use OpenCV to create polylines, convex polylines, and arrowed lines. Join us as we delve into the realm of shapes and lines, discovering how these fundamental tools can add depth, clarity, and impact to your computer vision projects.<\/p>\n<h2>Let\u2019s Draw some Complex shapes Using OpenCV.<\/h2>\n<p>Polylines consist of multiple line segments that connect a series of points in a continuous manner, creating a path that can be opened or closed. They are commonly used to represent complex shapes, contours, or outlines in computer graphics and image processing.<\/p>\n<p>Regular lines, on the other hand, are simple straight paths that connect two points in space. They are represented by their two endpoints and are used for basic point-to-point connections. Polylines offer greater versatility by connecting multiple points to form more intricate shapes, while regular lines are limited to connecting just two points in a straight line.<\/p>\n<h3>Unleashing the Artistry of Polylines with OpenCV&#8217;s cv2.polylines()<\/h3>\n<p>In the enthralling world of computer vision, one of the essential techniques for shaping visual narratives is the use of polylines. These versatile and expressive constructs enable us to connect a sequence of points, creating intricate paths and outlines that can add structure and meaning to our images.<\/p>\n<p>OpenCV, the eminent library for image processing, empowers us with the cv2.polylines() function, a powerful tool that allows us to effortlessly draw polylines on images. With its intuitive syntax and customizable parameters, cv2.polylines() opens up a world of artistic possibilities.<\/p>\n<p><strong>Let&#8217;s take a closer look at the syntax and parameters of cv2.polylines() to understand how to wield this artistic instrument :<\/strong><\/p>\n<p><strong>Syntax :<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">cv2.polylines(img, pts, isClosed, color, thickness[, lineType[, shift]])<\/pre>\n<p><strong>Parameters :\u00a0<\/strong><\/p>\n<ul>\n<li><strong>img:<\/strong> The image on which to draw the polylines.<\/li>\n<li><strong>pts:<\/strong> A list of arrays, each containing the coordinates of the points that make up the polyline.<\/li>\n<li><strong>isClosed:<\/strong> A boolean parameter that indicates whether the polyline should be closed (forming a shape) or open (a sequence of connected lines).<\/li>\n<li><strong>Color:<\/strong> The color of the polyline in BGR format (e.g., `(255, 0, 0)` for blue).<\/li>\n<li><strong>Thickness:<\/strong> The thickness of the polyline.<\/li>\n<li><strong>lineType:<\/strong> An optional parameter that specifies the type of line to be drawn. It defaults to 8-connected lines.<\/li>\n<li><strong>Shift:<\/strong> An optional parameter representing the number of fractional bits in the coordinates. It defaults to 0.<\/li>\n<\/ul>\n<p><strong>Let&#8217;s illustrate the power of cv2.polylines() with a simple example. Suppose we have an image `img` and want to draw a blue square with a thickness of 2 pixels:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">import cv2\r\nimport numpy as np\r\n\r\n# Create a blank black image\r\nimg = np.zeros((400, 400, 3), dtype=np.uint8)\r\n\r\n# Define the coordinates of the square\r\npts = np.array([[100, 100], [300, 100], [300, 300], [100, 300]], np.int32)\r\n\r\n# Reshape the points to be a list of polylines\r\npts = pts.reshape((-1, 1, 2))\r\n\r\n# Draw the blue square on the image\r\ncv2.polylines(img, [pts], isClosed=True, color=(255, 0, 0), thickness=2)\r\n\r\n# Display the image\r\ncv2.imshow('Image with Blue Square', img)\r\ncv2.waitKey(0)\r\ncv2.destroyAllWindows()<\/pre>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/11\/Artistry-of-Polylines-with-OpenCVs.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-125862 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/11\/Artistry-of-Polylines-with-OpenCVs.webp\" alt=\"Artistry of Polylines with OpenCV's\" width=\"497\" height=\"532\" \/><\/a><\/p>\n<ul>\n<li>In this example, we&#8217;ve created a black canvas and used cv2.polylines() to draw a blue square on it.<\/li>\n<li>You can easily modify the coordinates, color, thickness, and other parameters to create an endless variety of artistic shapes.<\/li>\n<li>With cv2.polylines() at our fingertips, we can channel our creativity and breathe life into our images, crafting visual masterpieces that captivate the eye and tell compelling stories.<\/li>\n<li>As you investigate the limitless options provided by this captivating function, let your creativity soar.<\/li>\n<li>In this introduction, I&#8217;ve provided a brief overview of cv2.polylines(), explaining its syntax and parameters. Additionally, I&#8217;ve included a simple code example to demonstrate its usage in drawing a blue square.<\/li>\n<\/ul>\n<h3>Unleashing the Power of Filled Convex Polylines with OpenCV&#8217;s cv2.fillConvexPoly()<\/h3>\n<ul>\n<li>In the enthralling realm of computer vision and image processing, the concept of drawing filled convex polylines takes center stage, offering a compelling and versatile technique.<\/li>\n<li>OpenCV, the eminent library in this domain, equips us with a remarkable tool &#8211; cv2.fillConvexPoly() &#8211; that enables us to effortlessly create solid shapes with convex outlines.<\/li>\n<li>The cv2.fillConvexPoly() function is your gateway to drawing filled convex polylines on images, defining shapes that connect a sequence of points in a continuous manner.<\/li>\n<li>Its simple syntax and customizable parameters open up a world of artistic possibilities, allowing us to craft captivating visual compositions with ease.<\/li>\n<\/ul>\n<p><strong>Let&#8217;s delve into the magic of cv2.fillConvexPoly() with a glimpse into its syntax and essential parameters:<\/strong><\/p>\n<p><strong>Syntax:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">cv2.fillConvexPoly(img, points, color[, lineType[, shift]])<\/pre>\n<p><strong>Parameters:<\/strong><\/p>\n<ul>\n<li><strong>Img:<\/strong> The image on which to draw the filled convex polyline.<\/li>\n<li><strong>Points:<\/strong> A list of tuples or an array of shape `(n, 2)` containing the coordinates of the points forming the convex shape.<\/li>\n<li><strong>Color:<\/strong> The color of the filled convex polyline in BGR format.<\/li>\n<li><strong>lineType:<\/strong> An optional parameter specifying the type of line to be drawn, with the default being 8-connected lines.<\/li>\n<li><strong>Shift:<\/strong> An optional parameter representing the number of fractional bits in the coordinates.<\/li>\n<li>Let&#8217;s embark on an artistic journey by exploring a captivating example of cv2.fillConvexPoly().<\/li>\n<\/ul>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">import cv2\r\nimport numpy as np\r\n\r\n# Create a blank black image\r\nwidth, height = 400, 400\r\nimg = np.zeros((height, width, 3), dtype=np.uint8)\r\n\r\n# Define the vertices of the filled polygon\r\nvertices = np.array([[100, 100], [300, 100], [300, 300], [200, 350], [100, 300]], np.int32)\r\n\r\n# Reshape the vertices to be a 1x5 array\r\nvertices = vertices.reshape((-1, 1, 2))\r\n\r\n# Draw the filled polygon in red color (BGR format)\r\ncv2.fillConvexPoly(img, vertices, color=(0, 0, 255))\r\n\r\n# Display the image\r\ncv2.imshow('Filled Polygon', img)\r\ncv2.waitKey(0)\r\ncv2.destroyAllWindows()<\/pre>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/11\/Power-of-Filled-Convex-Polylines.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-125863 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/11\/Power-of-Filled-Convex-Polylines.webp\" alt=\"Power of Filled Convex Polylines\" width=\"497\" height=\"537\" \/><\/a><\/p>\n<ul>\n<li>In this captivating example, we&#8217;ve created a blank white canvas and used cv2.fillConvexPoly() to draw a filled polygon in red color.<\/li>\n<li>The function ensures that the shape is filled and has a convex outline, resulting in a visually striking composition.<\/li>\n<li>With cv2.fillConvexPoly() at your disposal, you can effortlessly infuse your computer vision projects with elegance and creativity, painting vibrant solid shapes that leave a lasting impact.&#8221;<\/li>\n<li>In this introduction, I&#8217;ve provided a concise overview of cv2.fillConvexPoly(), explaining its syntax and parameters.<\/li>\n<li>Additionally, I&#8217;ve included a captivating code example to demonstrate its usage in drawing a filled Polygon.<\/li>\n<\/ul>\n<h3>Let\u2019s check out some cool OpenCV marker types<\/h3>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#include &lt;opencv2\/imgproc.hpp&gt;<\/pre>\n<p>A possible set of marker types used for the <strong>cv::drawMarker<\/strong> function<\/p>\n<table>\n<tbody>\n<tr>\n<td colspan=\"2\"><span style=\"font-weight: 400\">Enumerator<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">MARKER_CROSS\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">Python: cv.MARKER_CROSS<\/span><\/td>\n<td><span style=\"font-weight: 400\">A crosshair marker shape.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">MARKER_TILTED_CROSS\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">Python: cv.MARKER_TILTED_CROSS<\/span><\/td>\n<td><span style=\"font-weight: 400\">A 45 degree tilted crosshair marker shape.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">MARKER_STAR\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">Python: cv.MARKER_STAR<\/span><\/td>\n<td><span style=\"font-weight: 400\">A star marker shape, combination of cross and tilted cross.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">MARKER_DIAMOND\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">Python: cv.MARKER_DIAMOND<\/span><\/td>\n<td><span style=\"font-weight: 400\">A diamond marker shape.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">MARKER_SQUARE\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">Python: cv.MARKER_SQUARE<\/span><\/td>\n<td><span style=\"font-weight: 400\">A square marker shape.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">MARKER_TRIANGLE_UP\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">Python: cv.MARKER_TRIANGLE_UP<\/span><\/td>\n<td><span style=\"font-weight: 400\">An upwards pointing triangle marker shape.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">MARKER_TRIANGLE_DOWN\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">Python: cv.MARKER_TRIANGLE_DOWN<\/span><\/td>\n<td><span style=\"font-weight: 400\">A downwards pointing triangle marker shape.<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Mastering the Art of Drawing Arrowed Lines with OpenCV&#8217;s cv2.arrowedLine()<\/h3>\n<p>In the captivating realm of computer vision and image processing, the skill of drawing arrowed lines takes center stage, offering a powerful and visually expressive technique.<\/p>\n<p>OpenCV, the esteemed library in this domain, equips us with a remarkable tool &#8211; cv2.arrowedLine() &#8211; that empowers us to effortlessly create arrows with precision and style.<\/p>\n<p>The cv2.arrowedLine() function is your gateway to drawing arrowed lines on images, providing a clear and dynamic way to highlight directions and relationships.<\/p>\n<p>With its simple syntax and customizable parameters, this function unlocks a world of possibilities, allowing us to craft visually engaging compositions with ease.<\/p>\n<p><strong>Let&#8217;s explore the magic of cv2.arrowedLine() with a glimpse into its syntax and essential parameters:<\/strong><\/p>\n<p><strong>Syntax:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">cv2.arrowedLine(img, pt1, pt2, color, thickness[, line_type[, tipLength]])<\/pre>\n<p><strong>Parameters:<\/strong><\/p>\n<ul>\n<li><strong>Img:<\/strong> The image on which to draw the arrowed line.<\/li>\n<li><strong>Pt1:<\/strong> The starting point (x, y) of the arrow.<\/li>\n<li><strong>Pt2:<\/strong> The ending point (x, y) of the arrow.<\/li>\n<li><strong>Color:<\/strong> The color of the arrowed line in BGR format.<\/li>\n<li><strong>Thickness:<\/strong> The thickness of the arrowed line.<\/li>\n<li><strong>Line_type:<\/strong> An optional parameter specifying the type of line to be drawn, with the default being 8-connected lines.<\/li>\n<li><strong>tipLength:<\/strong> An optional parameter representing the length of the arrowhead tip relative to the arrowed line&#8217;s length.<\/li>\n<\/ul>\n<p>Let&#8217;s embark on an artistic journey with a captivating example of cv2.arrowedLine(). <strong>Picture creating a dynamic arrow to indicate direction on a blank canvas:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">import cv2\r\nimport numpy as np\r\n\r\n# Create a blank white image\r\nwidth, height = 400, 400\r\nimg = np.ones((height, width, 3), dtype=np.uint8) * 255\r\n\r\n# Define the starting and ending points of the arrow\r\nstart_point = (100, 200)\r\nend_point = (300, 200)\r\n\r\n# Draw the arrowed line on the image in blue color with a thickness of 2 pixels and a tipLength of 0.3\r\ncv2.arrowedLine(img, start_point, end_point, color=(255, 0, 0), thickness=2, tipLength=0.3)\r\n\r\n# Display the image\r\ncv2.imshow('Dynamic Arrow', img)\r\ncv2.waitKey(0)\r\ncv2.destroyAllWindows()<\/pre>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/11\/Arrowed-Lines-with-OpenCV.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-125864 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/11\/Arrowed-Lines-with-OpenCV.webp\" alt=\" Arrowed Lines with OpenCV\" width=\"497\" height=\"530\" \/><\/a><\/p>\n<ul>\n<li>In this captivating example, we&#8217;ve created a blank white canvas and used cv2.arrowedLine() to draw a dynamic arrow from one point to another in blue color. The arrow&#8217;s direction and style provide a clear and engaging visual cue.<\/li>\n<li>With cv2.arrowedLine() as your artistic tool, you can effortlessly infuse your computer vision projects with clear visual communication, guiding the eye with precision and creativity.&#8221;<\/li>\n<li>In this introduction, I&#8217;ve provided a concise overview of cv2.arrowedLine(), explaining its syntax and parameters. Additionally, I&#8217;ve included a captivating code example to demonstrate its usage in drawing a dynamic arrowed line.<\/li>\n<\/ul>\n<h3>Summary<\/h3>\n<p>In this captivating journey through computer vision, we&#8217;ve explored the artistic wonders of OpenCV&#8217;s drawing capabilities. From crafting intricate polylines to elegant convex shapes and guiding the eye with dynamic arrowed lines, we&#8217;ve harnessed the power of visual expression.<\/p>\n<p>With OpenCV&#8217;s cv2.polylines(), we shaped mesmerizing paths and contours, opening doors to endless possibilities.cv2.fillConvexPoly() enriched our canvas with solid shapes and captivating outlines, adding depth to our creations. Through cv2.arrowedLine(), we directed attention with precision, bringing clarity and focus to our visual narratives.<\/p>\n<p>As you continue your creative adventure, let your imagination soar and paint your visions onto the canvas of computer vision. With OpenCV&#8217;s artistic tools at your fingertips, the possibilities are as vast as your imagination.<\/p>\n<p>May your future creations be filled with elegance, flair, and the magic that only visual storytelling can convey. Happy drawing, and may your visual masterpieces inspire and captivate all who behold them!&#8221;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the captivating realm of computer vision, the art of visual expression knows no bounds. A universe of imaginative possibilities is accessible thanks to OpenCV, the formidable image processing library. In this article, we&#46;&#46;&#46;<\/p>\n","protected":false},"author":86671,"featured_media":120215,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27755],"tags":[30013,30012,9267,29991],"class_list":["post-120213","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-opencv-tutorials","tag-draw-polylines-using-opencv","tag-drawing-polylines-convex-polylines-arrowed-lines-using-opencv","tag-opencv","tag-opencv-tutorials"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Drawing Polylines, Convex Polylines, Arrowed Lines using OpenCV - DataFlair<\/title>\n<meta name=\"description\" content=\"We set out on an exciting quest to learn how to use OpenCV to create polylines, convex polylines, and arrowed lines.\" \/>\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\/drawing-polylines-convex-polylines-arrowed-lines-using-opencv\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Drawing Polylines, Convex Polylines, Arrowed Lines using OpenCV - DataFlair\" \/>\n<meta property=\"og:description\" content=\"We set out on an exciting quest to learn how to use OpenCV to create polylines, convex polylines, and arrowed lines.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/drawing-polylines-convex-polylines-arrowed-lines-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-03-05T12:30:17+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-05T13:02:16+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/drawing-polylines-covex-polylines-arrowed-line-using-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=\"8 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Drawing Polylines, Convex Polylines, Arrowed Lines using OpenCV - DataFlair","description":"We set out on an exciting quest to learn how to use OpenCV to create polylines, convex polylines, and arrowed lines.","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\/drawing-polylines-convex-polylines-arrowed-lines-using-opencv\/","og_locale":"en_US","og_type":"article","og_title":"Drawing Polylines, Convex Polylines, Arrowed Lines using OpenCV - DataFlair","og_description":"We set out on an exciting quest to learn how to use OpenCV to create polylines, convex polylines, and arrowed lines.","og_url":"https:\/\/data-flair.training\/blogs\/drawing-polylines-convex-polylines-arrowed-lines-using-opencv\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2024-03-05T12:30:17+00:00","article_modified_time":"2024-03-05T13:02:16+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/drawing-polylines-covex-polylines-arrowed-line-using-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":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/drawing-polylines-convex-polylines-arrowed-lines-using-opencv\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/drawing-polylines-convex-polylines-arrowed-lines-using-opencv\/"},"author":{"name":"TechVidvan Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/0e594f928e31fc96628ac40f6ae74f49"},"headline":"Drawing Polylines, Convex Polylines, Arrowed Lines using OpenCV","datePublished":"2024-03-05T12:30:17+00:00","dateModified":"2024-03-05T13:02:16+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/drawing-polylines-convex-polylines-arrowed-lines-using-opencv\/"},"wordCount":1505,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/drawing-polylines-convex-polylines-arrowed-lines-using-opencv\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/drawing-polylines-covex-polylines-arrowed-line-using-opencv.webp","keywords":["draw polylines using opencv","drawing polylines convex polylines arrowed lines using opencv","opencv","opencv tutorials"],"articleSection":["OpenCV Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/drawing-polylines-convex-polylines-arrowed-lines-using-opencv\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/drawing-polylines-convex-polylines-arrowed-lines-using-opencv\/","url":"https:\/\/data-flair.training\/blogs\/drawing-polylines-convex-polylines-arrowed-lines-using-opencv\/","name":"Drawing Polylines, Convex Polylines, Arrowed Lines using OpenCV - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/drawing-polylines-convex-polylines-arrowed-lines-using-opencv\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/drawing-polylines-convex-polylines-arrowed-lines-using-opencv\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/drawing-polylines-covex-polylines-arrowed-line-using-opencv.webp","datePublished":"2024-03-05T12:30:17+00:00","dateModified":"2024-03-05T13:02:16+00:00","description":"We set out on an exciting quest to learn how to use OpenCV to create polylines, convex polylines, and arrowed lines.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/drawing-polylines-convex-polylines-arrowed-lines-using-opencv\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/drawing-polylines-convex-polylines-arrowed-lines-using-opencv\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/drawing-polylines-convex-polylines-arrowed-lines-using-opencv\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/drawing-polylines-covex-polylines-arrowed-line-using-opencv.webp","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/drawing-polylines-covex-polylines-arrowed-line-using-opencv.webp","width":1200,"height":628,"caption":"drawing polylines covex polylines arrowed line using opencv"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/drawing-polylines-convex-polylines-arrowed-lines-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":"Drawing Polylines, Convex Polylines, Arrowed Lines 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\/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\/120213","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=120213"}],"version-history":[{"count":6,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/120213\/revisions"}],"predecessor-version":[{"id":134471,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/120213\/revisions\/134471"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/120215"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=120213"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=120213"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=120213"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}