A Review of the Document Scanner

Review the steps of creating a document scanner.

Let’s look at the correct code for creating the document scanner.

First, we set the size of our document after scanning.

frameWidth = 480
frameHeight = 640

Image Processing

We change the image to grayscale and then make it blurry. This helps us get the edges properly. To get the edges, we use the cv2.canny() function of the OpenCV library:

Get hands-on with 1200+ tech skills courses.