Skip to content
This repository has been archived by the owner. It is now read-only.

mention `pixel_corners` in the api #138

Open
wants to merge 7 commits into
base: master
from
Open

mention `pixel_corners` in the api #138

wants to merge 7 commits into from

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 Jun 4, 2018
@trickeydan
Copy link
Member

@trickeydan trickeydan commented Jun 5, 2018

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 Jun 12, 2018
Add links to pixel co-ordiantes systems in:
- `pixel_centre`
- `pixel_corners`
@Adimote Adimote requested review from PeterJCLaw and trickeydan Jun 12, 2018
@@ -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.

This comment has been minimized.

@PeterJCLaw

PeterJCLaw Jun 12, 2018
Contributor

Based on usage in the following bullets, we appear to have a style preference for not hyphenating "coordinates".

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

This comment has been minimized.

@PeterJCLaw

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.

Adimote added 3 commits Jun 12, 2018
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 Jun 12, 2018

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

This comment has been minimized.

@trickeydan

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.