The OpenCV library is one of the Assembly’s favourite toolkits, with its easy-to-use processing capabilities for real-time computer vision. Working seamlessly with Python, the open-source library has been very useful for processing live video capture on the fly with little overhead, delivering impressive results with minimal code.
In this session, we’ll use OpenCV via Python to code our own air canvas, allowing you to doodle in thin air using hand gestures captured by the camera with results transferred to the screen directly and in real-time. Our 4-color palette will be represented by each of the fingers (our virtual ‘crayons’), with the fifth used as an eraser.
Prerequisites:
Python (latest release) — We’ll use the pre-bundled Python IDLE as our environment for this session.
Make an Air Canvas with OpenCV
The OpenCV library is one of the Assembly’s favourite toolkits, with its easy-to-use processing capabilities for real-time computer vision. Working seamlessly with Python, the open-source library has been very useful for processing live video capture on the fly with little overhead, delivering impressive results with minimal code.
In this session, we’ll use OpenCV via Python to code our own air canvas, allowing you to doodle in thin air using hand gestures captured by the camera with results transferred to the screen directly and in real-time. Our 4-color palette will be represented by each of the fingers (our virtual ‘crayons’), with the fifth used as an eraser.
Prerequisites:
Python (latest release) — We’ll use the pre-bundled Python IDLE as our environment for this session.
OpenCV — Install using pip