IKH

Getting Started with OpenCV -1

Before proceeding to the next segment, let’s get familiar with OpenCV and computer vision. It will help you to understand the video analysis covered by Anand in a much better way. However, to understand OpenCV and computer vision effectively, we’ll work on several small applications/projects.

The first project is building an optical character recognition (OCR). In OCR, we try to recognise the text written in the image. Here, we will be using Tesseract: an open source library for OCR. OpenCV is used here to preprocess the image before passing the image to the OCR library. Let’s get started in the following video.

You can download the notebook and the instructions to install OCR here: So, you saw that the basic difference between an image processing library like OpenCV and deep learning lies in the kernel used. In the image processing library, we specify a particular kernel to do a particular task such as edge detection. In deep learning, however, we just initialisation techniques such as Xavier) and it learns through backpropagation for the given application. Let’s see how to perform the convolution operation in OpenCV.

Canny is a popular function in OpenCV for edge detection. There are many advanced functions and you will go through some of those in this session. However, covering all of them is out-of-scope of this session.

Now, you will go through the application of OCR.

Tesseract is an excellent open source library. It performs exceptionally well on images that have clearly visible text. But, if the image itself is not that clear, the OCR can fail miserably. This is where OpenCV and computer vision practices come into the picture. The objective here is to sharpen the boundaries of the characters present in the image so that OCR can recognise them with less effort. This will improve the result of OCR. In the next segment, you will go through some preprocessing steps using OpenCV that’ll help you to do a better job at recognising text in an image.

Report an error