Location
Parameter Location
defines the location of the TargetROI with reference objects
filter conditions and offset
parameters.
Example
{
"Location":
{
"ReferenceObjectFilter" :
{
"ReferenceTargetROIDefNameArray": ["TR_0", "TR_1"],
"AtomicResultTypeArray" : ["ART_TEXT_LINE","ART_BARCODE","ART_FRAME","ART_TABLE_CELL"],
"ReferenceTaskNameArray": ["A_task"],
"BarcodeFilteringCondition":
{
"BarcodeFormatIds": ["BF_CODE39"],
"BarcodeTextRegExPattern": ".*b.*b.*b.*",
"RegionState": "default"
},
"FrameFilteringCondition":
{
"ImageDimensionRange": [16384,0x7fffffff],
"AspectRatioRange": [1, 10000],
"WidthRange": [1, 0x7fffffff],
"HeightRange": [1, 0x7fffffff],
"RegionState": "default"
},
"TableCellFilteringCondition":
{
"RowNumbers": "1,3,5",
"ColNumbers": "1",
"RegionState": "default"
},
"TextLineFilteringCondition":
{
"LineNumbers": "1,3-5",
"LineStringRegExPattern": "Sodium[(\w| )]*",
"RegionState": "default"
}
},
"Offset": {
"ReferenceObjectOriginIndex": 0,
"ReferenceObjectType": "ROT_ATOMIC_OBJECT",
"MeasuredByPercentage" : 1,
"FirstPoint" : [ 0, 0 ],
"SecondPoint" : [ 100, 0 ],
"ThirdPoint" : [ 100, 100 ],
"FourthPoint" : [ 0, 100 ]
}
}
}
Parameter Summary
ReferenceObjectFilter
Parameter ReferenceObjectFilter
is a group of filter conditions for figuring out the reference objects
.
ReferenceTargetROIDefNameArray
Filter the reference object by specifying TargetROI
names.
ReferenceTargetROIDefNameArray Parameter Summary |
---|
Type String[] |
Range Each member should be a name of TargetROI that defined in TargetROIDefOptions . |
Default Value null |
AtomicResultTypeArray
Filter the reference object by specifying the type of atomic results. In the TargetROIs
algorithm task can produce atomic results that can support the localization of the other TargetROIs
.
AtomicResultTypeArray Parameter Summary |
---|
Type String[] |
Range Each member should be one of the AtomicResultType , which are ART_TEXT_LINE , ART_BARCODE , ART_FRAME , ART_TABLE_CELL , ART_GEOMETRY_LINE , ART_CORNER and ART_COLOUR_REGION |
Default Value [“ART_TEXT_LINE”,”ART_BARCODE”,”ART_FRAME”] |
ReferenceTaskNameArray
Filter the reference object by specifying the reference task name array.
AtomicResultTypeArray Parameter Summary |
---|
Type String[] |
Range Each member should be one of the task in the reference TargetROIDef object array. |
Default Value null |
BarcodeFilteringCondition
One of the filter conditions. Filter the reference objects with the decoded barcode information. The parameter BarcodeFilteringCondition
includes the following child parameters:
Child Parameter Name | Child Parameter Summary |
---|---|
BarcodeFormatIds | Description Filter the reference objects by the barcode formats. |
Type String[] |
|
Range Each member of the array should be one of the BarcodeFormatIds as a string. |
|
Default Value |
|
BarcodeTextRegExPattern | Description Filter the reference objects by the barcode text with a RegEx string. |
Type String |
|
Default Value "" |
FrameFilteringCondition
One of the filter conditions. Filter the reference objects with the frame information. The parameter FrameFilteringCondition
includes the following child parameters:
Child Parameter Name | Child Parameter Summary |
---|---|
ImageDimensionRange | Description Filter the reference objects by the dimension of their original images. |
Type int[2] |
|
Default Value [16384,0x7fffffff] |
|
AspectRatioRange | Description Filter the reference objects by the aspect ratio of their original images. Aspect Ratio = BoundingRectHeight/BoundingRectWidth * 100 [MinAspectRatio, MaxAspectRatio] |
Type int[2] |
|
Default Value [1, 10000] |
|
WidthRange | Description Filter the reference objects by the width of their original images. |
Type int[2] |
|
Default Value [1, 0x7fffffff] |
|
HeightRange | Description Filter the reference objects by the height of their original images. |
Type int[2] |
|
Default Value [1, 0x7fffffff] |
TextLineFilteringCondition
One of the filter conditions. Filter the reference objects with the text line content. The parameter TextLineFilteringCondition
includes the following child parameters:
Child Parameter Name | Child Parameter Summary |
---|---|
LineNumbers | Description Filter the reference objects by the line numbers. |
Type String |
|
Range A string of one or more of the following data, separated by commas: 1. One int value which represents a specified line index; 2. One Expression, start index and stop index connected with ""-"", which represents a specified line index range. |
|
Default Value "" |
|
Remarks (1) The value is 1-based. (2) "" represents all lines. (3) The processed of the not specified text lines will implement the default settings. (4) If the line number you specified doesn't exist, the library will ignore it. |
|
LineStringRegExPattern | Description Filter the reference objects by the content of the text line with a RegEx string. |
Type String |
|
Default Value "" |
Offset
Parameter Offset
is an object that defines how the location is offset from the reference object
or the original image. It includes the following child parameters:
- ReferenceObjectOriginIndex
- ReferenceObjectType
- ReferenceXAxis
- ReferenceYAxis
- MeasuredByPercentage
- FirstPoint
- SecondPoint
- ThirdPoint
- FourthPoint
ReferenceObjectOriginIndex
Defines which point of the reference object will be set as the origin of the coordinate system.
ReferenceObjectOriginIndex Parameter Details |
---|
Type int |
Value Range [0,3] |
Default Value 0 |
ReferenceObjectType
Defines which coordinate system to use when configuring offset parameters basd on the reference objects.
ReferenceObjectType Parameter Details |
---|
Type String |
Value Range “ROT_ATOMIC_OBJECT” or “ROT_WHOLE_IMAGE” |
Default Value “ROT_ATOMIC_OBJECT” |
ReferenceXAxis
Defines the x-axis of the coordinate system to use when configuring offset parameters basd on the reference objects. It includes the following child parameters:
Child Parameter Name | Child Parameter Details |
---|---|
AxisType |
Description The type of the axis. |
Type String |
|
Value Range "AT_MIDPOINT_EDGE", "AT_EDGE", or "AT_ROTATION_OTHER_AXIS" "AT_MIDPOINT_EDGE": Indicates connecting the midpoints of the reference object's opposite edges as the axis. "AT_EDGE": Indicates using one of the reference object's edges as the axis. "AT_ROTATION_OTHER_AXIS": Indicates deriving the current axis by rotating another reference axis. |
|
Default Value "AT_MIDPOINT_EDGE" |
|
EdgeIndex |
Description Define which edge of the reference object will be set as the x-axis of the coordinate system. |
Type int |
|
Value Range 0, 1, 2, 3 |
|
Default Value 0 |
|
Remarks Valid only when `AxisType` is "AT_EDGE"</b> |
|
RotationAngle |
Description The counterclockwise rotation angle used to rotate the reference axis. |
Type int |
|
Value Range [0, 180] |
|
Default Value 90 |
|
RemarksValid only when `AxisType` is "AT_ROTATION_OTHER_AXIS".</b> | |
LengthReference |
Description Defines the measurement benchmark. |
Type String |
|
Value Range "LR_X", "LR_Y" "LR_X": Indicates using the x-axis edge length as the standard length within the coordinate system. "LR_Y": Indicates using the y-axis edge length as the standard length within the coordinate system . |
|
Default Value "LR_X" |
|
Remarks Valid only when `AxisType` is "AT_MIDPOINT_EDGE" or "AT_EDGE"</b> |
ReferenceYAxis
Defines the y-axis of the coordinate system to use when configuring offset parameters basd on the reference objects. It includes the following child parameters:
Child Parameter Name | Child Parameter Details |
---|---|
AxisType |
Description The type of the axis. |
Type String |
|
Value Range "AT_MIDPOINT_EDGE", "AT_EDGE", or "AT_ROTATION_OTHER_AXIS" "AT_MIDPOINT_EDGE": Indicates connecting the midpoints of the reference object's opposite edges as the axis. "AT_EDGE": Indicates using one of the reference object's edges as the axis. "AT_ROTATION_OTHER_AXIS": Indicates deriving the current axis by rotating another reference axis. |
|
Default Value "AT_MIDPOINT_EDGE" |
|
EdgeIndex |
Description Define which edge of the reference object will be set as the y-axis of the coordinate system. |
Type int |
|
Value Range 0, 1, 2, 3 |
|
Default Value 1 |
|
Remarks Valid only when `AxisType` is "AT_EDGE"</b> |
|
RotationAngle |
Description The clockwise rotation angle used to rotate the reference axis. |
Type int |
|
Value Range [0, 180] |
|
Default Value 90 |
|
RemarksValid only when `AxisType` is "AT_ROTATION_OTHER_AXIS".</b> | |
LengthReference |
Description Defines the measurement benchmark. |
Type String |
|
Value Range "LR_X", "LR_Y" "LR_X": Indicates using the x-axis edge length as the standard length within the coordinate system. "LR_Y": Indicates using the y-axis edge length as the standard length within the coordinate system . |
|
Default Value "LR_Y" |
|
Remarks Valid only when `AxisType` is "AT_MIDPOINT_EDGE" or "AT_EDGE"</b> |
MeasuredByPercentage
Sets whether or not to use percentage to measure the points’ coordinates.
MeasuredByPercentage Parameter Details |
---|
Type int |
Range 0 or 1 |
Default Value 1 |
Remarks 0: not by percentage 1: by percentage |
FirstPoint
Specifies the top-left vertex of the ROI with two possible expression forms:
[X, Y]
: Represents the coordinates on the x and y axes. The expression in percentage for x and y is determined by parameterMeasuredByPercentage
.[X, Y, MeasuredXByPercentage, MeasuredYByPercentage]
: Includes independent control over whether the values for x and y are expressed in percentage.MeasuredXByPercentage
determines if the x-value is in percentage, andMeasuredYByPercentage
controls the y-value.
FirstPoint Parameter Details |
---|
Type int[2] or int[4] |
Default Value null |
SecondPoint
Specifies the top-right vertex of the ROI with two possible expression forms:
[X, Y]
: Represents the coordinates on the x and y axes. The expression in percentage for x and y is determined by parameterMeasuredByPercentage
.[X, Y, MeasuredXByPercentage, MeasuredYByPercentage]
: Includes independent control over whether the values for x and y are expressed in percentage.MeasuredXByPercentage
determines if the x-value is in percentage, andMeasuredYByPercentage
controls the y-value.
FirstPoint Parameter Details |
---|
Type int[2] or int[4] |
Default Value null |
ThirdPoint
Specifies the bottom-right vertex of the ROI with two possible expression forms:
[X, Y]
: Represents the coordinates on the x and y axes. The expression in percentage for x and y is determined by parameterMeasuredByPercentage
.[X, Y, MeasuredXByPercentage, MeasuredYByPercentage]
: Includes independent control over whether the values for x and y are expressed in percentage.MeasuredXByPercentage
determines if the x-value is in percentage, andMeasuredYByPercentage
controls the y-value.
FirstPoint Parameter Details |
---|
Type int[2] or int[4] |
Default Value null |
FourthPoint
Specifies the bottom-left vertex of the ROI with two possible expression forms:
[X, Y]
: Represents the coordinates on the x and y axes. The expression in percentage for x and y is determined by parameterMeasuredByPercentage
.[X, Y, MeasuredXByPercentage, MeasuredYByPercentage]
: Includes independent control over whether the values for x and y are expressed in percentage.MeasuredXByPercentage
determines if the x-value is in percentage, andMeasuredYByPercentage
controls the y-value.
FirstPoint Parameter Details |
---|
Type int[2] or int[4] |
Default Value null |