<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Vignesh Rajan on Medium]]></title>
        <description><![CDATA[Stories by Vignesh Rajan on Medium]]></description>
        <link>https://medium.com/@vigneshrajan_69052?source=rss-fc0de19a2aa3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*xgk6ZBHTMEChLwaegt5QWg.jpeg</url>
            <title>Stories by Vignesh Rajan on Medium</title>
            <link>https://medium.com/@vigneshrajan_69052?source=rss-fc0de19a2aa3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 21:30:39 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@vigneshrajan_69052/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[OCR in Mendix using Tesseract.js Part 1: Image-to-Text]]></title>
            <link>https://medium.com/mendix/ocr-in-mendix-using-tesseract-js-part-1-image-to-text-cb13f9a3c36d?source=rss-fc0de19a2aa3------2</link>
            <guid isPermaLink="false">https://medium.com/p/cb13f9a3c36d</guid>
            <category><![CDATA[low-code]]></category>
            <category><![CDATA[how-to]]></category>
            <category><![CDATA[mendix]]></category>
            <category><![CDATA[ocr]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Vignesh Rajan]]></dc:creator>
            <pubDate>Thu, 19 Jan 2023 12:09:23 GMT</pubDate>
            <atom:updated>2023-03-14T10:02:17.217Z</atom:updated>
            <content:encoded><![CDATA[<h4>Optical character recognition or optical character reader (OCR) is the electronic or mechanical conversion of images of typed, handwritten, or printed text into machine-encoded text — whether from a scanned document, a photo of a document, or a scene photo.</h4><figure><img alt="OCR in Mendix using Tesseract.js Part 1: Image-to-Text (Banner Image) — A futuristic city, seen through the window of a spaceship, which is shaped like a Tesseract" src="https://cdn-images-1.medium.com/max/1024/1*boTHJdmcOX8D2Gc99CF-sw.png" /><figcaption>OCR in Mendix using Tesseract.js Part 1: Image-to-Text — A futuristic city, seen through the window of a spaceship, which is shaped like a Tesseract</figcaption></figure><h4>To better understand how OCR works, see the diagram process in the following picture. From the end-user side, the OCR process is simple — just process the image and then receive the editable text in return.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/455/1*kMaKpkkVgJ_c2J3U-dJgPQ.jpeg" /></figure><blockquote><a href="https://tesseract.projectnaptha.com/">Tesseract.js</a> is a javascript port of the famous <a href="https://github.com/tesseract-ocr/tesseract">Tesseract OCR engine</a> and it is an optical character recognition engine for various operating systems. It is free software, released under the Apache License and development has been sponsored by Google since 2006. <a href="https://en.wikipedia.org/wiki/Tesseract_(software)">[source]</a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*zzK47JwU50LF003_Jl_KOw.jpeg" /></figure><h3><strong>How to use Tessearct.js in Mendix</strong></h3><h4><strong>Prerequisites:</strong></h4><p>Community commons -<a href="https://marketplace.mendix.com/link/component/205247"><strong>https://marketplace.mendix.com/link/component/205247</strong></a></p><h4><strong>Implementation:</strong></h4><p>In this blog, I’ll show you how to use Tesseract.js to add OCR to your Mendix application.</p><ol><li>Use ‘SUB_GetBase64Image’ to convert image to base64 where base64 Java action is used and pass it to ‘JS_ImageOCR javascript’ action:</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/673/1*4DO5pUoI0ykYUSLvUiibWA.png" /></figure><p>2) Select Load Language and Initialize Language:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*NJiKSqDYhYsHfBc-QS7Q6g.png" /></figure><p>3)<strong> Result — </strong>Fetch text from an image as string type:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/248/1*jn6DT4HRFApDB2Rlhs3Vnw.png" /><figcaption>Image used in application</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lolPGCFQ4EFdDnwnpGh7PA.png" /></figure><h4><strong>Code explanation</strong></h4><p>1) Import tesseract.js and buffer:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/601/1*pEXiPzjtQIMHp9KqN1xPAw.png" /></figure><p>2) Initialize And Run Tesseract:</p><p>A Worker helps you to do the OCR-related tasks. It takes a few steps to set up a Worker before it is fully functional, though. The full flow is:</p><p>· FS functions // optional</p><p>· loadLanguauge</p><p>· initialize</p><p>· set Parameters // optional</p><p>· recognize or detect</p><p>· terminate</p><p>Each function is async, so using async/await or Promise is required. When it is resolved, you get a TesseractJob object.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/898/1*2FX2iQIKG-G1_nONaj0dzQ.png" /></figure><p><strong>a) Worker.loadLanguage(langs):</strong></p><p>Worker.loadLanguage() loads trained data from the cache or downloads trained data remotely and puts trained data into the WebAssembly file system.</p><p><strong>Arguments:</strong></p><p>langs is a string to indicate the languages trained data to download, multiple languages are concatenated with +, ex: eng+chi_tra</p><p><strong>b) Worker.initialize(langs):</strong></p><p>Worker.initialize() initializes the Tesseract API and makes sure it is ready for doing OCR tasks.</p><p><strong>Arguments:</strong></p><p>langs is a string to indicate the languages loaded by Tesseract API, it can be the subset of the language-trained data you loaded from Worker.loadLanguage.</p><p><strong>c) Worker.recognize(image):</strong></p><p>Worker.recognize() provides the core function of Tesseract.js as it executes OCR. Figures out what words are in the image, where the words are in the image, etc.</p><p>Note: Images should be sufficiently high resolution. Often, the same image will get much better results if you upscale it before calling recognize.</p><p><strong>Arguments:</strong></p><p>Image — see <a href="https://github.com/naptha/tesseract.js/blob/master/docs/image-format.md">Image Format</a> for more details.</p><p><strong>Examples:</strong></p><p><a href="https://github.com/naptha/tesseract.js/blob/master/docs/examples.md">https://github.com/naptha/tesseract.js/blob/master/docs/examples.md</a></p><p><strong>Supported File Types</strong></p><p>These are the supported image types from Tesseract that their engine can read:</p><p>1. JPG</p><p>2. PNG</p><p>3. PNM</p><p>4. TIFF</p><h4><strong>Features:</strong></h4><p>• It supports multiple languages, check <a href="https://tesseract-ocr.github.io/tessdoc/Data-Files#data-files-for-version-400-november-29-2016">here</a> for a complete list of supported languages.</p><p>• The accuracy is high with normal fonts and clear background.</p><h4><strong>Limitations:</strong></h4><p>• Accuracy will be low with noisy backgrounds and custom-scripted fonts.</p><p>• Tesseract doesn’t support all file formats by itself.</p><p>• The image quality must reach a certain threshold of Dots per Inch (DPI) points for it to work.</p><h4><strong>Conclusion:</strong></h4><p>After having fun with Tesseract OCR, I can say that the engine is amazing!</p><p>It brings the power of OCR to the browser and opens a door of opportunities for developers. Here is a list of the most interesting points on Tesseract in my opinion:</p><p>1. It&#39;s open source.</p><p>2. Very easy to use.</p><p>3. Good extraction results.</p><p>4. Supports multiple languages.</p><p>If you are facing some issues and think OCR is your solution, Tesseract would be a great solution! I hope this article is useful for you — thank you!!</p><h4>Read more</h4><ul><li><a href="https://github.com/tesseract-ocr/tesseract">GitHub - tesseract-ocr/tesseract: Tesseract Open Source OCR Engine (main repository)</a></li><li><a href="https://tesseract-ocr.github.io/">Tesseract documentation</a></li><li><a href="https://tesseract-ocr.github.io/tessdoc/#api-examples">Tesseract User Manual</a></li></ul><p><em>From the Publisher -</em></p><p><em>If you enjoyed this article you can find more like it on our </em><a href="https://medium.com/mendix"><em>Medium page</em></a><em>. For great videos and live sessions, you can go to </em><a href="https://www.mendix.com/live/"><em>MxLive</em></a><em> or our community </em><a href="https://www.youtube.com/c/MendixCommunity/community"><em>Youtube pag</em></a><em>e.</em></p><p><em>For the makers looking to get started, you can sign up for a </em><a href="https://signup.mendix.com/link/signup/?source=direct"><em>free account</em></a><em>, and get instant access to learning with our </em><a href="https://academy.mendix.com/link/home"><em>Academy</em></a><em>.</em></p><p><em>Interested in getting more involved with our community? Join us in our </em><a href="https://join.slack.com/t/mendixcommunity/shared_invite/zt-hwhwkcxu-~59ywyjqHlUHXmrw5heqpQ"><em>Slack community channel</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cb13f9a3c36d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/mendix/ocr-in-mendix-using-tesseract-js-part-1-image-to-text-cb13f9a3c36d">OCR in Mendix using Tesseract.js Part 1: Image-to-Text</a> was originally published in <a href="https://medium.com/mendix">Mendix Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>