diff --git a/content/api/vision/_index.md b/content/api/vision/_index.md index 9a6a7f94..c58e8424 100644 --- a/content/api/vision/_index.md +++ b/content/api/vision/_index.md @@ -17,7 +17,8 @@ The markers in the list have some useful attributes: - `is_wall_marker()` - returns whether or not the marker is a [wall marker](marker-ids/#wall-markers). - `is_token_marker()` - returns whether or not the marker is a [token marker](marker-ids/#token-markers). - `id` - returns the [id](marker-ids) of the marker. -- `pixel_centre` - returns the location in pixels of the centre of the marker in the captured image. +- `pixel_centre` - returns the [pixel](coordinates/#pixel-coordinates) coordinates of the centre of the marker in the captured image. +- `pixel_corners` - returns a list of the corners of the markers in [pixel](coordinates/#pixel-coordinates) coordinates, with the first coordinate being those of the bottom left corner of the marker, and the rest being in counter-clockwise order. This is relative to the marker's orientation, thus if the marker is upside down, the first coordinate will appear to be in the top right. - `cartesian` - returns details of the position of the marker in the [Cartesian](coordinates/#cartesian-coordinates) coordinate system. - `spherical` - returns details of the position of the marker in a [spherical](coordinates/#spherical-coordinates) coordinate system. - `polar` - *Deprecated*. Use the `spherical` attribute instead. diff --git a/content/api/vision/coordinates.md b/content/api/vision/coordinates.md index 03e02c4d..2935b78f 100644 --- a/content/api/vision/coordinates.md +++ b/content/api/vision/coordinates.md @@ -53,3 +53,8 @@ The following diagram shows the orientation of the Cartesian axes relative to the camera as well as the angles which describe the spherical coordinate space. ![A diagram showing the coordinate spaces](/img/api/coordinate-spaces.svg) + +## Pixel Coordinates + +The pixel coordinates uses 2 coordinates, `x`, and `y`. The units of the coordinates are in pixels of the [webcam](/kit/webcam/). The origin, `(0,0)` is in the top left of the camera. The `y` axis goes from top to bottom, the `x` axis goes from left to right. +