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
Copy file name to clipboardExpand all lines: docs/tutorials/services/try-viam-color-detection.md
+13-13Lines changed: 13 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -99,7 +99,7 @@ Add the vision service object to the services array in your rover’s raw JSON c
99
99
{{% /tab %}}
100
100
{{< /tabs >}}
101
101
102
-
The configuration adds a `model` of `type``color_detector` with the color as a parameter.
102
+
The configuration adds a model of type `color_detector` with the color as a parameter.
103
103
The `color_detector` is a heuristic-based detector that draws boxes around objects according to their hue.
104
104
105
105
Click **Save config** and head to the **Components** tab.
@@ -113,7 +113,7 @@ Object colors can vary dramatically based on the light source.
113
113
We recommend you verify the desired color detection value under actual lighting conditions.
114
114
To determine the color value from the actual cam component image, you can use a pixel color tool, like [Color Picker for Chrome](https://chrome.google.com/webstore/detail/color-picker-for-chrome/clldacgmdnnanihiibdgemajcfkmfhia).
115
115
116
-
If the color is not reliably detected, increase the `hue_tolerance_pct`.
116
+
If the color is not reliably detected, drag the `Hue Tolerance` slider to the right or navigate to the `Raw JSON` tab to increase the `hue_tolerance_pct`.
117
117
118
118
Note that the detector does not detect black, perfect greys (greys where the red, green, and blue color component values are equal), or white.
119
119
{{< /alert >}}
@@ -128,12 +128,12 @@ To view output from the color detector overlaid on images from a physical camera
128
128
Navigate to the **Components** tab in the Viam app and scroll to the **Create Component** section.
129
129
To create a [transform camera](/components/camera/transform/):
130
130
131
-
1.Enter a name for **Name**, for example `detectionCam`.
132
-
2. Select `camera` as the **Type**.
133
-
3. Select `transform` as the **Model**.
134
-
4.Click **Create Component**.
131
+
1.Click **Create Component**.
132
+
2. Select `camera` as the type.
133
+
3. Select `transform` as the model.
134
+
4.Enter a name for **Name**, for example `detectionCam`, and click **Create**.
135
135
136
-

136
+
{{<imgprocsrc="/tutorials/try-viam-color-detection/create-transform-camera.png"resize="900x"declaredimensions=truealt="The Viam app showing the Create Component panel populated with a camera component. The name is detectionCam, the type is camera, and the model is transform.">}}
137
137
138
138
Viam generates an empty **Attributes** section for the detection camera's component panel.
139
139
The panel's **Attribute Guide** section displays the available attributes for the selected component.
@@ -142,9 +142,9 @@ The panel's **Attribute Guide** section displays the available attributes for th
142
142
Attribute Guides always prefix required attributes with an asterisk.
143
143
{{% /alert %}}
144
144
145
-

145
+
{{<imgprocsrc="/tutorials/try-viam-color-detection/transform-camera-config.png"resize="900x"declaredimensions=truealt="The Viam app showing the detectionCam component section. The Attributes section contains a skeleton configuration, including source, pipeline, type, and attributes. The Attributes Guide section lists the available camera component attributes. There are buttons labeled Data Capture Configuration, and Frame, and a drop-down labeled, Depends On. On the upper right there is a trash bin icon.">}}
146
146
147
-
Copy the following JSON configuration into the Attributes section:
147
+
Copy the following JSON configuration into the **Attributes** section:
@@ -166,16 +166,16 @@ Copy the following JSON configuration into the Attributes section:
166
166
|`source`|`cam`| The name of the physical camera on the rover, which provides the visual feed to get detections from. |
167
167
|`attributes`|| The attributes of this detectionCam. |
168
168
|`attributes.detector_name`|`my_color_detector`| The name of this detectionCam. |
169
-
|`attributes.confidence_threshold`|`0.3` (30%) | The percentage of confidence in the color being present the detection service needs to detect a color. |
169
+
|`attributes.confidence_threshold`|`0.3` (30%) |The percentage of confidence needed by the detection service to identify a color. |
170
170
|`type`|`detections`| The type of the component. |
171
171
172
-

172
+
{{<imgprocsrc="/tutorials/try-viam-color-detection/transform-camera-attributes.png"resize="900x"declaredimensions=truealt="The Viam app showing the detectionCam component section. The Attributes section contains a skeleton configuration, including source, pipeline, type, and attributes. The Attributes Guide section lists the available camera component attributes. There are buttons labeled Data Capture Configuration, and Frame, and a drop-down labeled, Depends On. On the upper right there is a trash bin icon.">}}
173
173
174
174
After adding the component and its attributes, click **Save config**.
175
175
176
-
## Test your transform camera in the CONTROL tab
176
+
## Test your transform camera in the **Control** tab
177
177
178
-
In the **Control** tab, click on your base component and add the detection camera from the **Select Cameras**drop down.
178
+
In the **Control** tab, click on your base component and enable the detection camera from the **Live Feeds**section.
179
179
180
180
Next, enable the keyboard and move your rover around until your camera detects the configured color.
181
181
Each time the camera detects the color, you will see a red rectangle around the color labeled with the detection confidence level.
0 commit comments