You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Insert a [`VideoCaptureDevice`] operator. Set the `Index` property to the right camera.
60
60
- Insert a [`Crop`] transform.
61
61
- Run the workflow and set the `RegionOfInterest` property to a small area around the LED.
62
62
@@ -124,10 +124,31 @@ To better understand what each parameter controls, try the following modificatio
124
124
>[!TIP]
125
125
> If your cameras support external triggering, you can use pulse trains to trigger frame capture. Recording the same pulse train on a digital input with the `Hobgoblin` allows you to have hardware timestamped images that are automatically aligned with other acquired data.
126
126
127
+
### Exercise 4: Triggering a digital line based on region of interest activity
- Insert a [`VideoCaptureDevice`] operator. Set the `Index` property to the right camera.
134
+
- Insert a [`Crop`] transform.
135
+
- Run the workflow and set the `RegionOfInterest` property to specify the desired area.
136
+
- Insert a [`Grayscale`] and a [`Threshold`] transform (or the color segmentation operators).
137
+
- Insert a [`Sum`] transform, and select the `Val0` field from the output.
138
+
- Insert a [`GreaterThan`] transform and configure the `Value` property to an appropriate threshold. Remember you can use the visualizers to see what values are coming through the [`Sum`] and what the result of the [`GreaterThan`] operator is.
139
+
- Insert a [`CreateMessage`] operator, select [`DigitalOutputSetPayload`] for the `Payload`, and `GP15` for the [`DigitalOutputSet`] property.
140
+
- Insert a [`MulticastSubject`] operator and configure the `Name` property to `Hobgoblin Commands`.
141
+
- Run the workflow and verify that entering the region of interest turns on the LED.
142
+
-**Optional:** Replace the [`Crop`] transform by a [`CropPolygon`] to allow for non-rectangular regions.
143
+
144
+
> [!Note]
145
+
> The [`CropPolygon`] operator uses the `Regions` property to define multiple, possibly non-rectangular regions. The visual editor is similar to [`Crop`], where you draw a rectangular box. However, in [`CropPolygon`] you can move the corners of the box by right-clicking _inside_ the box and dragging the cursor to the new position. You can add new points by double-clicking with the left mouse button, and delete points by double-clicking with the right mouse button. You can delete regions by pressing the `Del` key and cycle through selected regions by pressing the `Tab` key.
0 commit comments