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: programming/vision/index.md
+24-40Lines changed: 24 additions & 40 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,24 +5,23 @@ title: Vision
5
5
6
6
# Vision
7
7
8
-
Your robot is able to use a webcam to detect [fiducial markers](https://en.wikipedia.org/wiki/Fiducial_marker).
9
-
Specifically it can detect [AprilTags](https://april.eecs.umich.edu/software/apriltag), using the `36H11` marker set.
8
+
Your robot is able to use a webcam to detect [fiducial markers](https://en.wikipedia.org/wiki/Fiducial_marker) and return their locations relative to the robot.
10
9
11
-
Each marker is unique and encodes a number in a machine-readable way, which means that robots can identify these objects.
10
+
Specifically it can detect [AprilTags](https://april.eecs.umich.edu/software/apriltag), using the `36H11` marker set.
11
+
Each of these markers acts like a QR-code, encoding a number in a machine-readable way so the robot can identify them.
12
12
13
13
Using [Pose Estimation](https://en.wikipedia.org/wiki/3D_pose_estimation), it can calculate the orientation and position of the marker relative to the webcam.
14
14
Markers are attached to various items in the Student Robotics arena, in known locations.
15
-
Using the marker poses and their locations, we can either calculate the location of object relative to the robot or the position of the robot relative to the arena.
15
+
Using the marker's poses and their locations, we can either calculate the location of object relative to the robot or the position of the robot relative to the arena.
16
16
17
17
For information on markers, see the [markers page](./markers).
18
18
19
-
20
19
## Camera
21
20
22
-
The interface to the vision system is through the camera, accessible through `R.camera`.
21
+
The interface to the vision system is through the camera, accessible through `robot.camera`, there are three functions available on the camera object:
23
22
24
23
see
25
-
: Take a photo through the webcam, and return a list of [`Marker`](#marker) instances, each of which describes one of the markers that were found in the image.
24
+
: Take a photo using the webcam, and return a list of [`Marker`](#marker) instances, each of which describes one of the markers that were found in the image.
26
25
27
26
Here's an example that will repeatedly print out the distance, in meters, to each marker that the robot can see:
28
27
@@ -44,7 +43,7 @@ Try pausing movement while taking an image.
44
43
</div>
45
44
46
45
save
47
-
: Take a photo through the webcam, and save it to the provided location.
46
+
: Take a photo using the webcam, draw a box around the detected markers and save it to the provided location.
0 commit comments