activities
latest
false
UiPath logo, featuring letters U and I in white
Classic Integrations Activities
Last updated Nov 8, 2024

Quickstart - Detect Text

Overview

The purpose of this guide is to help you create a working sample of the Detect Text activity. This working sample enables you to quickly verify the connection to your AWS account and get familiar with the activity's input/output datatypes.

By completing the steps in this guide, you'll have an automation sequence that does the following:

  1. Establishes a connection to your AWS account and Amazon Rekognition services via the Amazon Scope activity.
  2. Detects text in an image and returns an array of words and lines via the Detect Text activity.
  3. Tests the Detect Text input/output properties via the For Each and Write Line activities.


Prerequisites

Before you begin:

  1. Complete the Amazon Rekognition Setup steps.
  2. Create a new automation project.
    1. Open UiPath Studio.
    2. Under New Project, click Process (this opens a New Blank Process window).
    3. Enter a project Name, Location, and Description.
    4. Click Create.


  3. Install the UiPath.Amazon.Scope.Activities and UiPath.Amazon.Rekognition.Activities packages.
    1. In the Design ribbon, click Manage Packages (this opens the Manage Packages window).
    2. Under All Packages, click Go!
    3. In the Search bar, enter Amazon.
    4. Click, install and accept the license for both the UiPath.Amazon.Scope.Activities and UiPath.Amazon.Rekognition.Activities.
      • For more information about Uipath Studio packages, see Managing Packages in the Studio Guide.


Steps

Build Your Project
  1. Add the Amazon Scope activity to your project.
  2. Add the Detect Text activity after the Amazon Scope activity.
  3. Enter the ImagePath or ImageURL of the image that contains the text you want to detect.
  4. Create and enter two TextElement[] variables for your Words and Lines properties.
    • When creating your variable, select the UiPath.Amazon.Rekognition.Models.TextElement[] variable type.


Test Your Project
  1. To test the Detect Text activity, add a For Each with a Write Line activity.
  2. To distinguish the output properties in in the output window, add a Write Line activity after the Detect Text activity (.e.g, "The words in the image: ")
  3. Add aFor Each activity after the Write Line activity.
    1. In the TypeArgument property, select UiPath.Amazon.Rekognition.Models.TextElement.
    2. In the Values property, enter the Words property TextElement[] variable you created in step 2 above.
    3. In the Text property, enter item.Text+ " : " +item.Confidence.ToString to return a list of all words detected, along with their confidence level.
  4. Add another Write Line activity after the For Each activity (.e.g, "The lines in the image: ")
  5. Add another For Each activity after the Write Line activity.
    1. In the TypeArgument property, select UiPath.Amazon.Rekognition.Models.TextElement.
    2. In the Values property, enter the Lines property TextElement[] variable you created in step 2 above.
    3. In the Text property, enter item.Text+ " : " +item.Confidence.ToString to return a list of the lines detected, along with their confidence level.
  6. Click Run and verify the Output window includes the face detail values you entered in the Write Line activities.


You're done!

When you're ready, try the other Quickstart guides to get more familiar with the different Amazon Rekognition ativities.

To learn more about the other Amazon Rekognition activities, see the Activities page for a complete activity list and links to the activity detail pages.

  • Overview
  • Prerequisites
  • Steps

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.