How to Preprocess Images for Text OCR in Python (OCR in Python Tutorials 02.02)

preview_player
Показать описание
If you enjoy this video, please subscribe.

How to Open an Image with OpenCV: 4:10
01. Invert an Image: 9:47
03: Binarization: 13:33
04: Noise Reduction: 20:40
05: Dilation and Erosion: 28:33
06: Rotation and Deskewing: 35:07
07: Removing Borders: 42:18
08: Missing Borders: 49:09

If there's a specific video you would like to see or a tutorial series, let me know in the comments and I will try and make it.

You can follow me at:
Рекомендации по теме
Комментарии
Автор

Doing all the steps finally got me to 98% accuracy. Thanks so much!

Superdooperhero
Автор

i can't believe i found this amazing channel !!! I've been working on an OCR mobile app to extract fields from scanned invoices and these videos are exactly what I m looking for million thanks man !!!

sabririhab
Автор

What a legend only one ad in the beginning . Your so damn underrated

marcerum
Автор

Hey thank you so much! The video is about an hour long, so I’m really happy that your voice is so pleasant and happy to listen to! This video helped me a lot on my project.

ds
Автор

This is awesome ! Really helpful for my dissertation research about OCR in the accountability field. Many thanks from Paris !

jadenizard
Автор

Hi!, First thank for the tutorial. In my case I had a problem while correcting the rotated image with the function. In the link it gives you a really cool solution, if anyone had the problem just comment the line of the angle and put this lines instead and it will work perfectly.

middleContour = contours[len(contours) // 2]
angle =


As I said it comes in the link given but this is in the case you're in a rush.

Thanks for the channel and the videos for real. I would have liked to have teachers like you while I was studying!!!!

zvynlyb
Автор

Inverting took me from garbage to great recognition. Thanks!

Superdooperhero
Автор

Thank you so much. I just upgraded from Making Waves, so the concepts are familiar, but tNice tutorials is a whole new world! Look forward to

sriyaniliyanage
Автор

Amazing, I am going to recommend to my colleagues. Great work.

balkiprasanna
Автор

from numpy import ones, uint8
kernel = ones((1, 1), uint8)
is a lot faster than importing the entire numpy module

Superdooperhero
Автор

I appreciate your step-by-step explanations

saifabusrour
Автор

Hey, any idea why I got "ValueError: not enough values to unpack (expected 3, got 2)" at 15:43. I'm using Python3.8.2 and open-cv 4.5.1.

Also, please check patron messages.
Thanks!

theorager
Автор

Great thanks from Uganda the pearl of Africa

musinguzibenard
Автор

Men you are an amazing teacher! I love the way you explain things! thank you BTW!

FernandoFischer
Автор

found actually helpful for people started from scratch

sinantk
Автор

I'm unable to acces the notebook. Can you please share the notebook.

prasannaimmaneni
Автор

Good video. not completely relevant for my case as i dont know what the image will look like, but still usefull!

tieman
Автор

For anyonne getting a error message when importing pylot. heres a few solutions:

1. Instalation problem. error in python-slugify setup command: use_2to3 - solution: update your setup tools in the terminal with the comand "setuptools==58". Then try "pip install pylot"

2. Error in import - solution: change comand to "import matplotlib.pyplot as plt"

mat
Автор

Thanks for the video. I was having issues with the "getSkewAngle" function.
I found an easy workaround though.

I changed the last line

"return -1.0 * angle"

to just

"return angle"

Hope this helps anyone else with this problem.

JasonVerro
Автор

Are the functions you built only suitable for this specific document? Or will they be able to handle new input documents?

xewwpyu