Thank you Mukesh for uploading this video. It will really help the automation test engineers to automate CAPTCHA in their respective applications under test.
sir either if i am adding .png or .jpeg format file it is giving the same error which is coming in case of .jpg 11:31:27.199 [main] ERROR net.sourceforge.tess4j.Tesseract - null java.lang.NullPointerException: null
Thanks for sharing the video. I am curious that if we can read images in different language and extract the text from the images. For that we have to download the training data of that language and copy it in tessdata folder of our project? If yes, then we have to remove the english trained data or we can have multiple trained data in the tessdata folder?
Hi Mukesh Thanks you very much for sharing. I try your tutorial it works. But sometime it fail to convert the image for example, "IZZ2" it converts as "1772". I used eng.traineddata. Do you have any idea? Which traineddata file should i use instead? The image text is english number and alphabet only.
Hi Mukesh, I am getting the following error. Error opening data file ./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!
Same Problem for me also. I set enviroment variable. i still see same problem. Also after copy pasting eng.traineddata file fo tessdata folder, i still see that file name in red. not sure why
Hey Hi Mukesh Otwani , Thank you so much for your informative video :-) But when i'm writing the code, ITesseract image=new Tesseract(); Following line is throwing an error saying "The constructor Tesseract() is not visible". Could you please help me to solve above error. Thank You :-)
Error opening data file ./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! Exception in thread "main" java.lang.Error: Invalid memory access I am getting following error after running the code ,i have downloaded the eng.traineddata file and kept it under the testdata folder as suggested. Could you please help.
@@Mukeshotwani hi Mukesh I have emailed the project screenshot and I have also send the project workspace ..could you please help me with the resolution..if it's path mistake .. could you please guide on how to set correct path ..
This is not working as expected. i tried the same configuration with IRCTC site. OCR is not reading captcha properly. i tired many times and all the times i got a different word than the expected one.
Hi Sir, Thank you very much for your very informative video. Could you please let me know that is there any way like Tessaract, in C# to read Captcha and images ?? Hopeful for your reply ! Regards, Amit
Getting below error @mukesh Otwani , how to solve: Error opening data file ./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! Warning: Invalid resolution 0 dpi. Using 70 instead.
Hi Mukesh , Thank for sharing valuable video.Is there any videos or references to read images like business card (like PAN card,Aadhaar card).Please help me on this Mukesh.
Hi mukesh, iam facing this error Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/jna/Pointer at imgTotext.ImageToText.main(ImageToText.java:13) Caused by: java.lang.ClassNotFoundException: com.sun.jna.Pointer at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source) at java.base/java.lang.ClassLoader.loadClass(Unknown Source) ... 1 more could u pls help me ?
@@Mukeshotwani maybe there is something that I miss... when I download the file..... there is no POM.XML in the directory of the tessdata. did you made it perhaps sir?
Hi Mukesh, I am getting below error. Error opening data file ./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!
Thank you Mukesh for uploading this video. It will really help the automation test engineers to automate CAPTCHA in their respective applications under test.
Very informative sir, just got with same scenario and finally found solution after seeing this videos.
Thank You Sir!
Awesome Bhai !! you made it look so easy .. Keep Sharing !!
Thanks Yash
It just changed the perspective of automation, very good and Useful API you covered 👍😊
sir either if i am adding .png or .jpeg format file it is giving the same error which is coming in case of .jpg
11:31:27.199 [main] ERROR net.sourceforge.tess4j.Tesseract - null
java.lang.NullPointerException: null
I'm also facing same issue , if you solved ,could you please help me ?
Hi Sanjit, is this issue resolved? Did u try with different version of tess4j
Thanks for sharing the video. I am curious that if we can read images in different language and extract the text from the images. For that we have to download the training data of that language and copy it in tessdata folder of our project? If yes, then we have to remove the english trained data or we can have multiple trained data in the tessdata folder?
Hi bro,In Eclipse which package you used?
Hi Bro I used 4.7 eclipse java developer
@@Mukeshotwani is working with ellipse java oxygen R Win ?
Hi Mukesh
Thanks you very much for sharing. I try your tutorial it works. But sometime it fail to convert the image for example, "IZZ2" it converts as "1772". I used eng.traineddata. Do you have any idea? Which traineddata file should i use instead? The image text is english number and alphabet only.
Hi
Hi Mukesh, I am getting the following error.
Error opening data file ./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!
Same Problem for me also. I set enviroment variable. i still see same problem. Also after copy pasting eng.traineddata file fo tessdata folder, i still see that file name in red. not sure why
Hi Mukesh,
Is it possible to read checkboxes data from pdf file using Tesseract (using java implementation)
Hi Parvathi, you can do that
Hi Mukesh, irrespective of image type(jpg or jpeg or png), am getting null pointer exception
I am having the same error
Hey Hi Mukesh Otwani ,
Thank you so much for your informative video :-)
But when i'm writing the code,
ITesseract image=new Tesseract(); Following line is throwing an error saying "The constructor Tesseract() is not visible".
Could you please help me to solve above error.
Thank You :-)
Is this fixed Yogita?
@@Mukeshotwani No sir.
Very good explanation and a nice demo
These all are stored image from local. how to capture the images on runtime. And insert into code???
Posted new video on same
@@Mukeshotwani Mukesh otwani thank you so much.
Error opening data file ./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!
Exception in thread "main" java.lang.Error: Invalid memory access
I am getting following error after running the code ,i have downloaded the eng.traineddata file and kept it under the testdata folder as suggested. Could you please help.
Hi Jitendra can u send me project screenshot ? Or export project and send me.
mukeshotwani.50@gmail.com
This is just trained data path issue only
@@Mukeshotwani hi Mukesh I have emailed the project screenshot and I have also send the project workspace ..could you please help me with the resolution..if it's path mistake .. could you please guide on how to set correct path ..
Its path issue I am happy that you solved it
How you solved this one ?
Hi Mukesh,
it is not working in CMD using JAR
Please share your thoughts
Please share your details about this with screenshot.
What if we split against the ":"
That would be more efficient right?
Yes Satwik that will also work
Hi Mukesh,
How to setup the project explorer tab ? can you share me the video link that will very helpful.
Hi Mate, you can use perspective to change the perspective or you can use views from top menu and you can customize the eclipse
Please help me, I am getting error: java.lang.Error: Invalid memory access
Increase JVM Memory
Hi Mukesh, Can u expain what is the use of traineddata file? thanks in advance.
Hi Karthikeyan if you see next video, I have explained how we used Tesseract to read captcha code.
Thanks Mukesh, Really usefull for all selenium guys. Why last 2 lines are not showing in output and whats that ST YT. Thanks
Hi Ashwajit, regular express was causing the issue so we written another reg ex then it started showing the correct output.
Mukesh otwani ThankYou
This is not working as expected. i tried the same configuration with IRCTC site. OCR is not reading captcha properly. i tired many times and all the times i got a different word than the expected one.
Hi Eswar, May be some changes from IRCTC side, try to read some images using the same.
Normal images with clear text is working fine.. but IRCTC captcha is having stricked lined over the text so it is not able to read it properly
yes it works fine with normal images
Good video useful for Automation
Thanks Buddy
i am getting an error
ava.lang.UnsatisfiedLinkError: Unable to load library 'tesseract'
Mukesh , can you please prepare video in Regular Expression ?
yes Abhishek will try. Good to see your comment after long time.
How can we read data from pdf from database or cloud by using spring framework
Not tried spring framework
Hi Mukesh,can u create another video how to setup tess4j src file in maven project
Hi Sir,
Thank you very much for your very informative video.
Could you please let me know that is there any way like Tessaract, in C# to read Captcha and images ??
Hopeful for your reply !
Regards,
Amit
Getting below error @mukesh Otwani , how to solve:
Error opening data file ./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!
Warning: Invalid resolution 0 dpi. Using 70 instead.
you need to set path
Mukesh otwani how do I set path in Mac can u please let know in detail for Mac thanks
Can u help how to set trained data in project
Hi Mukesh ,
Thank for sharing valuable video.Is there any videos or references to read images like business card (like PAN card,Aadhaar card).Please help me on this Mukesh.
Hi, I also have the same query of reading ID cards. Any solution can be helpful. Thanks In Advance
Hi It reads images if background is clear and no strikes.
Can we read PAN CARD using above code?
Not working. I am getting tesseract path issue with eng file
How to validate any video using selenium & java
Hi mukesh,
iam facing this error
Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/jna/Pointer
at imgTotext.ImageToText.main(ImageToText.java:13)
Caused by: java.lang.ClassNotFoundException: com.sun.jna.Pointer
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
... 1 more
could u pls help me ?
I have the same issue. Were you ever able to resolve it?
@@joshuaaguilera6666 change tass4j dependency version and try
I am also facing same error
Sir How to pass image in browser instead of capturing from webcam
is i am not a robot can be automated ?
No Shiva I dont think so
the tessdata folder had already a pom.xml and path.... how?
Sorry Ronald can you tell me what issue you are getting here?
@@Mukeshotwani maybe there is something that I miss... when I download the file..... there is no POM.XML in the directory of the tessdata. did you made it perhaps sir?
Hi Mate you pom.xml is from maven. when you create maven project you will get pom.xml file too.
@@Mukeshotwani thanks mate. Total noob question but is it in Eclipse>File>New>Java project/project?
please teach tutorial how to ocr in lightroom with free api ,i want to search my friend race number marathon (BIB number) ive been photograph
Nice
u gave filename as .jpg instead of .jpeg
XML file please show sir again
Its there already you can pause the video or watch it again.
@@Mukeshotwani i really can't find pom.xml. where or how do you make it?
I am getting unsatisfied linkerror
Please suggest
Hi Saurabh,Are you using Java 8 if not then try with Java 8 and if you still facing such issue then send me all config details along with screenshots.
Everyone getting the error 😭
Thank You sir it worked fine in eclipse but in intellij it giving error -SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
Hi Mukesh, I am getting below error.
Error opening data file ./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!
same for me too. Is there any solution available.
@@sankarginjupalli2380 save your file ./eng.traineddata
at project level also.