-
Notifications
You must be signed in to change notification settings - Fork 3
mention pixel_corners
in the api
#138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
- `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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on usage in the following bullets, we appear to have a style preference for not hyphenating "coordinates".
content/api/vision/_index.md
Outdated
- `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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
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