com.aspose.ocr

## Class RecognitionBlock

- java.lang.Object
- - com.aspose.ocr.RecognitionBlock

-     public final class RecognitionBlock
      extends Object

  This factory creates objects of type `IRecognitionBlock`. This has a set of static methods for creating objects from different input data.

  >      IRecognitionBlock textBlock = RecognitionBlock.createTextBlock(0, 0, 100, 200);
  >      IRecognitionBlock pictureBlock = RecognitionBlock.createPictureBlock(0, 0, 100, 200);

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static IRecognitionBlock` | `createPictureBlock(int x, int y, int width, int height)` Creates a picture block for rectangular area.
    `static IRecognitionBlock` | `createTextBlock(int x, int y, int width, int height)` Creates a block for text recognition in rectangular area.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### createPictureBlock

          public static IRecognitionBlock createPictureBlock(int x,
                                             int y,
                                             int width,
                                             int height)

      Creates a picture block for rectangular area. This block will not recognize.

      Parameters:
        `x` - The x-coordinate of the upper-left corner of the rectangle.
        `y` - The y-coordinate of the upper-left corner of the rectangle.
        `width` - The width of the rectangle.
        `height` - The height of the rectangle.
      Returns:
        The instance of `IRecognitionBlock`.
      Throws:
        `IllegalArgumentException` - `x` is less than 0
        `IllegalArgumentException` - `y` is less than 0
        `IllegalArgumentException` - `width` is less than or equal to 0
        `IllegalArgumentException` - `height` is less than or equal to 0

    - #### createTextBlock

          public static IRecognitionBlock createTextBlock(int x,
                                          int y,
                                          int width,
                                          int height)

      Creates a block for text recognition in rectangular area.

      Parameters:
        `x` - The x-coordinate of the upper-left corner of the rectangle.
        `y` - The y-coordinate of the upper-left corner of the rectangle.
        `width` - The width of the rectangle.
        `height` - The height of the rectangle.
      Returns:
        The instance of `IRecognitionBlock`.
      Throws:
        `IllegalArgumentException` - `x` is less than 0
        `IllegalArgumentException` - `y` is less than 0
        `IllegalArgumentException` - `width` is less than or equal to 0
        `IllegalArgumentException` - `height` is less than or equal to 0

Copyright © 2014. All rights reserved.