From the course: OpenCV for Python Developers

Unlock the full course today

Join today to access over 24,400 courses taught by industry experts.

Challenge: Create a simple drawing app

Challenge: Create a simple drawing app

From the course: OpenCV for Python Developers

Challenge: Create a simple drawing app

(upbeat music) - [Instructor] As we complete chapter two, let's do a challenge to look at the skills we have learned. The goal is to create a simple drawing app. This app must be able to paint multiple circles onto a white canvas and it must be able to switch between two different colors. Under chapter two, module 10, you'll find some initial code to look at. Let's go through that briefly. In this file, you'll note there's a few things already added. At the very top, we have a global canvas already defined. This is where you should draw all of your circles onto. Note that is initialized to be 500 pixels by 500 pixels, and each pixel is set to be 255, meaning it will appear as a white image. Next, we have a click handler already defined, noting that it has a few if statements already set up relating to mouse events as well as it makes the canvas a global variable inside this click statement. Following this, we have our…

Contents