Это видео недоступно.
Сожалеем об этом.
Text Detection with OpenCV in Python | OCR using Tesseract (2020)
HTML-код
- Опубликовано: 17 авг 2024
- In this video, we are going to learn how to detect text in images. We will learn how to detect individual characters and words and how to place bounding boxes around them. We will also look at how to detect only digits.
🚀🚀 My Urdu/Hindi AI RUclips Channel 🚀🚀
/ @murtazahassan01
Premium Courses:
✔️ Computer Vision Game Development Course:
bit.ly/3ttLZ2s
✔️ Computer Vision with Arduino Course:
bit.ly/3wzLB4m
✔️ Advanced Drone Programming Course:
bit.ly/3qs3v5g
✔️ Learn to Build Computer Vision Mobile Apps:
bit.ly/3uioY1J
✔️ Jetson Nano Premium Course:
bit.ly/3L8uIlF
⚙️⚙️⚙️--My Gear - ⚙️⚙️⚙️
👉 Complete Gear 💈: www.computervi...
👉 My PC Specs 🖥️: www.computervi...
👉 My Video Shooting Gear📽️ : www.computervi...
👉 My Laptops 💻: www.computervi...
👉 Educational Products🧑🎓: www.computervi...
👉 RUclips Starter Kit 🔴: www.computervi...
Follow Me:
TikTok: bit.ly/3Vo76OQ
Facebook Group: bit.ly/3irDcb7
Discord: bit.ly/3JvyxAM
Facebook Page: bit.ly/3IvpU7W
Instagram : bit.ly/3NdGME3
Website: bit.ly/3ICFTS0
Github: bit.ly/3woU6PS
#ComputerVision
#OpenCV
#CVZone
For windows , Instead of down manually downloading and installing just do : pip install tesseract
thx bro
tx man
Tnx
How can we know if that's official?
Nah bro thats not official
By chance I entered last 5 years before in programming languages. You will note my background is
Accounting. For now it is sufficient that I am 75 years old man but I am learning Django, Ai,
Machine Learning and etc., Last five years I asked my instructor of Java (Note= At that time, I did not
know A,B, C of any programming but I know a sufficient knowledge about Programming - I am a lot
thankful of Respectable Great Zia Khan) that I can check cross medical bill of the any person, but he could not replay. I am very happy of this watching Video, I can solve this last 5 years dream can be solved
by python with AI Insha-Allah. Now I am trying to launch my E - Commerce Website very soon with Python,
I shall contact very soon with you for a big project Insha-Allah. Ishtiaq Ahmed Siddiqui KARACHI
Your tutorials are awesome. I already shared your channel with my students. I visited so many channels for learning opencv and out of that your videos stands out.
I am glad i could be of help. and thanx for sharing
Awesome video. I was looking for technology that could read image captcha and extract text in the backend. Then submit text to the server without users requiring to type the captcha and your video solved my issue.
amazing, would you share your code as an example?!
@@choogiesaur did you figure it out?
Hello, sorry I can't donwload the tesseract version you are using the page says "currently there is no official windows installer for newer versions
23:13 " I have no idea why they did this" made me chuckle.
Windows binaries download is not available in tesseract documentation
For macUser :
first write at terminal - which tesseract
then copy that path and paste it in tesseract cmd path
pytesseract.pytesseract.tesseract_cmd = ‘path '
Hi murtaza! A question: If i only want to retrieve specific text from the image, how can i do it? i'm already have the coordinates of the text that i want to get
take screen shot useing those cords, and send it via internet, tho, you need to know whee you store the images, hope this helped (srry for the bad spelling, I type fast)
How do you guys fix the path problem? Everything looks fine ,until I run it. It just gives me an error
used this with a webcam to take an image and parse text from (like a piece of paper or menu on a phone), then you can take the .png snapped by the webcam and analyze with image_to_string(), takes about half a second to read text presented and the webcam's settings has to be on point with brightness and all that stuff
so we cannot use this one as a real time word detection metod? How many frames did you get when you use with your webcam? i just want to use it for real time detection ,if you answer to me. Thx a lot
Pp
The Binaries for Windows ( 1:06) has not this selection to download,
so i cannot find how to download the file for Windows.
Can you help me pls?
hi Murtaza I have question:
I want to convert to pdf(with ocr text) only few page from multipage tif image - is it possible without any other conversion ?
multipage tif - 70 pages - but I want to convert to readable pdf pages from 10 to 20?
best regards
:)
It doesn't work on text in larger and smaller font size. Can you help me how I can use extract those text from image.
Can you please help me, i have an error if i try to run the test file.
"Exception has occurred: AttributeError
'Sequential' object has no attribute 'predict_classes'
File "C:\Digits-Classification-master\OCR_CNN_Test.py", line 36, in
classIndex = int(model.predict_classes(img))"
Good video. From 20:20 onwards you are using the variable 'x' for both the loop count and the x-dimension of the bounding box. You got lucky that it didn't impact the results of the code.
I get following error. --- pytesseract.pytesseract.TesseractError: (1, 'Error opening data file C:\\Program Files\\Tessaract-OCR/eng.traineddata Please make sure the TESSDATA_PREFIX environment variable is set to your "tessdata" directory ----
Where do I set this?
There is no change when i add the config, it is still detecting text too. Can anyone pls tell why is it so?
Sir in today the tesdoc is changed not able to download plz help
when running the program like you at 4:24 I get the following error:
Traceback (most recent call last):
File "C:\Python\Python385\lib\site-packages\pytesseract\pytesseract.py", line 21, in
from PIL import Image
File "C:\Python\Python385\lib\site-packages\PIL\Image.py", line 94, in
from . import _imaging as core
ImportError: cannot import name '_imaging' from 'PIL' (C:\Python\Python385\lib\site-packages\PIL\__init__.py)
you have imported the path incorrectly inssted of .py use .exe
Hi Murtaza, I indeed learnt something new! It's amazing! I really appreciate your time and effort and sharing :) !
thanks so much, Dear Murtaza...could you do a tutorial for detecting the shape feature and make the dimensions of the shape of the workpiece appear once the camera start to detect.
Hello, it says here that
cv2.rectangle(img,(x,hImg-y),(w,hImg-h),(0,0,255),1)
TypeError: unsupported operand type(s) for -: 'tuple' and 'int'
I am new to python and I dont know how to fix it
Hello
I am getting such an error.
Invalid tesseract version: "tesseract 3.02
leptonica-1.68 (Mar 14 2011, 10:43:03) [MSC v.1500 LIB Release 32 bit]
libgif 4.1.6 : libjpeg 8c : libpng 1.4.3 : libtiff 3.9.4 : zlib 1.2.5
how do i solve ?
Where can i download 1.png??
Hi Murtaza,
Your videos are awesome and very detailed and easy to understand each and every part.
Can you please make a tutorial on Semantic Segmentation with Keras and tensorflow?
i will look into it
Is it possible to get the whole bounding box of a word by combining boxes from every character?
Thanks for the tutorial! It was very helpful for me getting a handle on OCR and Opencv for a redaction project I was working on. Now looking at fictionalizing text in an image. Ideally would like to replace words, like for an address, with different ones using the same font and size for the text. Not finding any solid examples of this that work. Would love to hear your take on how that might be accomplished.
You could do it with opencv python but it you want an end product you might want to look at unity.
@@murtazasworkshop - Hi. Worked on it a bit and watched more of your videos but still stuck. Posted on stackoverflow and so far no responses that might work. If you have the time would like to know your high level ideas on resolution. Thanks! stackoverflow.com/questions/64541909/how-to-fictionalize-text-data-like-an-address-within-a-document-image
How can I install it in ubuntu20.04 ...i tried a lot of other commands but it doesn't seem to work
i have an error please help
hImg, wImg = img.shape
ValueError: too many values to unpack (expected 2)
i think the way to access the width and height has changed. I used imgShape instead and select the height by typing imgShape[0]
Thank you very much for this video. Can you also make some video on Deep learning self driving car using raspberry pi and jeston nano
I have already started the raspberry pi series . once the basics are covered we will move to more advance topics like selfdriving, ML, DL
@@murtazasworkshop
yea..I already got them
waiting for you..
Thank you
at 23.28 you adjusted the box and yours is working fine but when i did the same the boxes are formed in transpose manner, like the height of box = length of word and viceversa
Help me out please
This tutorial is short and sweet. I like it. Currently, i'm having problem in detecting digits only. Instead of detecting digits only, it detects everything. i follow this
cong: r'--oem 3 --psm 6 outputbase digits'
pycharm community 2020
python-3.8.2
make sure you are using the configurations in the main function. If the problem persists send me a screenshot to my fb page.
Great video sir, I just have a small doubt. How can we detect text in live video stream using the webcam ?
@Dharmendra Kumar Singh How much to deploy this app with camera detect?
same question
Wow very good, but the problem is "If the text is very clear and crisp its is showing output correctly", But I want to know if the image has multiple data not only text for example "bills, taken calendar photo or any kind of images", How to print the string from that, I tried my self it's not printing anything, Any idea for this?
If tesseract has to refer to the exe in your computer, how do you export an application in another computer that doesnt have it?
Thanks Doctor Murtaza! This lesson is a class act!
how do i get image into file show on left side. cant get it. thanks
At 9:27 the w and h are the diagonal points means? Which diagonal point? Bottom or up?
Hi Murtaza, you see your loop to DISPLAY SOME SAMPLES IMAGES OF ALL THE CLASSES, if the folder names were categorical/strings instead of numerical, i.e. (sign1, sign2, sign3...etc instead of 0,1,2,3..etc) how would you iterate through these folders? would you still use iterrows? Thank you
Nice video, btw could you give me suggestion when it comes to recognize handwritten digit and then manipulate the data?? should I use OpenCV & tesseract?? or tensorflow & keras? I am still not sure about this, since im new for this application. Thank You !
So what did you use? I'm having this problem aswell.
Does this library work with 7 segment-display digit numbers in images ??
Hey, thank you for the lesson but do you have it for linux because I want to use Raspberry pi 3 for similar project?
Great job! I was learn something new, thanks a lot.
I want to use clipboard image for text read in Ubuntu Linux. Can you tell me how to do. Windows has other option of using pillow library, but that does not work in Linux.
Thanks for your tutorial, I want to capture an email from an image but Tesseract does not recognize the @ symbol, how can I solve it?
hello all, if anyone can answer. do we have to install opencv and pytesseract in pycharm when we have already installed using pip?
The downloads page for tesseract is not as it is in your video.
can we use it for other languages? Like indic languages for example hindi.
how can write a code that allows the user to select an area on the screen with the mouse, and the software recognizes the text in this area
Can i use this if i need to read a code from cells tru a camera? and then sort them by codes. is that possible?
i followed everything but i have the error pytesseract.pytesseract.TesseractError: (1, 'Error opening data file C:\\Program Files (x86)\\Tesseract-OCR\\eng.traineddata Please make sure the TESSDATA_PREFIX environment variable is set to your "tessdata" directory. Failed loading language \'eng\' Tesseract couldn\'t load any languages! Could not
initialize tesseract.')
Hay I can't able to fine window installer , please give me a link
hey..! Did you find that?
Hi Bro
Am trying to read cursive written gif image.. pytesseract is not able read correctly please help me resolve this
wonderful.
I comment before watching.
Keep creating more wonderful tutor videos
Many thanks
can you tell me how to do like this with python:
detect an image on an application and if the image is not there search for the image again
and if it's there then do something.
wow....mighty helpful.. Thank you Murtaza
Thanks a lot.
The `image_to_boxes()` returns `x1, height1, x2, height2`.
if you renamed them like this it would be much more clear.
Hi Murtaza,
Your videos are excellent. I need to ask where is 1.png since on your website I can't find it in the projects section.
Thank you so much for everything!
sir i want to extract only the specific word or phrase, how do i do that? do i need some nlp?
well how to print the red text we got from image ?
Like what do I set the pytesseract.pytesseract.......
That line of code to
When I am working in ubuntu 20.04
I just installed the tesseract api using
apt-get install pytesseract
But it doesn't read text from images it just returns rubbish
Please help
do you thimk there is a methode to detect text n rotated images?
Do you have solutions for alpha numeric recognition I have tried all the method finally I’m getting fail tesseract easy ocr etc for example ABC00OO1 and SI1234H
Can it be recognized handwritten words or numbers?
Can we use visual studio code, instead of pycharm?
hello thanks you for your tutorial, i have a question, i try to make bounding box around sentence who have same b['top'] coordinate, i managed to make the separation to the word and the bounding box that correspond to it but i can't entend it to the sentence or to the same line of text, someone can help me ?
Thanks for this workshop. Could you also post a video on how to detect tables(ruled as well as not ruled) in document images or segregate tables, text, charts and figures. Tx.
Thanks. i will look into it
This was sick!! Thanks, It was so easy to follow :)
I'm not entirely sure where I went wrong but following your steps to detect only digits it instead reads everything EXCEPT digits. Anyone know how to solve this?
while I run, it doesnt give any output of my png file. can you describe it please
it is the android studio you are using for coding right??? and how to use python in android studio????
videos really helpful for me ,but if we apply this dull image or text are present in bottom that won't detected
Hi dude when i print the image with cv2.imshow() instead of the image it shows all black... any idea?
Are u using a delay with the waitkey after imshow?
Are u using a delay with the waitkey after imshow?
Please help!! I tried many solution on google still the same error!
pytesseract.pytesseract.TesseractError: (1, 'Error opening data file \\Program Files (x86)\\Tesseract-OCR\\eng.traineddata Please make sure the TESSDATA_PREFIX environment variable is set to your "tessdata" directory. Failed loading la
nguage \'eng\' Tesseract couldn\'t load any languages! Could not initialize tesseract.')
how can I fix this?
Keep making video like this and we keep learning
Hi! thanks for the video. What do you think of tesseract version 5.0.0. Which one do you suggest to download? Version 4 or 5? thank you
Plz expalian when there are both char and digits like 19131a0400 how to extract it
Excellent explanation, Thanks Murtaza
Hi, how can we extract each character and digit from the license plate?
Dear Sir, I am your Subscriber
I want to create a tool that finds text errors in the image.
For Example:
if I forgot to write CONTACT US, BUY NOW, CONTACT NUMBER, SPELLING MISTAKE, etc... in my social media post.
that the tool finds error and suggests what are missing or what is incorrect in social media post.
🙏 Please guide me and suggest what course I need to buy or what I need to learn to create this tool
Thank you!
hello i have a problem, (hImg and wImg part gives me an error for two many to unpack (expected 2)
so when i try to solve it, it gives me an error where i use "hImg - h, hImg - y" that says " usoperted operand for type tuple and int"
someone please help me solve it
Can someone help me with the path for macOS. PLEASE. @4.14.
I've brew installed tesseract, but what to write in the file path as macOS don't have .exe files.
PLEASE HELP !
Okay, found the sol 😅, do-> brew list tesseract, it will give you the locations.
Thank you, just what I needed.
how can we detect handwritten digits using OpenCV?. for example a doctors prescription. Please do help
that's so preety cool i maen tips with ctrl + left click, is so helpfull for me just learning python, thank you !
btw i'm already subscribe you 👍
Amazing TUtorial man, thanks a lot
This is an amazing video and effort. Thanks a lot !
Awesome video as usual! But I have a simple question, how do I comment and uncomment a code section?
Love the video... I've try to make a project on wich I try to send a text to a monitor, more like a power point presentation or a teleprompter app... Do you have any suggestions...or can you make a video about something like that?
Hello, I would like to say thanks very much for this channel your videos have been very helpful while learning OpenCV and python.
I'm having a problem while executing this code and I would like you to help me fix this "cv2.rectangle( img(x, y), (x+w, y+h), (0, 0, 255), 1)
TypeError: 'numpy.ndarray' object is not callable."
What do you suggest I do to handle it? Thanks in advance.
Thank you so much, its very helpful for me.
Could you please make a tutorial about train model to detect text in identity image ?
I have one tutorial on classifying digits. you might want to have a look at that.
NEED HELP! I am making a website where user can upload a pdf but I want that pdf to upload only if that pdf has images of only HANDWRITTEN text. Thank you for reading.
Its doable. you can email our team to learn more at hire@computervision.zone
how to integrate my code with website i am making an AI proctor system please help
Hello brother, first of all a great job with it. I need some help with text detection from a image. Actually i have to extract the headlines from a article present in a image form. But whenever a special character appears the data after it dosen't appear in a array. Can you help me?It would be great
Awesome videos....Any plan for video on Deep Learning Chat bot in near future?
Can you use this with image grab?
Is it possible with CNN instead of OCR?
Hi, it's amazing but is there any train part? 1. detecting the text edges, 2. img to text training
i have noisy images so what can be done??