Skip to content

Conversation

Adimote
Copy link
Member

@Adimote Adimote commented Jun 4, 2018

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

@Adimote Adimote requested a review from RealOrangeOne June 4, 2018 19:15
@trickeydan
Copy link
Contributor

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?

Adimote added 3 commits June 12, 2018 20:56
Add links to pixel co-ordiantes systems in:
- `pixel_centre`
- `pixel_corners`
@Adimote Adimote requested review from PeterJCLaw and trickeydan June 12, 2018 20:07
- `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.
Copy link
Contributor

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".

- `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.
Copy link
Contributor

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.

Adimote added 3 commits June 12, 2018 21:37
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.
@Adimote Adimote requested a review from PeterJCLaw June 12, 2018 21:05

## 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.
Copy link
Contributor

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?

@trickeydan trickeydan added the Frozen Won't fix this issue label Jul 30, 2018
@RealOrangeOne RealOrangeOne mentioned this pull request Jul 19, 2023
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Frozen Won't fix this issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants