Class Ocr

java.lang.Object
com.workfusion.rpa.helpers.Ocr

public class Ocr extends Object
This class adds methods for work with ocr.
Sample
proccessImage(apiBaseUrl, image)

Driver Type: Desktop

  • Method Details

    • proccessImage

      public static String proccessImage(String apiBaseUrl, byte[] image)
      Proccess image and return text from image as string.

      Driver Type: Desktop

      Parameters:
      apiBaseUrl - string representation url to ocr service
      image - byte array representation image
      Returns:
      string representation text from image.
    • proccessImage

      public static String proccessImage(String apiBaseUrl, String language, byte[] image)
      Proccess image and return text from image as string.

      Driver Type: Desktop

      Parameters:
      apiBaseUrl - string representation url to ocr service
      language - string representation language to ocr service
      image - byte array representation image
      Returns:
      string representation text from image.
    • proccessImage

      public static String proccessImage(String jwtSecret, String jwtIssue, String apiBaseUrl, byte[] image)
      Proccess image and return text from image as string.

      Driver Type: Desktop

      Parameters:
      jwtSecret - string representation of secret key for authorization to Ocr service
      jwtIssue - string representation of claim name for authorization to Ocr service
      apiBaseUrl - string representation url to ocr service
      image - byte array representation image
      Returns:
      string representation text from image.
    • proccessImage

      public static String proccessImage(String apiBaseUrl, int x, int y, int width, int height) throws IOException, AWTException
      Proccess image and return text from image as string.

      Driver Type: Desktop

      Parameters:
      apiBaseUrl - string representation url to ocr service
      x - integer representation left upper conner of region
      y - integer representation left upper conner of region
      width - integer representation width of region
      height - integer representation height of region
      Returns:
      string representation text from image.
      Throws:
      IOException
      AWTException
    • proccessImage

      public static String proccessImage(String apiBaseUrl, String language, int x, int y, int width, int height) throws IOException, AWTException
      Proccess image and return text from image as string.

      Driver Type: Desktop

      Parameters:
      apiBaseUrl - string representation url to ocr service
      language - string representation language to ocr service
      x - integer representation left upper conner of region
      y - integer representation left upper conner of region
      width - integer representation width of region
      height - integer representation height of region
      Returns:
      string representation text from image.
      Throws:
      IOException
      AWTException
    • proccessImage

      public static String proccessImage(String jwtSecret, String jwtIssue, String apiBaseUrl, int x, int y, int width, int height) throws IOException, AWTException
      Get image by coordinates and process image and return text from image as string.

      Driver Type: Desktop

      Parameters:
      jwtSecret - string representation of secret key for authorization to Ocr service
      jwtIssue - string representation of claim name for authorization to Ocr service
      apiBaseUrl - string representation url to ocr service
      x - integer representation left upper conner of region
      y - integer representation left upper conner of region
      width - integer representation width of region
      height - integer representation height of region
      Returns:
      string representation text from image.
      Throws:
      IOException
      AWTException
    • proccessImage

      public static String proccessImage(String jwtSecret, String jwtIssue, String apiBaseUrl, String language, byte[] image)
      Proccess image and return text from image as string.

      Driver Type: Desktop

      Parameters:
      jwtSecret - string representation of secret key for authorization to Ocr service
      jwtIssue - string representation of claim name for authorization to Ocr service
      apiBaseUrl - string representation url to ocr service
      language - string representation language to ocr service
      image - byte array representation image
      Returns:
      string representation text from image.
    • proccessImage

      public static String proccessImage(String jwtSecret, String jwtIssue, String apiBaseUrl, String language, int x, int y, int width, int height) throws IOException, AWTException
      Get image by coordinates and process image and return text from image as string.

      Driver Type: Desktop

      Parameters:
      jwtSecret - string representation of secret key for authorization to Ocr service
      jwtIssue - string representation of claim name for authorization to Ocr service
      apiBaseUrl - string representation url to ocr service
      language - string representation language to ocr service
      x - integer representation left upper conner of region
      y - integer representation left upper conner of region
      width - integer representation width of region
      height - integer representation height of region
      Returns:
      string representation text from image.
      Throws:
      IOException
      AWTException