public class RecognitionBlock
extends java.lang.Object
This factory creates objects of type IRecognitionBlock
. This has a set of static methods for creating objects from different input data.
IRecognitionBlock rectangleRecognitionBlock = RecognitionBlock.fromRectangle(0, 0, 100, 200); IRecognitionBlock pageRecognitionBlock = RecognitionBlock.fromPageBlock(4); IRecognitionBlock pageRecognitionBlock2 = RecognitionBlock.fromPageBlock(7, rectangleRecognitionBlock);
Constructor and Description |
---|
RecognitionBlock() |
Modifier and Type | Method and Description |
---|---|
static IRecognitionBlock |
fromRectangle(int x,
int y,
int width,
int height)
Creates a block for recognize rectangular area.
|
static IRecognitionBlock |
fromRectanglePicture(int x,
int y,
int width,
int height)
Creates a picture block for rectangular area.
|
public static IRecognitionBlock fromRectangle(int x, int y, int width, int height)
Creates a block for recognize rectangular area.
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.IRecognitionBlock
.ArgumentException
- x
is less than 0ArgumentException
- y
is less than 0ArgumentException
- width
is less than or equal to 0ArgumentException
- height
is less than or equal to 0public static IRecognitionBlock fromRectanglePicture(int x, int y, int width, int height)
Creates a picture block for rectangular area. This block will not recognize.
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.IRecognitionBlock
.ArgumentException
- x
is less than 0ArgumentException
- y
is less than 0ArgumentException
- width
is less than or equal to 0ArgumentException
- height
is less than or equal to 0