Skip to main content

Posts

Showing posts from May, 2018

How to make a simple Optical Character Recognition in 12 lines of code.

Just to motivate you! Optical character recognition is the recognition of typed, handwritten or printed text and converting them into text. OCR can be used to automate various task involving humans, like in banking, OCR is being used to process checks without human involvement, generating content of documents from their scanned images, it can also be helpful for visually impaired people, etc. For this OCR we'll be using Microsoft's Computer Vision API. We'll do a post request for making an API call in python. and in response, we'll get output in JSON format. To get started you are required to have a Microsoft account, and after that, you can get a free subscription to computer vision API for 30 days. You have to acquire your secret subscription key which looks similar to this 98f714r6vb2e193018b28fg1u9b3b0d7e7. #Defining base url for API call. base_url = "https://westcentralus.api.cognitive.microsoft.com/vision/v1.0/" ocr_url = base_url