{"id":83073,"date":"2021-07-21T10:45:33","date_gmt":"2021-07-21T05:15:33","guid":{"rendered":"https:\/\/techvidvan.com\/tutorials\/?p=83073"},"modified":"2026-06-03T15:03:11","modified_gmt":"2026-06-03T09:33:11","slug":"create-air-canvas-using-opencv-python","status":"publish","type":"post","link":"https:\/\/techvidvan.com\/tutorials\/create-air-canvas-using-opencv-python\/","title":{"rendered":"Create Air Canvas using Python Open CV"},"content":{"rendered":"<p>We know that artists create paintings on a canvas. But what if we can paint on air just by waving our hands. So, in this project, we are going to build an air canvas using OpenCV and Python.<\/p>\n<p>OpenCV is an open-source computer vision library for performing various advanced image processing tasks.<\/p>\n<p>We\u2019ll use color detection and segmentation techniques to achieve this objective.<\/p>\n<p>Here, we\u2019re going to use a green object to simulate a pencil for the canvas.<\/p>\n<h3>So what is Color Detection and Segmentation in Image Processing?<\/h3>\n<ul>\n<li>Color detection is an image processing technique where we can detect any color in a given range of HSV color space.<\/li>\n<li>Image segmentation is the process of labeling every pixel in an image, where each pixel shares the same certain characteristics.<\/li>\n<\/ul>\n<h3>Project Prerequisites:<\/h3>\n<p>1. Python &#8211; 3.x (We used 3.8.8 for this project)<br \/>\n2. OpenCV &#8211; 4.4<\/p>\n<ul>\n<li>Run \u201cpip install opencv-python opencv_contrib-python\u201d to install the package<\/li>\n<\/ul>\n<p>3. Numpy &#8211; 1.20.1<\/p>\n<h3>Download Air Canvas OpenCV Python Code<\/h3>\n<p>Please download the source code of python air canvas project: <a href=\"https:\/\/drive.google.com\/file\/d\/1XsCo7txWfULUZSuUdjliArzFpiBBel3B\/view?usp=drive_link\"><strong>Air Canvas OpenCV Project Code<\/strong><\/a><\/p>\n<h3>Steps to develop air canvas project using opencv:<\/h3>\n<ul>\n<li>Import necessary packages.<\/li>\n<li>Read frames from a webcam<\/li>\n<li>Create the canvas window<\/li>\n<li>Detect the green color<\/li>\n<li>Draw on the canvas<\/li>\n<\/ul>\n<h4>Step 1 &#8211; Import necessary packages and pre-define some settings:<\/h4>\n<p>To build this project, we need only two packages, OpenCV and Numpy. So first we\u2019ve to import these.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\"># Import necessary packages.\r\nimport cv2\r\nimport numpy as np<\/pre>\n<h4>Step 2 &#8211; Read frames from a webcam:<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\"># Create videocapture object\r\ncap = cv2.VideoCapture(0)\r\n\r\nwhile True:\r\n    # Read each frame from webcam\r\n    success, frame = cap.read()\r\n\r\n    # Flip the frame\r\n    frame = cv2.flip(frame, 1)\r\n\r\n    cv2.imshow(\"Frame\", frame)\r\n\r\n    # Open the OpenCV window until 'q' is pressed\r\n    if cv2.waitKey(1) == ord('q'):\r\n        break\r\n\r\ncap.release()\r\ncv2.destroyAllWindows()\r\n<\/pre>\n<ul>\n<li>First, we created a VideoCapture object and defined the object as cap.<\/li>\n<li>cap.read() function reads each frame from the webcam.<\/li>\n<li>cv2.flip() flips the frame. The arguments are input image\/frame and axis. 0 is for flip vertically, and 1 for flip horizontally.<\/li>\n<li>cv2.imshow() function shows frame in a new window.<\/li>\n<li>cv2.waitKey(1) == ord(&#8216;q&#8217;) keep open the window until \u2018q\u2019 is pressed.<\/li>\n<\/ul>\n<h4>Step 3 &#8211; Create the canvas window:<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\"># Define various colors\r\ncolors = [(255, 0, 0), (255, 0, 255), (0, 255, 0), (0, 0, 255), (0, 255, 255)]\r\ncolor = colors[0]<\/pre>\n<ul>\n<li>First, we define some colors that we\u2019ll be using during this project.\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">width = int(cap.get(3))\r\nheight = int(cap.get(4))\r\n\r\n# Create a blank canvas \r\ncanvas = np.zeros((height, width, 3), np.uint8)<\/pre>\n<\/li>\n<li>Then we create an empty blank canvas the same size as the camera frame.<\/li>\n<li>np.zeros() create a matrix containing all 0\u2019s.<\/li>\n<\/ul>\n<p>We want to change the pencil color during painting, That\u2019s why we have to create some buttons in the frame. Using those buttons we can select the pencil color during painting in real-time.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\"># Adding the colour buttons to the live frame for colour access\r\n    cv2.rectangle(frame, (20,1), (120,65), (122,122,122), -1)\r\n    cv2.rectangle(frame, (140,1), (220,65), colors[0], -1)\r\n    cv2.rectangle(frame, (240,1), (320,65), colors[1], -1)\r\n    cv2.rectangle(frame, (340,1), (420,65), colors[2], -1)\r\n    cv2.rectangle(frame, (440,1), (520,65), colors[3], -1)\r\n    cv2.rectangle(frame, (540,1), (620,65), colors[4], -1)\r\n    cv2.putText(frame, \"CLEAR ALL\", (30, 33), cv2.FONT_HERSHEY_SIMPLEX, 0.5, \r\n(255, 255, 255), 2, cv2.LINE_AA)\r\n    cv2.putText(frame, \"BLUE\", (155, 33), cv2.FONT_HERSHEY_SIMPLEX, 0.5,\r\n (255, 255, 255), 2, cv2.LINE_AA)\r\n    cv2.putText(frame, \"VIOLET\", (255, 33), cv2.FONT_HERSHEY_SIMPLEX, 0.5,\r\n (255,255, 255), 2, cv2.LINE_AA)\r\n    cv2.putText(frame, \"GREEN\", (355, 33), cv2.FONT_HERSHEY_SIMPLEX, 0.5, \r\n(255, 255, 255), 2, cv2.LINE_AA)\r\n    cv2.putText(frame, \"RED\", (465, 33), cv2.FONT_HERSHEY_SIMPLEX, 0.5,\r\n \t\t\t\t\t\t\t(255, 255, 255), 2, cv2.LINE_AA)\r\n    cv2.putText(frame, \"YELLOW\", (555, 33), cv2.FONT_HERSHEY_SIMPLEX, 0.5, \r\n(255,255,255), 2, cv2.LINE_AA)\r\n<\/pre>\n<ul>\n<li>Using cv2.rectangle(), we draw some rectangles of different colors that we\u2019ve defined before.<\/li>\n<li>cv2.putText() draws texts on a frame. Using this function we put each of the names of the colors to their corresponding rectangle box.<\/li>\n<\/ul>\n<p><strong>Output:<\/strong><\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/07\/canvas.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-83569\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/07\/canvas.png\" alt=\"canvas\" width=\"1920\" height=\"1078\" \/><\/a><\/p>\n<h4>Step 4 &#8211; Detect the green color:<\/h4>\n<p>Here we\u2019re using a green object to simulate the pencil of our canvas. OpenCV reads frames as BGR color space. But to detect colors, we have to convert the frame to the HSV color space.<\/p>\n<p><strong>But what is HSV color-space?<\/strong><\/p>\n<p>HSV stands for HUE, SATURATION, and VALUE (or brightness). It is basically a cylindrical color space.<\/p>\n<p>Note: This image is taken from google.<\/p>\n<ul>\n<li>HUE &#8211; The hue encodes color information in angular dimension.<\/li>\n<li>SATURATION &#8211; Saturation encodes the intensity of color.<\/li>\n<li>VALUE &#8211; Value represents the brightness of the color.<\/li>\n<\/ul>\n<p>So let\u2019s detect the green object:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\"># Color range for detecting green color\r\n   lower_bound = np.array([50,100,100])\r\n   upper_bound = np.array([90,255,255])\r\n\r\n     # Convert the frame BGR to HSV color space\r\n   hsv = cv2.cvtColor(frame, cv2.COLOR_BGR2HSV)\r\n   \r\n   # Create a binary segmented mask of green color\r\n   mask = cv2.inRange(hsv, lower_bound, upper_bound)\r\n\r\n   # Add some dialation to increase segmented area\r\n   mask = cv2.dilate(mask, kernel, iterations=1)\r\n<\/pre>\n<ul>\n<li>cv2.cvtCOLOR() function converts the color-space of an image.<\/li>\n<li>cv2.inRange() function returns a binary segmented mask containing a white region where the color is detected and the rest of the region as black.<\/li>\n<li>Cv2.dilate() increases the area of the segmented white region.<\/li>\n<\/ul>\n<p><strong>Output:<\/strong><\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/07\/mask.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-83570\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/07\/mask.png\" alt=\"mask\" width=\"1920\" height=\"1078\" \/><\/a><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\"> # Find all the contours of the segmented mask\r\n    contours, h    = cv2.findContours(mask, cv2.RETR_TREE, \r\ncv2.CHAIN_APPROX_SIMPLE)\r\n<\/pre>\n<ul>\n<li>cv2.findContours() finds all the continuous points along the boundary having the same intensity or color. In our case, we are finding points along the segmented white region of the mask.<\/li>\n<\/ul>\n<p>Now, let\u2019s find the center of the detected object. The center point will be the reference point with which we\u2019ll be painting something on the canvas.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\"># Checking if any contour is detected then run the following statements\r\n    if len(contours) &gt; 0:\r\n        \r\n        # Get the biggest contour from all the detected contours\r\n        cmax = max(contours, key = cv2.contourArea)\r\n\r\n    else:\r\n        previous_center_point= 0\r\n<\/pre>\n<ul>\n<li>First, we check if any contour is detected or not.<\/li>\n<li>If any contour is detected then we pick a contour that has maximum area among all other contours in the list.<\/li>\n<li>Otherwise, we set previous_center_pointto 0. The previous_center_pointbasically stores the center point of a contour in a frame.<\/li>\n<\/ul>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\"># Find the area of the contour\r\n        area = cv2.contourArea(cmax)\r\n<\/pre>\n<ul>\n<li>After picking the biggest contour we get the area of the contour using cv2.contourArea() function.<\/li>\n<\/ul>\n<p>It may be possible that the main object is not present in the frame but some noises are detected. So to fix this we need to filter that as well.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">min_area = 1000\r\n          # Checking if the area of the contour is greater than a threshold\r\n        if area &gt; min_area:\r\n\r\n            # Find center point of the contour\r\n            M = cv2.moments(cmax)\r\n            cX = int(M[\"m10\"] \/ M[\"m00\"])\r\n            cY = int(M[\"m01\"] \/ M[\"m00\"])\r\n            \r\n            # Drawing a circle in the center of the contour area\r\n            cv2.circle(frame, (cX, cY), 10, (0, 0, 255), 2)\r\n<\/pre>\n<ul>\n<li>First, we check if the area of the contour is greater than the defined min_area.<\/li>\n<li>cv2.moments() function finds the center coordinate of the contour.<\/li>\n<li>Using cv2.circle we draw a circle in the center of the detected object.<\/li>\n<\/ul>\n<p><strong>Output:<\/strong><\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/07\/with-circle.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-83571\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/07\/with-circle.png\" alt=\"with-circle\" width=\"1920\" height=\"1078\" \/><\/a><\/p>\n<p>Now we\u2019ve successfully detected our pencil. So let\u2019s do the most exciting thing of the project.<\/p>\n<h4>Step 5 &#8211; Draw on the canvas:<\/h4>\n<p>To draw on the canvas first we\u2019ve to select a color for drawing.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\"># Selecting the color for drawing in the canvas\r\n            if previous_center_point== 0:\r\n                if cY &lt; 65:\r\n                    # Clear all\r\n                    if cX &gt; 20 and cX &lt; 120:\r\n                        canvas = np.zeros((height, width, 3), np.uint8)\r\n                    \r\n                    elif cX &gt; 140 and cX &lt; 220:\r\n                        color = colors[0]\r\n\r\n                    elif cX &gt; 240 and cX &lt; 320:\r\n                        color = colors[1]\r\n                    \r\n                    elif cX &gt; 340 and cX &lt; 420:\r\n                        color = colors[2]\r\n                    \r\n                    elif cX &gt; 440 and cX &lt; 520:\r\n                        color = colors[3]\r\n                    \r\n                    elif cX &gt; 540 and cX &lt; 620:\r\n                        color = colors[4]\r\n<\/pre>\n<ul>\n<li>First, we check if the previous_center_point is 0, which means nothing is detected in the previous frame.<\/li>\n<li>But in the current frame, if something is detected, we already know the coordinates of the color selection buttons. So we checked in which button the center point of the contour is detected first. And then set the color accordingly.<\/li>\n<li>The first button is for clearing the canvas, that\u2019s why if the center point is detected in the first button, then we reset the canvas to a blank canvas using np.zeros() function.<\/li>\n<\/ul>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\"># If drawing is started then draw a line between each frames detected contour \r\n#  center point\r\n            if previous_center_point!= 0:\r\n                cv2.line(canvas, previous_center_point, (cX, cY), color, 2)\r\n\r\n            # Update the center point\r\n            previous_center_point= (cX, cY)\r\n<\/pre>\n<ul>\n<li>Now we check if the previous_center_point is not 0, which means a contour is detected in the previous frame, then we draw a line between the previous_center_point and the current center point.<\/li>\n<li>After that, we update the previous_center_point to the current center point.<\/li>\n<\/ul>\n<p>But we want to show the drawings in the original frame. So let\u2019s see how we can do that also.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\"># Adding the canvas mask to the original frame\r\n            canvas_gray = cv2.cvtColor(canvas, cv2.COLOR_BGR2GRAY)\r\n\r\n            _, canvas_binary = cv2.threshold(canvas_gray, 20, 255,\r\n cv2.THRESH_BINARY_INV)\r\n\r\n            canvas_binary = cv2.cvtColor(canvas_binary, cv2.COLOR_GRAY2BGR)\r\n\r\n            frame = cv2.bitwise_and(frame, canvas_binary)\r\n            frame = cv2.bitwise_or(frame, canvas)\r\n<\/pre>\n<ul>\n<li>Using cv2.cvtCOLOR() function we convert the canvas to grayscale image.<\/li>\n<li>Then using cv2.threshold() we create a binary mask of the canvas.<\/li>\n<li>Then again we convert the binary mask to BGR color space. Because in order to add two images, the shape of the two images needs to be the same.<\/li>\n<li>cv2.bitwise_and() is true if both pixels are greater than zero.<\/li>\n<li>cv2.bitwise_or() is true if one of the pixels is greater than zero.<\/li>\n<\/ul>\n<h3>Air Canvas OpenCV Output<\/h3>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/07\/air-canvas-opencv-output.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-83567\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/07\/air-canvas-opencv-output.gif\" alt=\"air canvas opencv output\" width=\"735\" height=\"350\" \/><\/a><\/p>\n<h3>Summary:<\/h3>\n<p>In this project, we\u2019ve built an Air canvas using OpenCV &#8211; Python. We\u2019ve learned about color detection and segmentation techniques, thresholding techniques, some logical operations, and some other image processing techniques through this project.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We know that artists create paintings on a canvas. But what if we can paint on air just by waving our hands. So, in this project, we are going to build an air canvas&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":83564,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[210],"tags":[3820,3821,3822,3823],"class_list":["post-83073","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-machine-learning","tag-air-canvas-project","tag-air-canvas-python-opencv","tag-air-canvas-python-source-code","tag-python-air-canvas-project-code"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Create Air Canvas using Python Open CV - TechVidvan<\/title>\n<meta name=\"description\" content=\"Have you ever imagined what if we can paint on air just by waving our hands? Build an air canvas using OpenCV and Python.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/techvidvan.com\/tutorials\/create-air-canvas-using-opencv-python\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Create Air Canvas using Python Open CV - TechVidvan\" \/>\n<meta property=\"og:description\" content=\"Have you ever imagined what if we can paint on air just by waving our hands? Build an air canvas using OpenCV and Python.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/techvidvan.com\/tutorials\/create-air-canvas-using-opencv-python\/\" \/>\n<meta property=\"og:site_name\" content=\"TechVidvan\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/TechVidvan\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-07-21T05:15:33+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-06-03T09:33:11+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/07\/air-canvas-opencv-python-project.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=\"TechVidvan Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:site\" content=\"@vidvantech\" \/>\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":"Create Air Canvas using Python Open CV - TechVidvan","description":"Have you ever imagined what if we can paint on air just by waving our hands? Build an air canvas using OpenCV and Python.","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:\/\/techvidvan.com\/tutorials\/create-air-canvas-using-opencv-python\/","og_locale":"en_US","og_type":"article","og_title":"Create Air Canvas using Python Open CV - TechVidvan","og_description":"Have you ever imagined what if we can paint on air just by waving our hands? Build an air canvas using OpenCV and Python.","og_url":"https:\/\/techvidvan.com\/tutorials\/create-air-canvas-using-opencv-python\/","og_site_name":"TechVidvan","article_publisher":"https:\/\/www.facebook.com\/TechVidvan\/","article_published_time":"2021-07-21T05:15:33+00:00","article_modified_time":"2026-06-03T09:33:11+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/07\/air-canvas-opencv-python-project.jpg","type":"image\/jpeg"}],"author":"TechVidvan Team","twitter_card":"summary_large_image","twitter_creator":"@vidvantech","twitter_site":"@vidvantech","twitter_misc":{"Written by":"TechVidvan Team","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/techvidvan.com\/tutorials\/create-air-canvas-using-opencv-python\/#article","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/create-air-canvas-using-opencv-python\/"},"author":{"name":"TechVidvan Team","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22"},"headline":"Create Air Canvas using Python Open CV","datePublished":"2021-07-21T05:15:33+00:00","dateModified":"2026-06-03T09:33:11+00:00","mainEntityOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/create-air-canvas-using-opencv-python\/"},"wordCount":1088,"commentCount":0,"publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/create-air-canvas-using-opencv-python\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/07\/air-canvas-opencv-python-project.jpg","keywords":["Air Canvas Project","Air Canvas Python OpenCV","Air Canvas Python source code","Python Air Canvas Project Code"],"articleSection":["Machine Learning Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/techvidvan.com\/tutorials\/create-air-canvas-using-opencv-python\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/techvidvan.com\/tutorials\/create-air-canvas-using-opencv-python\/","url":"https:\/\/techvidvan.com\/tutorials\/create-air-canvas-using-opencv-python\/","name":"Create Air Canvas using Python Open CV - TechVidvan","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/create-air-canvas-using-opencv-python\/#primaryimage"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/create-air-canvas-using-opencv-python\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/07\/air-canvas-opencv-python-project.jpg","datePublished":"2021-07-21T05:15:33+00:00","dateModified":"2026-06-03T09:33:11+00:00","description":"Have you ever imagined what if we can paint on air just by waving our hands? Build an air canvas using OpenCV and Python.","breadcrumb":{"@id":"https:\/\/techvidvan.com\/tutorials\/create-air-canvas-using-opencv-python\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/techvidvan.com\/tutorials\/create-air-canvas-using-opencv-python\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/create-air-canvas-using-opencv-python\/#primaryimage","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/07\/air-canvas-opencv-python-project.jpg","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/07\/air-canvas-opencv-python-project.jpg","width":1200,"height":628,"caption":"air canvas opencv python project"},{"@type":"BreadcrumbList","@id":"https:\/\/techvidvan.com\/tutorials\/create-air-canvas-using-opencv-python\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/techvidvan.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"Create Air Canvas using Python Open CV"}]},{"@type":"WebSite","@id":"https:\/\/techvidvan.com\/tutorials\/#website","url":"https:\/\/techvidvan.com\/tutorials\/","name":"TechVidvan Blogs","description":"","publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/techvidvan.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/techvidvan.com\/tutorials\/#organization","name":"TechVidvan","url":"https:\/\/techvidvan.com\/tutorials\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","width":200,"height":50,"caption":"TechVidvan"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/TechVidvan\/","https:\/\/x.com\/vidvantech"]},{"@type":"Person","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22","name":"TechVidvan Team","description":"The TechVidvan Team delivers practical, beginner-friendly tutorials on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our experts are here to help you upskill and excel in today\u2019s tech industry."}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/83073","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/comments?post=83073"}],"version-history":[{"count":1,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/83073\/revisions"}],"predecessor-version":[{"id":448020,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/83073\/revisions\/448020"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media\/83564"}],"wp:attachment":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media?parent=83073"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/categories?post=83073"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/tags?post=83073"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}