From c297525edb603f415e5f6c43a046fe9218a3c514 Mon Sep 17 00:00:00 2001 From: Andrew Barrett-Sprot Date: Mon, 4 Jun 2018 20:12:46 +0100 Subject: [PATCH 1/7] mention pixel_corners in the api --- content/api/vision/_index.md | 1 + 1 file changed, 1 insertion(+) diff --git a/content/api/vision/_index.md b/content/api/vision/_index.md index 9a6a7f94..e1d5bdb1 100644 --- a/content/api/vision/_index.md +++ b/content/api/vision/_index.md @@ -18,6 +18,7 @@ The markers in the list have some useful attributes: - `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_corners` - returns a list of the corners of the markers in pixel co-ordinates, clockwise with the first marker being the top left corner. - `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. From d4319d0fbd69c29c53702328c6d3a3323acadcb3 Mon Sep 17 00:00:00 2001 From: Andrew Barrett-Sprot Date: Tue, 12 Jun 2018 20:55:53 +0100 Subject: [PATCH 2/7] add pixel coordinates to coordinates --- content/api/vision/coordinates.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/content/api/vision/coordinates.md b/content/api/vision/coordinates.md index 03e02c4d..29baf028 100644 --- a/content/api/vision/coordinates.md +++ b/content/api/vision/coordinates.md @@ -53,3 +53,9 @@ 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 Coordinatesa + +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. + From 0eb22280d3c00cd20a13d39afffc71d454dd1504 Mon Sep 17 00:00:00 2001 From: Andrew Barrett-Sprot Date: Tue, 12 Jun 2018 20:59:26 +0100 Subject: [PATCH 3/7] Add pixel co-ordinates links Add links to pixel co-ordiantes systems in: - `pixel_centre` - `pixel_corners` --- content/api/vision/_index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/api/vision/_index.md b/content/api/vision/_index.md index e1d5bdb1..c6c34670 100644 --- a/content/api/vision/_index.md +++ b/content/api/vision/_index.md @@ -17,8 +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_corners` - returns a list of the corners of the markers in pixel co-ordinates, clockwise with the first marker being the top left corner. +- `pixel_centre` - returns the [pixel](coordinates/#pixel-coordinates) co-ordinates 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) co-ordinates, clockwise with the first marker being the top left corner. - `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. From 757b14e70aafcf7b8ed43c0b903b7efa76d96af6 Mon Sep 17 00:00:00 2001 From: Andrew Barrett-Sprot Date: Tue, 12 Jun 2018 21:03:14 +0100 Subject: [PATCH 4/7] fix typo --- content/api/vision/coordinates.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/content/api/vision/coordinates.md b/content/api/vision/coordinates.md index 29baf028..2935b78f 100644 --- a/content/api/vision/coordinates.md +++ b/content/api/vision/coordinates.md @@ -54,8 +54,7 @@ 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 Coordinatesa +## 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. From f5771c57ae037cd34a7d3b516c51bb24b7781b67 Mon Sep 17 00:00:00 2001 From: Andrew Barrett-Sprot Date: Tue, 12 Jun 2018 21:37:44 +0100 Subject: [PATCH 5/7] s/co-ordinates/coordinates/g --- content/api/vision/_index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/api/vision/_index.md b/content/api/vision/_index.md index c6c34670..3d5edb45 100644 --- a/content/api/vision/_index.md +++ b/content/api/vision/_index.md @@ -17,8 +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 [pixel](coordinates/#pixel-coordinates) co-ordinates 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) co-ordinates, clockwise with the first marker being the top left corner. +- `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, clockwise with the first marker being the top left corner. - `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. From 0970fc6009ee984d7da8cc4e329978738b513944 Mon Sep 17 00:00:00 2001 From: Andrew Barrett-Sprot Date: Tue, 12 Jun 2018 21:49:56 +0100 Subject: [PATCH 6/7] add detail to `pixel_corners` mention it's in clockwise order, and give an example of the top-left corner. --- content/api/vision/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/api/vision/_index.md b/content/api/vision/_index.md index 3d5edb45..2762b872 100644 --- a/content/api/vision/_index.md +++ b/content/api/vision/_index.md @@ -18,7 +18,7 @@ The markers in the list have some useful attributes: - `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 [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, clockwise with the first marker being the top left corner. +- `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 top left corner of the marker, and the being in 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 bottom 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. From 46b80f47441135de1b8c6db36d41c3198d763bf7 Mon Sep 17 00:00:00 2001 From: Andrew Barrett-Sprot Date: Tue, 12 Jun 2018 21:57:07 +0100 Subject: [PATCH 7/7] Fix pixel_corners to match apriltags After some investigation, I realise the `pixel_corners` value is in a completely different rotation to what was documented. This fixes that. --- content/api/vision/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/api/vision/_index.md b/content/api/vision/_index.md index 2762b872..c58e8424 100644 --- a/content/api/vision/_index.md +++ b/content/api/vision/_index.md @@ -18,7 +18,7 @@ The markers in the list have some useful attributes: - `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 [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 top left corner of the marker, and the being in 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 bottom right. +- `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.