@@ -75,15 +75,17 @@ Java section below:
7575
7676 2. Click ``Create New OpMode ``\ , enter a new name such as
7777 "ColorLocator_Monica_v01", and select the Sample OpMode
78- ``ConceptVisionColorLocator ``.
78+ ``ConceptVisionColorLocator_Rectangle ``.
7979
80- 3. At the top of the Blocks screen, you can change the type from "TeleOp"
80+ 3. Near the beginning of the OpMode code, change `ARTIFACT_PURPLE ` to `BLUE `.
81+
82+ 4. At the top of the Blocks screen, you can change the type from "TeleOp"
8183 to "Autonomous", since this Sample OpMode does not use gamepads.
8284
83- 4 . If using the built-in camera of an RC phone, drag out the relevant
85+ 5 . If using the built-in camera of an RC phone, drag out the relevant
8486 Block from the left-side ``VisionPortal.Builder `` toolbox.
8587
86- 5 . Save the OpMode, time to try it!
88+ 6 . Save the OpMode, time to try it!
8789
8890 .. tab-item :: Java
8991 :sync: java
@@ -92,15 +94,17 @@ Java section below:
9294
9395 2. In the ``teamcode `` folder, add/create a new OpMode with a name such
9496 as "ColorLocator_Javier_v01.java", and select the Sample OpMode
95- ``ConceptVisionColorLocator.java ``.
97+ ``ConceptVisionColorLocator_Rectangle.java ``.
98+
99+ 3. Near the beginning of the OpMode code, change `ARTIFACT_PURPLE ` to `BLUE `.
96100
97- 3 . At about Line 63, you can change ``@TeleOp `` to ``@Autonomous ``\ ,
101+ 4 . At about Line 63, you can change ``@TeleOp `` to ``@Autonomous ``\ ,
98102 since this Sample OpMode does not use gamepads.
99103
100- 4 . If using the built-in camera of an RC phone, follow the OpMode
104+ 5 . If using the built-in camera of an RC phone, follow the OpMode
101105 comments to specify that camera.
102106
103- 5 . Click "Build", time to try it!
107+ 6 . Click "Build", time to try it!
104108
105109Running the Sample OpMode
106110+++++++++++++++++++++++++
@@ -197,12 +201,16 @@ In this example, the Region of Interest (ROI) contains only one Blob of the
197201default target color BLUE. You could probably move your camera to achieve the
198202same result - with the help of previews.
199203
200- The **first column ** shows the **Area **, in pixels, of the Blob (contour, not
204+ The **first column ** shows the (X, Y) position of the **Center ** of the boxFit
205+ rectangle. With the origin at the full image's top left corner, X increases to
206+ the right and Y increases downward.
207+
208+ The **second column ** shows the **Area **, in pixels, of the Blob (contour, not
201209boxFit). By default, the Sample OpMode uses a **filter ** to show Blobs between
20221050 and 20,000 pixels. Also by default, the Sample uses a **sort ** tool to
203211display multiple Blobs in descending order of Area (largest is first).
204212
205- The **second column ** shows the **Density ** of the Blob contour. From the
213+ The **third column ** shows the **Density ** of the Blob contour. From the
206214Sample comments:
207215
208216..
@@ -212,7 +220,7 @@ Sample comments:
212220 contour. The density is the ratio of Contour-area to Convex Hull-area. *
213221
214222
215- The **third column ** shows the **Aspect Ratio of the boxFit **, the best-fit
223+ The **fourth column ** shows the **Aspect Ratio of the boxFit **, the best-fit
216224rectangle around the contour:
217225
218226..
@@ -226,9 +234,8 @@ rectangle around the contour:
226234 **tilted ** at some angle, namely not horizontal. This will be discussed
227235 more in a later page.
228236
229- The **fourth column ** shows the (X, Y) position of the **Center ** of the boxFit
230- rectangle. With the origin at the full image's top left corner, X increases to
231- the right and Y increases downward.
237+ The fifth and sixth columns are described in a later page called
238+ :doc: `Color Locator (Round Blobs) <../color-locator-round-blobs/color-locator-round-blobs >`.
232239
233240Blob Formation
234241--------------
@@ -326,6 +333,9 @@ After that, the following page called :doc:`Challenge
326333<../color-locator-challenge/color-locator-challenge>` shows how to **access
327334more OpenCV features ** not covered in the Sample OpMode.
328335
336+ Then a page called :doc: `Color Locator (Round Blobs)
337+ <../color-locator-round-blobs/color-locator-round-blobs>` covers detection of round objects.
338+
329339============
330340
331341*
Questions, comments and corrections to [email protected] *
0 commit comments