[tesseract-ocr] Re: Tess4J: Invalid memory access

2020-02-15 Thread Quan Nguyen
setDatapath should be set to the path to tessdata folder, which contains 
*.traineddata files. It's not the path to your image files.

On Saturday, February 15, 2020 at 8:14:09 AM UTC-6, Rajith Kariyawsam wrote:
>
> Hi Quan,
>
> I got the point. By the below video.
> I miss download dependency.
> https://www.youtube.com/watch?v=5DqW9KP-aQo=425s
>
> And I will try that.
> Thank you very much.
>
> On Saturday, February 15, 2020 at 7:22:36 PM UTC+5:30, Rajith Kariyawsam 
> wrote:
>>
>> Hi Quan,
>>
>> 'pth' is the image location in my PC. 
>> I verified it with debug mood too.
>> As I know image location should set to the 'Datapath.'
>>
>> If the 'pth' is incorrect what should pass for that parameter. 
>>
>> Realy helpful if you can further explain it to me, please ?
>>
>> On Saturday, February 15, 2020 at 10:11:43 AM UTC+5:30, Quan Nguyen wrote:
>>>
>>> cptcha.setDatapath(pth); < incorrect pth value
>>>
>>>
>>> On Wednesday, February 12, 2020 at 10:00:31 PM UTC-6, Rajith Kariyawsam 
>>> wrote:

 Hi Quan,
 I didn't got wht do you mean by 'tessdata ' folder.
 given pth is the copied image(png) location.  my image name is* 
 'testcap.png'*

 as per the below line 

 String pth = "C:\\Users\\username\\Downloads\\capthca1\\testcap.png";

 FileHandler.copy(imgFile, new File(pth));



 Appreciate it if you can further describe it, please.



 On Thursday, February 13, 2020 at 12:16:27 AM UTC+5:30, Quan Nguyen 
 wrote:
>
> It looks like the datapath is set incorrectly. It should be set to 
> tessdata folder.
>
> On Tuesday, February 11, 2020 at 2:30:45 AM UTC-6, Rajith Kariyawsam 
> wrote:
>>
>> Still, the same error occurred for me.
>>
>> code: 
>>
>> 
>> net.sourceforge.tess4j
>> tess4j
>> 4.3.1
>> 
>>
>>
>> 
>> org.seleniumhq.selenium
>> selenium-java
>> 3.141.59
>> 
>>
>>
>> File imgFile = 
>> findElement(captchaimgIdPath).getScreenshotAs(OutputType.FILE);
>> String pth = "C:\\Users\\username\\Downloads\\capthca1\\testcap.png"; 
>> //src/main/resources
>> Thread.sleep(2000);
>> FileHandler.copy(imgFile, new File(pth));
>> Thread.sleep(2000);
>> Tesseract cptcha = new Tesseract();
>> cptcha.setDatapath(pth);
>> cptcha.setLanguage("eng");
>> String text = cptcha.doOCR(new File(pth));
>>
>> System.out.println(text);
>>
>>
>> On Sunday, September 2, 2018 at 10:20:53 PM UTC+5:30, Subramaniyan 
>> Suresh wrote:
>>>
>>> I am using Tess4J in my project to extract text from an image (Using 
>>> Eclipse IDE). I am getting the following error when I try run the OCR. 
>>> Any 
>>> suggestion?  
>>>
>>> *Error: Exception in thread "main" java.lang.Error: Invalid memory 
>>> access*
>>>
>>>
>>> *Note: I have attached the image file which I've used *
>>>
>>> *My Code*:
>>>
>>>
>>> package tesseractTraining;
>>>
>>>
>>> import java.io.File;
>>>
>>> import net.sourceforge.tess4j.*;
>>>
>>>
>>> public class TesseractMainRunner {
>>>
>>> public static void main(String[] args) {
>>>
>>> File imageFile = new File("E:\\Tesseract\\Test Images\\sample.png");
>>>
>>> Tesseract instance = new Tesseract();
>>>
>>> try {
>>>
>>> instance.setDatapath("C:\\Program Files 
>>> (x86)\\Tesseract-OCR\\tessdata");
>>>
>>> instance.setLanguage("eng");
>>>
>>> String result = instance.doOCR(imageFile);
>>>
>>> System.out.println(result);
>>>
>>> } catch (TesseractException e) {
>>>
>>> System.err.println(e.getMessage());
>>>
>>> }
>>>
>>> imageFile.exists();
>>>
>>> }
>>>
>>>
>>> }
>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tesseract-ocr+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tesseract-ocr/0ddb242e-a56a-4804-a9bc-25731ce6273d%40googlegroups.com.


[tesseract-ocr] Re: Tess4J: Invalid memory access

2020-02-15 Thread Rajith Kariyawsam
Hi Quan,

I got the point. By the below video.
I miss download dependency.
https://www.youtube.com/watch?v=5DqW9KP-aQo=425s

And I will try that.
Thank you very much.

On Saturday, February 15, 2020 at 7:22:36 PM UTC+5:30, Rajith Kariyawsam 
wrote:
>
> Hi Quan,
>
> 'pth' is the image location in my PC. 
> I verified it with debug mood too.
> As I know image location should set to the 'Datapath.'
>
> If the 'pth' is incorrect what should pass for that parameter. 
>
> Realy helpful if you can further explain it to me, please ?
>
> On Saturday, February 15, 2020 at 10:11:43 AM UTC+5:30, Quan Nguyen wrote:
>>
>> cptcha.setDatapath(pth); < incorrect pth value
>>
>>
>> On Wednesday, February 12, 2020 at 10:00:31 PM UTC-6, Rajith Kariyawsam 
>> wrote:
>>>
>>> Hi Quan,
>>> I didn't got wht do you mean by 'tessdata ' folder.
>>> given pth is the copied image(png) location.  my image name is* 
>>> 'testcap.png'*
>>>
>>> as per the below line 
>>>
>>> String pth = "C:\\Users\\username\\Downloads\\capthca1\\testcap.png";
>>>
>>> FileHandler.copy(imgFile, new File(pth));
>>>
>>>
>>>
>>> Appreciate it if you can further describe it, please.
>>>
>>>
>>>
>>> On Thursday, February 13, 2020 at 12:16:27 AM UTC+5:30, Quan Nguyen 
>>> wrote:

 It looks like the datapath is set incorrectly. It should be set to 
 tessdata folder.

 On Tuesday, February 11, 2020 at 2:30:45 AM UTC-6, Rajith Kariyawsam 
 wrote:
>
> Still, the same error occurred for me.
>
> code: 
>
> 
> net.sourceforge.tess4j
> tess4j
> 4.3.1
> 
>
>
> 
> org.seleniumhq.selenium
> selenium-java
> 3.141.59
> 
>
>
> File imgFile = 
> findElement(captchaimgIdPath).getScreenshotAs(OutputType.FILE);
> String pth = "C:\\Users\\username\\Downloads\\capthca1\\testcap.png"; 
> //src/main/resources
> Thread.sleep(2000);
> FileHandler.copy(imgFile, new File(pth));
> Thread.sleep(2000);
> Tesseract cptcha = new Tesseract();
> cptcha.setDatapath(pth);
> cptcha.setLanguage("eng");
> String text = cptcha.doOCR(new File(pth));
>
> System.out.println(text);
>
>
> On Sunday, September 2, 2018 at 10:20:53 PM UTC+5:30, Subramaniyan 
> Suresh wrote:
>>
>> I am using Tess4J in my project to extract text from an image (Using 
>> Eclipse IDE). I am getting the following error when I try run the OCR. 
>> Any 
>> suggestion?  
>>
>> *Error: Exception in thread "main" java.lang.Error: Invalid memory 
>> access*
>>
>>
>> *Note: I have attached the image file which I've used *
>>
>> *My Code*:
>>
>>
>> package tesseractTraining;
>>
>>
>> import java.io.File;
>>
>> import net.sourceforge.tess4j.*;
>>
>>
>> public class TesseractMainRunner {
>>
>> public static void main(String[] args) {
>>
>> File imageFile = new File("E:\\Tesseract\\Test Images\\sample.png");
>>
>> Tesseract instance = new Tesseract();
>>
>> try {
>>
>> instance.setDatapath("C:\\Program Files 
>> (x86)\\Tesseract-OCR\\tessdata");
>>
>> instance.setLanguage("eng");
>>
>> String result = instance.doOCR(imageFile);
>>
>> System.out.println(result);
>>
>> } catch (TesseractException e) {
>>
>> System.err.println(e.getMessage());
>>
>> }
>>
>> imageFile.exists();
>>
>> }
>>
>>
>> }
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tesseract-ocr+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tesseract-ocr/7cd80518-1c3e-48d4-9b23-606bd82af5ba%40googlegroups.com.


[tesseract-ocr] Re: Tess4J: Invalid memory access

2020-02-15 Thread Rajith Kariyawsam
Hi Quan,

'pth' is the image location in my PC. 
I verified it with debug mood too.
As I know image location should set to the 'Datapath.'

If the 'pth' is incorrect what should pass for that parameter. 

Realy helpful if you can further explain it to me, please ?

On Saturday, February 15, 2020 at 10:11:43 AM UTC+5:30, Quan Nguyen wrote:
>
> cptcha.setDatapath(pth); < incorrect pth value
>
>
> On Wednesday, February 12, 2020 at 10:00:31 PM UTC-6, Rajith Kariyawsam 
> wrote:
>>
>> Hi Quan,
>> I didn't got wht do you mean by 'tessdata ' folder.
>> given pth is the copied image(png) location.  my image name is* 
>> 'testcap.png'*
>>
>> as per the below line 
>>
>> String pth = "C:\\Users\\username\\Downloads\\capthca1\\testcap.png";
>>
>> FileHandler.copy(imgFile, new File(pth));
>>
>>
>>
>> Appreciate it if you can further describe it, please.
>>
>>
>>
>> On Thursday, February 13, 2020 at 12:16:27 AM UTC+5:30, Quan Nguyen wrote:
>>>
>>> It looks like the datapath is set incorrectly. It should be set to 
>>> tessdata folder.
>>>
>>> On Tuesday, February 11, 2020 at 2:30:45 AM UTC-6, Rajith Kariyawsam 
>>> wrote:

 Still, the same error occurred for me.

 code: 

 
 net.sourceforge.tess4j
 tess4j
 4.3.1
 


 
 org.seleniumhq.selenium
 selenium-java
 3.141.59
 


 File imgFile = 
 findElement(captchaimgIdPath).getScreenshotAs(OutputType.FILE);
 String pth = "C:\\Users\\username\\Downloads\\capthca1\\testcap.png"; 
 //src/main/resources
 Thread.sleep(2000);
 FileHandler.copy(imgFile, new File(pth));
 Thread.sleep(2000);
 Tesseract cptcha = new Tesseract();
 cptcha.setDatapath(pth);
 cptcha.setLanguage("eng");
 String text = cptcha.doOCR(new File(pth));

 System.out.println(text);


 On Sunday, September 2, 2018 at 10:20:53 PM UTC+5:30, Subramaniyan 
 Suresh wrote:
>
> I am using Tess4J in my project to extract text from an image (Using 
> Eclipse IDE). I am getting the following error when I try run the OCR. 
> Any 
> suggestion?  
>
> *Error: Exception in thread "main" java.lang.Error: Invalid memory 
> access*
>
>
> *Note: I have attached the image file which I've used *
>
> *My Code*:
>
>
> package tesseractTraining;
>
>
> import java.io.File;
>
> import net.sourceforge.tess4j.*;
>
>
> public class TesseractMainRunner {
>
> public static void main(String[] args) {
>
> File imageFile = new File("E:\\Tesseract\\Test Images\\sample.png");
>
> Tesseract instance = new Tesseract();
>
> try {
>
> instance.setDatapath("C:\\Program Files 
> (x86)\\Tesseract-OCR\\tessdata");
>
> instance.setLanguage("eng");
>
> String result = instance.doOCR(imageFile);
>
> System.out.println(result);
>
> } catch (TesseractException e) {
>
> System.err.println(e.getMessage());
>
> }
>
> imageFile.exists();
>
> }
>
>
> }
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tesseract-ocr+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tesseract-ocr/48acaed4-0485-412f-b81f-fa13f883bddf%40googlegroups.com.


[tesseract-ocr] Re: Tess4J: Invalid memory access

2020-02-14 Thread Quan Nguyen


cptcha.setDatapath(pth); < incorrect pth value


On Wednesday, February 12, 2020 at 10:00:31 PM UTC-6, Rajith Kariyawsam 
wrote:
>
> Hi Quan,
> I didn't got wht do you mean by 'tessdata ' folder.
> given pth is the copied image(png) location.  my image name is* 
> 'testcap.png'*
>
> as per the below line 
>
> String pth = "C:\\Users\\username\\Downloads\\capthca1\\testcap.png";
>
> FileHandler.copy(imgFile, new File(pth));
>
>
>
> Appreciate it if you can further describe it, please.
>
>
>
> On Thursday, February 13, 2020 at 12:16:27 AM UTC+5:30, Quan Nguyen wrote:
>>
>> It looks like the datapath is set incorrectly. It should be set to 
>> tessdata folder.
>>
>> On Tuesday, February 11, 2020 at 2:30:45 AM UTC-6, Rajith Kariyawsam 
>> wrote:
>>>
>>> Still, the same error occurred for me.
>>>
>>> code: 
>>>
>>> 
>>> net.sourceforge.tess4j
>>> tess4j
>>> 4.3.1
>>> 
>>>
>>>
>>> 
>>> org.seleniumhq.selenium
>>> selenium-java
>>> 3.141.59
>>> 
>>>
>>>
>>> File imgFile = 
>>> findElement(captchaimgIdPath).getScreenshotAs(OutputType.FILE);
>>> String pth = "C:\\Users\\username\\Downloads\\capthca1\\testcap.png"; 
>>> //src/main/resources
>>> Thread.sleep(2000);
>>> FileHandler.copy(imgFile, new File(pth));
>>> Thread.sleep(2000);
>>> Tesseract cptcha = new Tesseract();
>>> cptcha.setDatapath(pth);
>>> cptcha.setLanguage("eng");
>>> String text = cptcha.doOCR(new File(pth));
>>>
>>> System.out.println(text);
>>>
>>>
>>> On Sunday, September 2, 2018 at 10:20:53 PM UTC+5:30, Subramaniyan 
>>> Suresh wrote:

 I am using Tess4J in my project to extract text from an image (Using 
 Eclipse IDE). I am getting the following error when I try run the OCR. Any 
 suggestion?  

 *Error: Exception in thread "main" java.lang.Error: Invalid memory 
 access*


 *Note: I have attached the image file which I've used *

 *My Code*:


 package tesseractTraining;


 import java.io.File;

 import net.sourceforge.tess4j.*;


 public class TesseractMainRunner {

 public static void main(String[] args) {

 File imageFile = new File("E:\\Tesseract\\Test Images\\sample.png");

 Tesseract instance = new Tesseract();

 try {

 instance.setDatapath("C:\\Program Files 
 (x86)\\Tesseract-OCR\\tessdata");

 instance.setLanguage("eng");

 String result = instance.doOCR(imageFile);

 System.out.println(result);

 } catch (TesseractException e) {

 System.err.println(e.getMessage());

 }

 imageFile.exists();

 }


 }



-- 
You received this message because you are subscribed to the Google Groups 
"tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tesseract-ocr+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tesseract-ocr/5fe365a1-1e3b-470c-9911-915773cff152%40googlegroups.com.


[tesseract-ocr] Re: Tess4J: Invalid memory access

2020-02-12 Thread Rajith Kariyawsam
Hi Quan,
I didn't got wht do you mean by 'tessdata ' folder.
given pth is the copied image(png) location.  my image name is* 
'testcap.png'*

as per the below line 

String pth = "C:\\Users\\username\\Downloads\\capthca1\\testcap.png";

FileHandler.copy(imgFile, new File(pth));



Appreciate it if you can further describe it, please.



On Thursday, February 13, 2020 at 12:16:27 AM UTC+5:30, Quan Nguyen wrote:
>
> It looks like the datapath is set incorrectly. It should be set to 
> tessdata folder.
>
> On Tuesday, February 11, 2020 at 2:30:45 AM UTC-6, Rajith Kariyawsam wrote:
>>
>> Still, the same error occurred for me.
>>
>> code: 
>>
>> 
>> net.sourceforge.tess4j
>> tess4j
>> 4.3.1
>> 
>>
>>
>> 
>> org.seleniumhq.selenium
>> selenium-java
>> 3.141.59
>> 
>>
>>
>> File imgFile = 
>> findElement(captchaimgIdPath).getScreenshotAs(OutputType.FILE);
>> String pth = "C:\\Users\\username\\Downloads\\capthca1\\testcap.png"; 
>> //src/main/resources
>> Thread.sleep(2000);
>> FileHandler.copy(imgFile, new File(pth));
>> Thread.sleep(2000);
>> Tesseract cptcha = new Tesseract();
>> cptcha.setDatapath(pth);
>> cptcha.setLanguage("eng");
>> String text = cptcha.doOCR(new File(pth));
>>
>> System.out.println(text);
>>
>>
>> On Sunday, September 2, 2018 at 10:20:53 PM UTC+5:30, Subramaniyan Suresh 
>> wrote:
>>>
>>> I am using Tess4J in my project to extract text from an image (Using 
>>> Eclipse IDE). I am getting the following error when I try run the OCR. Any 
>>> suggestion?  
>>>
>>> *Error: Exception in thread "main" java.lang.Error: Invalid memory 
>>> access*
>>>
>>>
>>> *Note: I have attached the image file which I've used *
>>>
>>> *My Code*:
>>>
>>>
>>> package tesseractTraining;
>>>
>>>
>>> import java.io.File;
>>>
>>> import net.sourceforge.tess4j.*;
>>>
>>>
>>> public class TesseractMainRunner {
>>>
>>> public static void main(String[] args) {
>>>
>>> File imageFile = new File("E:\\Tesseract\\Test Images\\sample.png");
>>>
>>> Tesseract instance = new Tesseract();
>>>
>>> try {
>>>
>>> instance.setDatapath("C:\\Program Files (x86)\\Tesseract-OCR\\tessdata");
>>>
>>> instance.setLanguage("eng");
>>>
>>> String result = instance.doOCR(imageFile);
>>>
>>> System.out.println(result);
>>>
>>> } catch (TesseractException e) {
>>>
>>> System.err.println(e.getMessage());
>>>
>>> }
>>>
>>> imageFile.exists();
>>>
>>> }
>>>
>>>
>>> }
>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tesseract-ocr+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tesseract-ocr/e80cb838-a57f-4833-99b3-0daa0c309382%40googlegroups.com.


[tesseract-ocr] Re: Tess4J: Invalid memory access

2020-02-12 Thread Quan Nguyen
It looks like the datapath is set incorrectly. It should be set to tessdata 
folder.

On Tuesday, February 11, 2020 at 2:30:45 AM UTC-6, Rajith Kariyawsam wrote:
>
> Still, the same error occurred for me.
>
> code: 
>
> 
> net.sourceforge.tess4j
> tess4j
> 4.3.1
> 
>
>
> 
> org.seleniumhq.selenium
> selenium-java
> 3.141.59
> 
>
>
> File imgFile = findElement(captchaimgIdPath).getScreenshotAs(OutputType.FILE);
> String pth = "C:\\Users\\username\\Downloads\\capthca1\\testcap.png"; 
> //src/main/resources
> Thread.sleep(2000);
> FileHandler.copy(imgFile, new File(pth));
> Thread.sleep(2000);
> Tesseract cptcha = new Tesseract();
> cptcha.setDatapath(pth);
> cptcha.setLanguage("eng");
> String text = cptcha.doOCR(new File(pth));
>
> System.out.println(text);
>
>
> On Sunday, September 2, 2018 at 10:20:53 PM UTC+5:30, Subramaniyan Suresh 
> wrote:
>>
>> I am using Tess4J in my project to extract text from an image (Using 
>> Eclipse IDE). I am getting the following error when I try run the OCR. Any 
>> suggestion?  
>>
>> *Error: Exception in thread "main" java.lang.Error: Invalid memory access*
>>
>>
>> *Note: I have attached the image file which I've used *
>>
>> *My Code*:
>>
>>
>> package tesseractTraining;
>>
>>
>> import java.io.File;
>>
>> import net.sourceforge.tess4j.*;
>>
>>
>> public class TesseractMainRunner {
>>
>> public static void main(String[] args) {
>>
>> File imageFile = new File("E:\\Tesseract\\Test Images\\sample.png");
>>
>> Tesseract instance = new Tesseract();
>>
>> try {
>>
>> instance.setDatapath("C:\\Program Files (x86)\\Tesseract-OCR\\tessdata");
>>
>> instance.setLanguage("eng");
>>
>> String result = instance.doOCR(imageFile);
>>
>> System.out.println(result);
>>
>> } catch (TesseractException e) {
>>
>> System.err.println(e.getMessage());
>>
>> }
>>
>> imageFile.exists();
>>
>> }
>>
>>
>> }
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tesseract-ocr+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tesseract-ocr/8635f319-bb5b-48a3-88f5-b75a52b4df7a%40googlegroups.com.


[tesseract-ocr] Re: Tess4J: Invalid memory access

2020-02-11 Thread Rajith Kariyawsam
Still, the same error occurred for me.

code: 


net.sourceforge.tess4j
tess4j
4.3.1




org.seleniumhq.selenium
selenium-java
3.141.59



File imgFile = findElement(captchaimgIdPath).getScreenshotAs(OutputType.FILE);
String pth = "C:\\Users\\username\\Downloads\\capthca1\\testcap.png"; 
//src/main/resources
Thread.sleep(2000);
FileHandler.copy(imgFile, new File(pth));
Thread.sleep(2000);
Tesseract cptcha = new Tesseract();
cptcha.setDatapath(pth);
cptcha.setLanguage("eng");
String text = cptcha.doOCR(new File(pth));

System.out.println(text);


On Sunday, September 2, 2018 at 10:20:53 PM UTC+5:30, Subramaniyan Suresh 
wrote:
>
> I am using Tess4J in my project to extract text from an image (Using 
> Eclipse IDE). I am getting the following error when I try run the OCR. Any 
> suggestion?  
>
> *Error: Exception in thread "main" java.lang.Error: Invalid memory access*
>
>
> *Note: I have attached the image file which I've used *
>
> *My Code*:
>
>
> package tesseractTraining;
>
>
> import java.io.File;
>
> import net.sourceforge.tess4j.*;
>
>
> public class TesseractMainRunner {
>
> public static void main(String[] args) {
>
> File imageFile = new File("E:\\Tesseract\\Test Images\\sample.png");
>
> Tesseract instance = new Tesseract();
>
> try {
>
> instance.setDatapath("C:\\Program Files (x86)\\Tesseract-OCR\\tessdata");
>
> instance.setLanguage("eng");
>
> String result = instance.doOCR(imageFile);
>
> System.out.println(result);
>
> } catch (TesseractException e) {
>
> System.err.println(e.getMessage());
>
> }
>
> imageFile.exists();
>
> }
>
>
> }
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tesseract-ocr+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tesseract-ocr/d81a825e-7f23-481b-bf5e-355bd04435e8%40googlegroups.com.


Re: [tesseract-ocr] Re: Tess4J: Invalid memory access

2018-09-03 Thread Subramaniyan Suresh
Thanks for your quick turnaround.

On Mon 3 Sep, 2018, 8:50 PM Quan Nguyen,  wrote:

> The issue has been fixed in the latest releases published today.
>
> Thanks.
>
> On Sunday, September 2, 2018 at 11:50:53 AM UTC-5, Subramaniyan Suresh
> wrote:
>>
>> I am using Tess4J in my project to extract text from an image (Using
>> Eclipse IDE). I am getting the following error when I try run the OCR. Any
>> suggestion?
>>
>> *Error: Exception in thread "main" java.lang.Error: Invalid memory access*
>>
>>
>> *Note: I have attached the image file which I've used *
>>
>> *My Code*:
>>
>>
>> package tesseractTraining;
>>
>>
>> import java.io.File;
>>
>> import net.sourceforge.tess4j.*;
>>
>>
>> public class TesseractMainRunner {
>>
>> public static void main(String[] args) {
>>
>> File imageFile = new File("E:\\Tesseract\\Test Images\\sample.png");
>>
>> Tesseract instance = new Tesseract();
>>
>> try {
>>
>> instance.setDatapath("C:\\Program Files (x86)\\Tesseract-OCR\\tessdata");
>>
>> instance.setLanguage("eng");
>>
>> String result = instance.doOCR(imageFile);
>>
>> System.out.println(result);
>>
>> } catch (TesseractException e) {
>>
>> System.err.println(e.getMessage());
>>
>> }
>>
>> imageFile.exists();
>>
>> }
>>
>>
>> }
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "tesseract-ocr" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to tesseract-ocr+unsubscr...@googlegroups.com.
> To post to this group, send email to tesseract-ocr@googlegroups.com.
> Visit this group at https://groups.google.com/group/tesseract-ocr.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tesseract-ocr/a384bae2-9580-4066-a0f0-9d90eacc50fd%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tesseract-ocr+unsubscr...@googlegroups.com.
To post to this group, send email to tesseract-ocr@googlegroups.com.
Visit this group at https://groups.google.com/group/tesseract-ocr.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tesseract-ocr/CAJGUcgM4RT%3DXdsCht42JQTyTXwfPMxMQB%2B9pz65p%2BDhVW5MO6Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[tesseract-ocr] Re: Tess4J: Invalid memory access

2018-09-03 Thread Quan Nguyen
The issue has been fixed in the latest releases published today.

Thanks.

On Sunday, September 2, 2018 at 11:50:53 AM UTC-5, Subramaniyan Suresh 
wrote:
>
> I am using Tess4J in my project to extract text from an image (Using 
> Eclipse IDE). I am getting the following error when I try run the OCR. Any 
> suggestion?  
>
> *Error: Exception in thread "main" java.lang.Error: Invalid memory access*
>
>
> *Note: I have attached the image file which I've used *
>
> *My Code*:
>
>
> package tesseractTraining;
>
>
> import java.io.File;
>
> import net.sourceforge.tess4j.*;
>
>
> public class TesseractMainRunner {
>
> public static void main(String[] args) {
>
> File imageFile = new File("E:\\Tesseract\\Test Images\\sample.png");
>
> Tesseract instance = new Tesseract();
>
> try {
>
> instance.setDatapath("C:\\Program Files (x86)\\Tesseract-OCR\\tessdata");
>
> instance.setLanguage("eng");
>
> String result = instance.doOCR(imageFile);
>
> System.out.println(result);
>
> } catch (TesseractException e) {
>
> System.err.println(e.getMessage());
>
> }
>
> imageFile.exists();
>
> }
>
>
> }
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tesseract-ocr+unsubscr...@googlegroups.com.
To post to this group, send email to tesseract-ocr@googlegroups.com.
Visit this group at https://groups.google.com/group/tesseract-ocr.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tesseract-ocr/a384bae2-9580-4066-a0f0-9d90eacc50fd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tesseract-ocr] Re: Tess4J: Invalid memory access

2018-09-02 Thread Quan Nguyen
Subramaniyan,

If possible, please put in a new issue 
at https://github.com/nguyenq/tess4j/issues for tracking purpose.

Thanks.

On Sunday, September 2, 2018 at 1:52:14 PM UTC-5, Quan Nguyen wrote:
>
> I tested your sample image and confirmed the error. It looks like a bug in 
> the routine that determines the image's bit depth. A new version will be 
> released once a fix is worked out and committed.
>
> Thank you for reporting.
>
> On Sunday, September 2, 2018 at 11:50:53 AM UTC-5, Subramaniyan Suresh 
> wrote:
>>
>> I am using Tess4J in my project to extract text from an image (Using 
>> Eclipse IDE). I am getting the following error when I try run the OCR. Any 
>> suggestion?  
>>
>> *Error: Exception in thread "main" java.lang.Error: Invalid memory access*
>>
>>
>> *Note: I have attached the image file which I've used *
>>
>> *My Code*:
>>
>>
>> package tesseractTraining;
>>
>>
>> import java.io.File;
>>
>> import net.sourceforge.tess4j.*;
>>
>>
>> public class TesseractMainRunner {
>>
>> public static void main(String[] args) {
>>
>> File imageFile = new File("E:\\Tesseract\\Test Images\\sample.png");
>>
>> Tesseract instance = new Tesseract();
>>
>> try {
>>
>> instance.setDatapath("C:\\Program Files (x86)\\Tesseract-OCR\\tessdata");
>>
>> instance.setLanguage("eng");
>>
>> String result = instance.doOCR(imageFile);
>>
>> System.out.println(result);
>>
>> } catch (TesseractException e) {
>>
>> System.err.println(e.getMessage());
>>
>> }
>>
>> imageFile.exists();
>>
>> }
>>
>>
>> }
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tesseract-ocr+unsubscr...@googlegroups.com.
To post to this group, send email to tesseract-ocr@googlegroups.com.
Visit this group at https://groups.google.com/group/tesseract-ocr.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tesseract-ocr/1ba5ba4c-91d9-4138-ac80-0633f43c3eab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tesseract-ocr] Re: Tess4J: Invalid memory access

2018-09-02 Thread Quan Nguyen
I tested your sample image and confirmed the error. It looks like a bug in 
the routine that determines the image's bit depth. A new version will be 
released once a fix is worked out and committed.

Thank you for reporting.

On Sunday, September 2, 2018 at 11:50:53 AM UTC-5, Subramaniyan Suresh 
wrote:
>
> I am using Tess4J in my project to extract text from an image (Using 
> Eclipse IDE). I am getting the following error when I try run the OCR. Any 
> suggestion?  
>
> *Error: Exception in thread "main" java.lang.Error: Invalid memory access*
>
>
> *Note: I have attached the image file which I've used *
>
> *My Code*:
>
>
> package tesseractTraining;
>
>
> import java.io.File;
>
> import net.sourceforge.tess4j.*;
>
>
> public class TesseractMainRunner {
>
> public static void main(String[] args) {
>
> File imageFile = new File("E:\\Tesseract\\Test Images\\sample.png");
>
> Tesseract instance = new Tesseract();
>
> try {
>
> instance.setDatapath("C:\\Program Files (x86)\\Tesseract-OCR\\tessdata");
>
> instance.setLanguage("eng");
>
> String result = instance.doOCR(imageFile);
>
> System.out.println(result);
>
> } catch (TesseractException e) {
>
> System.err.println(e.getMessage());
>
> }
>
> imageFile.exists();
>
> }
>
>
> }
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tesseract-ocr+unsubscr...@googlegroups.com.
To post to this group, send email to tesseract-ocr@googlegroups.com.
Visit this group at https://groups.google.com/group/tesseract-ocr.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tesseract-ocr/539303c3-4f18-4b97-a7d3-c11cf6e8e6d8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.