How To Read Images in Java Using OCR- Tesseract

Поделиться
HTML-код
  • Опубликовано: 5 янв 2025

Комментарии •

  • @Dinesh_rajamanickam
    @Dinesh_rajamanickam 2 дня назад +1

    Issue:
    I faced this Error :- opening data file ./eng.traineddata
    Please make sure the TESSDATA_PREFIX environment variable is set to your "tessdata" directory.
    solution :
    Paste the "eng.traineddata" directly in project, not inside tessdata folder. This solved my problem. I just right clicked on my project and pasted the file there. It worked.

    • @Mukeshotwani
      @Mukeshotwani  День назад

      Thank you Dinesh, for sharing your solution, it's helpful for others facing the same issue!

  • @rajendramahapatra3293
    @rajendramahapatra3293 5 лет назад

    Thank you Mukesh for uploading this video. It will really help the automation test engineers to automate CAPTCHA in their respective applications under test.

  • @chandankumarmalhotra1127
    @chandankumarmalhotra1127 4 года назад

    Very informative sir, just got with same scenario and finally found solution after seeing this videos.
    Thank You Sir!

  • @SarangHoley
    @SarangHoley 5 лет назад

    It just changed the perspective of automation, very good and Useful API you covered 👍😊

  • @yashsaxena47
    @yashsaxena47 5 лет назад +1

    Awesome Bhai !! you made it look so easy .. Keep Sharing !!

  • @sanjitpal8558
    @sanjitpal8558 5 лет назад +1

    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

    • @swatijamodkar3084
      @swatijamodkar3084 3 года назад +1

      I'm also facing same issue , if you solved ,could you please help me ?

    • @rafeequlislam3832
      @rafeequlislam3832 3 года назад

      Hi Sanjit, is this issue resolved? Did u try with different version of tess4j

  • @iburahim786
    @iburahim786 5 лет назад +2

    These all are stored image from local. how to capture the images on runtime. And insert into code???

    • @Mukeshotwani
      @Mukeshotwani  5 лет назад +1

      Posted new video on same

    • @iburahim786
      @iburahim786 5 лет назад

      @@Mukeshotwani Mukesh otwani thank you so much.

  • @sankarginjupalli2380
    @sankarginjupalli2380 5 лет назад +1

    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!

    • @harinat
      @harinat 5 лет назад

      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

  • @mohammadyusuph9532
    @mohammadyusuph9532 Месяц назад +1

    Please help me, I am getting error: java.lang.Error: Invalid memory access

  • @annasonita1186
    @annasonita1186 3 года назад +1

    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.

  • @rajatshandilya1203
    @rajatshandilya1203 4 года назад

    i am getting an error
    ava.lang.UnsatisfiedLinkError: Unable to load library 'tesseract'

  • @JitendraKumar-lr3vq
    @JitendraKumar-lr3vq 5 лет назад +1

    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
      @Mukeshotwani  5 лет назад +1

      Hi Jitendra can u send me project screenshot ? Or export project and send me.
      mukeshotwani.50@gmail.com

    • @Mukeshotwani
      @Mukeshotwani  5 лет назад

      This is just trained data path issue only

    • @JitendraKumar-lr3vq
      @JitendraKumar-lr3vq 5 лет назад +1

      @@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 ..

    • @Mukeshotwani
      @Mukeshotwani  5 лет назад +1

      Its path issue I am happy that you solved it

    • @sayoojk.s6856
      @sayoojk.s6856 5 лет назад

      How you solved this one ?

  • @eswartirumalasetti1268
    @eswartirumalasetti1268 4 года назад +1

    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.

    • @Mukeshotwani
      @Mukeshotwani  4 года назад

      Hi Eswar, May be some changes from IRCTC side, try to read some images using the same.

    • @eswartirumalasetti1268
      @eswartirumalasetti1268 4 года назад +1

      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

    • @Mukeshotwani
      @Mukeshotwani  4 года назад

      yes it works fine with normal images

  • @PraveenKumar-xb9ji
    @PraveenKumar-xb9ji 5 лет назад +1

    Hi Mukesh, irrespective of image type(jpg or jpeg or png), am getting null pointer exception

  • @shubhamforeverything
    @shubhamforeverything 5 лет назад +1

    Hi Mukesh,
    How to setup the project explorer tab ? can you share me the video link that will very helpful.

    • @Mukeshotwani
      @Mukeshotwani  5 лет назад

      Hi Mate, you can use perspective to change the perspective or you can use views from top menu and you can customize the eclipse

  • @yogitaguthula5947
    @yogitaguthula5947 5 лет назад +2

    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 :-)

  • @satwikburman6841
    @satwikburman6841 5 лет назад +1

    What if we split against the ":"
    That would be more efficient right?

  • @parasjoshi5509
    @parasjoshi5509 Год назад

    Not working. I am getting tesseract path issue with eng file

  • @trishalagarwal
    @trishalagarwal 5 лет назад

    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?

  • @shubhamforeverything
    @shubhamforeverything 5 лет назад +2

    Hi bro,In Eclipse which package you used?

    • @Mukeshotwani
      @Mukeshotwani  5 лет назад

      Hi Bro I used 4.7 eclipse java developer

    • @shubhamforeverything
      @shubhamforeverything 5 лет назад

      @@Mukeshotwani is working with ellipse java oxygen R Win ?

  • @HariSuryaprakashBokka
    @HariSuryaprakashBokka Год назад

    Can u help how to set trained data in project

  • @parvathirachapudi5588
    @parvathirachapudi5588 5 лет назад +1

    Hi Mukesh,
    Is it possible to read checkboxes data from pdf file using Tesseract (using java implementation)

  • @santoshs105
    @santoshs105 4 года назад +1

    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.

    • @Mukeshotwani
      @Mukeshotwani  4 года назад

      you need to set path

    • @santoshs105
      @santoshs105 4 года назад

      Mukesh otwani how do I set path in Mac can u please let know in detail for Mac thanks

  • @saravanansaravanan18
    @saravanansaravanan18 2 года назад +1

    Hi Mukesh,
    it is not working in CMD using JAR
    Please share your thoughts

    • @Mukeshotwani
      @Mukeshotwani  2 года назад

      Please share your details about this with screenshot.

  • @gandikotasudheer4442
    @gandikotasudheer4442 8 месяцев назад

    How can we read data from pdf from database or cloud by using spring framework

    • @Mukeshotwani
      @Mukeshotwani  8 месяцев назад

      Not tried spring framework

  • @Healthmagic
    @Healthmagic 2 года назад

    How to validate any video using selenium & java

  • @karthikeyans1583
    @karthikeyans1583 4 года назад +1

    Hi Mukesh, Can u expain what is the use of traineddata file? thanks in advance.

    • @Mukeshotwani
      @Mukeshotwani  4 года назад

      Hi Karthikeyan if you see next video, I have explained how we used Tesseract to read captcha code.

  • @mounigontla8409
    @mounigontla8409 4 года назад

    Very good explanation and a nice demo

  • @la3035
    @la3035 5 лет назад +1

    Good video useful for Automation

  • @ashwajitthukral9101
    @ashwajitthukral9101 5 лет назад +1

    Thanks Mukesh, Really usefull for all selenium guys. Why last 2 lines are not showing in output and whats that ST YT. Thanks

    • @Mukeshotwani
      @Mukeshotwani  5 лет назад +1

      Hi Ashwajit, regular express was causing the issue so we written another reg ex then it started showing the correct output.

    • @ashwajitthukral9101
      @ashwajitthukral9101 5 лет назад

      Mukesh otwani ThankYou

  • @AshishKumar-mo6ou
    @AshishKumar-mo6ou Год назад

    Can we read PAN CARD using above code?

  • @sonalisundaray1052
    @sonalisundaray1052 4 года назад

    Hi Mukesh,can u create another video how to setup tess4j src file in maven project

  • @parthiban1816
    @parthiban1816 3 года назад

    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 ?

    • @joshuaaguilera6666
      @joshuaaguilera6666 3 года назад

      I have the same issue. Were you ever able to resolve it?

    • @saigiradkar946
      @saigiradkar946 3 года назад

      @@joshuaaguilera6666 change tass4j dependency version and try

    • @Biswamber_K
      @Biswamber_K 3 года назад

      I am also facing same error

  • @salmanmohamed1993
    @salmanmohamed1993 5 лет назад

    Sir How to pass image in browser instead of capturing from webcam

  • @thisisamittripathi
    @thisisamittripathi 5 лет назад

    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

  • @AbhishekMishra-ru2fi
    @AbhishekMishra-ru2fi 4 года назад +1

    Mukesh , can you please prepare video in Regular Expression ?

    • @Mukeshotwani
      @Mukeshotwani  4 года назад +1

      yes Abhishek will try. Good to see your comment after long time.

  • @nagarjunanethaji8480
    @nagarjunanethaji8480 4 года назад +1

    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.

    • @ankitatalukdar3807
      @ankitatalukdar3807 4 года назад +1

      Hi, I also have the same query of reading ID cards. Any solution can be helpful. Thanks In Advance

    • @Mukeshotwani
      @Mukeshotwani  4 года назад

      Hi It reads images if background is clear and no strikes.

  • @sodiumpomegranade1161
    @sodiumpomegranade1161 4 года назад +1

    the tessdata folder had already a pom.xml and path.... how?

    • @Mukeshotwani
      @Mukeshotwani  4 года назад +1

      Sorry Ronald can you tell me what issue you are getting here?

    • @sodiumpomegranade1161
      @sodiumpomegranade1161 4 года назад +1

      @@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?

    • @Mukeshotwani
      @Mukeshotwani  4 года назад +1

      Hi Mate you pom.xml is from maven. when you create maven project you will get pom.xml file too.

    • @sodiumpomegranade1161
      @sodiumpomegranade1161 4 года назад

      @@Mukeshotwani thanks mate. Total noob question but is it in Eclipse>File>New>Java project/project?

  • @sivakumarmummidi6730
    @sivakumarmummidi6730 4 года назад +1

    is i am not a robot can be automated ?

  • @rizaladhi7066
    @rizaladhi7066 Год назад

    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

  • @manuml6488
    @manuml6488 3 года назад

    u gave filename as .jpg instead of .jpeg

  • @looktothecook3787
    @looktothecook3787 4 года назад +1

    XML file please show sir again

    • @Mukeshotwani
      @Mukeshotwani  4 года назад

      Its there already you can pause the video or watch it again.

    • @sodiumpomegranade1161
      @sodiumpomegranade1161 4 года назад +1

      @@Mukeshotwani i really can't find pom.xml. where or how do you make it?

  • @vivaansrivastava5949
    @vivaansrivastava5949 4 года назад

    I am getting unsatisfied linkerror

    • @vivaansrivastava5949
      @vivaansrivastava5949 4 года назад

      Please suggest

    • @Mukeshotwani
      @Mukeshotwani  4 года назад

      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.

  • @VishalKumar-lj7xs
    @VishalKumar-lj7xs 5 лет назад

    Nice

  • @Biswamber_K
    @Biswamber_K 3 года назад

    Everyone getting the error 😭

  • @stith_pragya
    @stith_pragya 3 года назад

    Thank You sir it worked fine in eclipse but in intellij it giving error -SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".

  • @rajendramahapatra3293
    @rajendramahapatra3293 5 лет назад

    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!

    • @sankarginjupalli2380
      @sankarginjupalli2380 5 лет назад

      same for me too. Is there any solution available.

    • @rahulsamyal6159
      @rahulsamyal6159 5 лет назад +1

      @@sankarginjupalli2380 save your file ./eng.traineddata
      at project level also.