Skip to content
Riya M Roy edited this page Sep 19, 2018 · 7 revisions

Short Name

Snap & translate text in images

Short Description

Build a hybrid mobile app that can capture an image, recognize and translate text using Tesseract OCR & Watson Language Translator

Offering Type

AI

Introduction

Built for developers who are looking to recognize text from images and translate it, this pattern shows how to capture an image, extract and translate text using Tesseract OCR & Watson Language Translator.

Author

By Riya Mary Roy and Sanjeev Ghimire

Code

https://github.com/IBM/snap-and-translate

Demo

N/A

Video

TODO

Overview

In this Code Pattern, we will create a hybrid mobile app using Apache Cordova and Node.js server application running on IBM Cloud Kubernetes service that uses Tesseract OCR to recognize text in images, Watson Language Translator to translate the recognized text and Watson Natural Language Understanding to extract emotion,sentiment from the text. This mobile app translates the recognized text from the images captured or uploaded from the photo album.

When the reader has completed this Code Pattern, they will understand how to:

  • Use the Cordova mobile framework to build and deploy mobile app.
  • Create Node.js apps that capture, recognize and translate text using Watson services.
  • Deploy Tesseract OCR on IBM Cloud Kubernetes service to recognize text and bind Watson service to cluster.
  • Translate recognized text using Watson Language Translator.
  • Extract sentiment, emotion from the text using Watson Natural Language Understanding.

Flow

Architecture diagram

  1. The user interacts with the mobile app and captures an image or selects an image from the photo album.
  2. The image is passed to the Node.js server application that is running on IBM Cloud Kubernetes service which uses Tesseract OCR to recognize text in an image.
  3. Node.js app uses Watson language translator service to translate the recognized text and Watson Natural Language Understanding to return the sentiment & emotion of the translated text.
  4. Recognized text, translated language, sentiment and emotion result is returned to the mobile app for display.

Included components

  • IBM Cloud Container Service: IBM Bluemix Container Service manages highly available apps inside Docker containers and Kubernetes clusters on the IBM Cloud.
  • Watson Language Translator: IBM Watson Language Translator is a service that enables you to dynamically translate news, patents or conversational documents.
  • Watson Natural Language Understanding: An IBM Cloud service that can analyze text to extract meta-data from content such as concepts, entities, keywords, categories, sentiment, emotion, relations, semantic roles, using natural language understanding.

Featured technologies

  • Apache Cordova: An an open-source mobile development framework to build hybrid mobile apps.
  • Node.js: An open-source JavaScript run-time environment for executing server-side JavaScript code.
  • Tesseract OCR: An open-source Optical Character Recognition(OCR) engine.

Blog

https://developer.ibm.com/announcements/snap-translate-using-tesseract-ocr-watson-language-translator/

Links