<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>How to use OCR&amp;#39;s in appian RPA using FALCON</title><link>https://community.appian.com/discussions/f/rpa/19189/how-to-use-ocr-s-in-appian-rpa-using-falcon</link><description>1. We have image file , the bot should read the particular text and extract the same using OCR. How to achieve this? any samples links ? 
 2. Does appian RPA Falcon supports all formats?</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to use OCR's in appian RPA using FALCON</title><link>https://community.appian.com/thread/87341?ContentTypeID=1</link><pubDate>Wed, 27 Oct 2021 10:36:02 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f9e06316-ef11-430b-b294-a0f865094eb0</guid><dc:creator>Shakshi</dc:creator><description>&lt;p&gt;Hey Jesus,&lt;/p&gt;
&lt;p&gt;We tried your code and it perfectly identifies the image but it is still not extracting the text out of it. We tried with only that part of the image where the text was there but still it didn&amp;#39;t extract any text.&lt;/p&gt;
&lt;p&gt;Can you please help us on the same or can you provide the image which you used to run the above code?&lt;/p&gt;
&lt;p&gt;Thanks in advance!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use OCR's in appian RPA using FALCON</title><link>https://community.appian.com/thread/75227?ContentTypeID=1</link><pubDate>Tue, 07 Jul 2020 07:01:09 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f22b26bc-b6f3-466a-9c7b-f3c23cf3afcd</guid><dc:creator>prasanthrajac0001</dc:creator><description>&lt;p&gt;Thanks &lt;a href="/members/jesusp0002"&gt;jesusp0002&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use OCR's in appian RPA using FALCON</title><link>https://community.appian.com/thread/75141?ContentTypeID=1</link><pubDate>Thu, 02 Jul 2020 13:43:37 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f3dd0f4d-b650-44bf-878d-7675297d563c</guid><dc:creator>jesusp0002</dc:creator><description>&lt;p&gt;I attached a simple example:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="java"&gt;public void recognize() throws Exception {
		
		final BufferedImage defaultImage =
				ImageIO.read(Paths.get(server.getCurrentDir(), &amp;quot;img&amp;quot;, &amp;quot;img.png&amp;quot;).toFile());
	   
       if (defaultImage != null){
			Rectangle rectanguloCif = new Rectangle(58, 15);

			String text = falcon.extractText(MyRobot.convertToARGB(defaultImage), rectanguloCif, ETextFormInImage.TREAT_THE_IMAGE_AS_A_SINGLE_TEXT_LINE,
					ELanguageInImage.SPANISH, null, 1.9f, 0f);

			server.info(&amp;quot;Resutl:&amp;quot; + text);

		}else{
			server.info(&amp;quot;Null Image&amp;quot;);
		}
	}
	//without crop-off
	public static BufferedImage convertToARGB(BufferedImage image)
	{
	    BufferedImage newImage = new BufferedImage(
	        image.getWidth(), image.getHeight(),
	        BufferedImage.TYPE_INT_ARGB);
	    
	    
	    Graphics2D g = newImage.createGraphics();
	    RenderingHints rh = new RenderingHints(
	             RenderingHints.KEY_TEXT_ANTIALIASING,
	             RenderingHints.VALUE_TEXT_ANTIALIAS_OFF);
	    g.setRenderingHints(rh);
	    g.drawImage(image, 36, 15, null);
	    g.dispose();
		
		}
		
	//with crop-off
	public static BufferedImage convertToARGB(BufferedImage image)
	{
			
		BufferedImage img = image.getSubimage(0, 0, 58, 15); 
		BufferedImage copyOfImage = new BufferedImage(img.getWidth(), img.getHeight(), BufferedImage.TYPE_INT_ARGB);
		Graphics2D g = copyOfImage.createGraphics();
		RenderingHints rh = new RenderingHints(
	             RenderingHints.KEY_TEXT_ANTIALIASING,
	             RenderingHints.VALUE_TEXT_ANTIALIAS_OFF);
	    g.setRenderingHints(rh);
		g.drawImage(img, 0, 0, null);
		return copyOfImage; 
	 
	}
	}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use OCR's in appian RPA using FALCON</title><link>https://community.appian.com/thread/75140?ContentTypeID=1</link><pubDate>Thu, 02 Jul 2020 13:14:55 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:abdc7941-de73-47be-aca9-ede63d09ec3b</guid><dc:creator>jesusp0002</dc:creator><description>&lt;p&gt;&lt;span&gt;The Falcon module allows you to extract text from images by using an embedded optical character recognition (OCR), or by using the&amp;nbsp;&lt;/span&gt;&lt;em&gt;Popchar&lt;/em&gt;&lt;span&gt;&amp;nbsp;engine (Pseudo optical character recognition)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This feature allows you to extract element names from the screen or even complete texts.&lt;/p&gt;
&lt;p&gt;The embedded OCR used by the Appian RPA platform is&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;tesseract&lt;/strong&gt;. By default, the OCR includes support for Spanish and English, and for the rest of languages it should be checked.&lt;/p&gt;
&lt;p&gt;It is important to highlight that the OCR&amp;#39;s reliability in extracting texts is not 100%. This involves that we should evaluate the feasibility of using this technology as we develop our robot. For example, if we want to extract the bank account and cannot check that the extracted text is correct, we shouldn&amp;#39;t use OCR for this process.&lt;/p&gt;
&lt;p&gt;For more information visit&amp;nbsp;&amp;nbsp;&lt;a href="https://docs.appian.com/suite/help/20.2/rpa/modules/falcon-module.html"&gt;https://docs.appian.com/suite/help/20.2/rpa/modules/falcon-module.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Regarding the second question, I have not had any problem when using any type of format either JPEG or PNG, generally when I use Falcon I try to use the format PNG and work with it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>