← Back to team overview

sikuli-driver team mailing list archive

[Question #258158]: find text from image returns garbage values

 

New question #258158 on Sikuli:
https://answers.launchpad.net/sikuli/+question/258158

Hi,

I am trying to get text from image and I was able to get text with below snippet, but it is returning garbage values. Is there any way where we can get exact text from image

SNIPPET
try {
        Screen s = new Screen();
	Pattern c = new Pattern("D://DateSubmittedStatusAddin.png");
	Settings.OcrTextRead = true; // to switch on the Region.text() function
	Settings.OcrTextSearch = true; // to switch on finding text with find("some text")
					 
	String dateSubmitted =s.find(c).text();
	System.out.println(dateSubmitted );
} catch (FindFailed e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
}


OUTPUT OF SNIPPET
DateSubmitted 
 11.|'21I2[]141721[]:U1


TEXT DISPLAYED IN THE IMAGE: 
Date Submitted
11/21/2014 17:10:01

Thanks,
Sai


-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.