Skip to content

Commit 0d9e162

Browse files
update output-condition.md
1 parent e6e00bb commit 0d9e162

File tree

1 file changed

+86
-56
lines changed

1 file changed

+86
-56
lines changed

parameters/reference/output-task-setting/output-condition.md

Lines changed: 86 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,19 @@ layout: default-layout
33
title: OutputCondition - Dynamsoft Capture Vision OutputSetting Object
44
description: The parameter OutputCondition of OutputSetting object defines the OutputCondition information of the ROIs.
55
keywords: OutputCondition
6-
needAutoGenerateSidebar: true
7-
noTitleIndex: true
8-
needGenerateH3Content: true
9-
permalink: /parameters/reference/output-task-setting/output-condition.html
106
---
117

128
# OutputCondition
139

14-
The parameter `OutputCondition` defines how the [`OutputTaskSetting`](../../file/task-settings/output-task-setting.md) object outputs results that satisfy multiple filter conditions across products.
10+
## Overview
11+
12+
The parameter `OutputCondition` defines how the [`OutputTaskSetting`](../../file/task-settings/output-task-setting.md) object outputs results that satisfy multiple filter conditions across products. It allows you to configure complex filtering logic by combining results from multiple tasks and TargetROIDef objects using logical operators (AND/OR).
13+
14+
**Use Cases:**
15+
- Filter outputs based on conditions from descendant TargetROIDef tasks
16+
- Combine results from multiple processing tasks with logical operators
17+
- Reference specific atomic result types from previous tasks
18+
1519
## JSON Structure
1620

1721
**Location in template:**
@@ -43,6 +47,14 @@ OutputTaskSettingOptions[i]
4347
}
4448
```
4549

50+
**Example Explanation:**
51+
52+
This configuration filters output results where:
53+
- The top-level `Operator` is "AND", requiring all conditions in `TaskResultArray` to be met
54+
- Results from task "B_task" on TargetROIDef "B" must exist
55+
- These results must have backward references to task "A_task"
56+
- The referenced results must be one of the specified atomic result types (text lines, barcodes, frames, table cells, or color regions)
57+
4658
> [!NOTE]
4759
> - This snippet shows only the `OutputCondition` parameter.
4860
> - To use it, embed this parameter within a [OutputTaskSetting]({{ site.dcvb_parameters }}file/task-settings/output-task-setting.html) object.
@@ -53,81 +65,99 @@ OutputTaskSettingOptions[i]
5365

5466
## Parameter Details
5567

56-
### Operator
68+
### Operator (Top-Level)
5769

58-
The parameter `Operator` defines the type of filtered combination of results from multiple tasks within a `TargetROIDef` object or across multiple `TargetROIDef` objects.
70+
The top-level `Operator` parameter defines how to combine the conditions from multiple items in the `TaskResultArray`.
5971

6072
| Operator Parameter Details |
6173
| :------------------- |
6274
| **Type**<br>*String* |
6375
| **Range**<br>One of the following values: "OR", "AND" |
6476
| **Default Value**<br>"AND"|
6577

78+
**Explanation:**
79+
- **"AND"**: All conditions in `TaskResultArray` must be satisfied
80+
- **"OR"**: At least one condition in `TaskResultArray` must be satisfied
81+
6682
### TaskResultArray
6783

68-
The parameter `TaskResultArray` configures multiple tasks of descendant `TargetROIDef` objects to filter out the results of the tasks of the reference `TargetROIDef`.
84+
The parameter `TaskResultArray` is an array that configures multiple filtering conditions based on tasks from descendant `TargetROIDef` objects. Each array element represents one filtering condition.
85+
86+
**Type:** Array of objects
87+
88+
Each object in the array contains the following parameters:
6989

7090
#### TargetROIDefName
7191

72-
The parameter `TargetROIDefName` configures the name of descendant `TargetROIDef` object.
92+
Specifies the name of the descendant `TargetROIDef` object to reference.
7393

7494
| TargetROIDefName Parameter Details |
7595
| :------------------- |
7696
| **Type**<br>*String* |
77-
| **Range**<br>One of the names of descendant `TargetROIDef` object |
78-
| **Default Value**<br>mandatory|
97+
| **Range**<br>Must be one of the descendant `TargetROIDef` object names defined in your template |
98+
| **Default Value**<br>Mandatory (no default)|
7999

80100
#### TaskSettingNameArray
81101

82-
The parameter `TaskSettingNameArray` specifies the task name array on the descendant `TargetROIDef` object.
102+
Specifies which tasks on the descendant `TargetROIDef` object to check for results.
83103

84104
| TaskSettingNameArray Parameter Details |
85105
| :------------------- |
86-
| **Type**<br>*String[]* |
87-
| **Range**<br>Each member of the array should be one of the task in the descendant `TargetROIDef` object. |
106+
| **Type**<br>*String[]* (Array of strings) |
107+
| **Range**<br>Each member must be a valid task name in the specified descendant `TargetROIDef` object |
88108
| **Default Value**<br>null|
89109

110+
#### Operator (Task-Level)
111+
112+
Defines how to combine multiple task results within this specific condition.
113+
114+
| Operator Parameter Details |
115+
| :------------------- |
116+
| **Type**<br>*String* |
117+
| **Range**<br>One of the following values: "OR", "AND" |
118+
| **Default Value**<br>"AND"|
119+
120+
**Note:** This is different from the top-level `Operator`. The task-level operator combines results within a single `TaskResultArray` item, while the top-level operator combines across multiple array items.
121+
90122
#### BackwardReferenceOutput
91123

92-
<table style = "text-align:left">
93-
<thead>
94-
<tr>
95-
<th nowrap="nowrap">Child Parameter Name</th>
96-
<th nowrap="nowrap">Child Parameter Summary</th>
97-
</tr>
98-
</thead>
99-
<tr>
100-
<td rowspan = "4" style="vertical-align:text-top">ReferenceTaskNameArray</td>
101-
<td><b>Description</b><br>Specifies the task name array on the `TargetROIDef` object.
102-
</td>
103-
</tr>
104-
<tr>
105-
<td><b>Type</b><br><i>String[]</i>
106-
</td>
107-
</tr>
108-
<tr>
109-
<td><b>Range</b><br>Each member of the array should be one of the task in the reference `TargetROIDef` object.
110-
</td>
111-
</tr>
112-
<tr>
113-
<td><b>Default Value</b><br>null
114-
</td>
115-
</tr>
116-
<tr>
117-
<td rowspan = "4" style="vertical-align:text-top">ReferenceResultTypeArray</td>
118-
<td><b>Description</b><br>Specifies the type of atomic results produced by tasks (except OutputTask) on the `TargetROIDef` object.
119-
</td>
120-
</tr>
121-
<tr>
122-
<td><b>Type</b><br><i>String[]</i>
123-
</td>
124-
</tr>
125-
<tr>
126-
<td><b>Range</b><br>Each member should be one of the `AtomicResultType`, which are `ART_TEXT_LINE`, `ART_BARCODE`, `ART_FRAME` and `ART_COLOUR_REGION`
127-
</td>
128-
</tr>
129-
<tr>
130-
<td><b>Default Value</b><br>["ART_TEXT_LINE","ART_BARCODE","ART_FRAME"]
131-
</td>
132-
</tr>
133-
</table>
124+
Configures backward reference filtering based on results from the reference (parent) `TargetROIDef` object.
125+
126+
##### ReferenceTaskNameArray
127+
128+
Specifies which tasks on the reference `TargetROIDef` object to check for backward references.
129+
130+
| ReferenceTaskNameArray Parameter Details |
131+
| :------------------- |
132+
| **Type**<br>*String[]* (Array of strings) |
133+
| **Range**<br>Each member must be a valid task name in the reference `TargetROIDef` object |
134+
| **Default Value**<br>null|
135+
136+
##### ReferenceResultTypeArray
137+
138+
Specifies which types of atomic results to accept from the referenced tasks.
139+
140+
| ReferenceResultTypeArray Parameter Details |
141+
| :------------------- |
142+
| **Type**<br>*String[]* (Array of strings) |
143+
| **Range**<br>Each member must be one of the following `AtomicResultType` values:<br>- `"ART_TEXT_LINE"`: Text line results<br>- `"ART_BARCODE"`: Barcode results<br>- `"ART_FRAME"`: Frame results<br>- `"ART_TABLE_CELL"`: Table cell results<br>- `"ART_COLOUR_REGION"`: Color region results |
144+
| **Default Value**<br>["ART_TEXT_LINE","ART_BARCODE","ART_FRAME"]|
145+
146+
## Terminology
147+
148+
- **Reference TargetROIDef**: The parent or current `TargetROIDef` object that contains the `OutputTaskSetting` with this `OutputCondition`
149+
- **Descendant TargetROIDef**: Child `TargetROIDef` objects that are referenced in the `TaskResultArray`
150+
- **Backward Reference**: A link from a descendant task result back to a parent task result
151+
152+
## Best Practices
153+
154+
1. **Use meaningful names**: Choose descriptive names for TargetROIDef and task settings to make your configuration easier to understand
155+
2. **Start simple**: Begin with a single condition and "AND" operator, then add complexity as needed
156+
3. **Specify result types**: Explicitly set `ReferenceResultTypeArray` to only include the atomic result types you actually need
157+
4. **Test conditions**: Verify that your filter conditions work as expected with sample data before deploying
158+
159+
## See Also
160+
161+
- [OutputTaskSetting]({{ site.dcvb_parameters }}file/task-settings/output-task-setting.html)
162+
- [TargetROIDef]({{ site.dcvb_parameters }}file/target-roi-definition/index.html)
163+
- [Full JSON Structure]({{ site.dcvb_parameters }}file/index.html#full-json-structure)

0 commit comments

Comments
 (0)