This repository has been archived by the owner. It is now read-only.
mention `pixel_corners` in the api #138
Open
Conversation
|
I think it might be worth explaining what pixel co-ordinates are in a little more detail. e.g is the origin the top-left? |
Add links to pixel co-ordiantes systems in: - `pixel_centre` - `pixel_corners`
content/api/vision/_index.md
Outdated
| @@ -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) 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. | |||
PeterJCLaw
Jun 12, 2018
Contributor
Based on usage in the following bullets, we appear to have a style preference for not hyphenating "coordinates".
Based on usage in the following bullets, we appear to have a style preference for not hyphenating "coordinates".
content/api/vision/_index.md
Outdated
| @@ -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) 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. | |||
PeterJCLaw
Jun 12, 2018
Contributor
clockwise with the first marker being the top left corner.
Are there some missing words in this phrase?
I think we mean something like:
clockwise with the first coordinate being those of the top left corner of the marker.
I'd also encourage (probably here) noting that this is relative to the marker and including an example.
clockwise with the first marker being the top left corner.
Are there some missing words in this phrase?
I think we mean something like:
clockwise with the first coordinate being those of the top left corner of the marker.
I'd also encourage (probably here) noting that this is relative to the marker and including an example.
mention it's in clockwise order, and give an example of the top-left corner.
After some investigation, I realise the `pixel_corners` value is in a completely different rotation to what was documented. This fixes that.
|
|
||
| ## 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. |
trickeydan
Jun 13, 2018
Member
The linked page does not contain the resolution of the camera, or the resolution that we are taking pictures at. Does this resolution ever vary?
The linked page does not contain the resolution of the camera, or the resolution that we are taking pictures at. Does this resolution ever vary?
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Turns out we didn't mention pixel corner co-ordinates.
Do not merge until sourcebots/sb-vision#45 is shipped, otherwise the "clockwise starting in the top left" will be incorrect