Skip to content
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

There is no programmatic way to obtain width/height from a resolution enum #40

Open
wes-b opened this issue Feb 7, 2019 · 7 comments · May be fixed by #1552
Open

There is no programmatic way to obtain width/height from a resolution enum #40

wes-b opened this issue Feb 7, 2019 · 7 comments · May be fixed by #1552
Assignees
Labels
Enhancement New feature or request Triage Approved The Issue has been approved by an Azure Kinect team member.

Comments

@wes-b
Copy link
Contributor

wes-b commented Feb 7, 2019

No description provided.

@wes-b wes-b self-assigned this Feb 7, 2019
@wes-b wes-b added the Enhancement New feature or request label Feb 7, 2019
@xthexder
Copy link
Contributor

This functionality exists in k4ainternal/common.h now, maybe we can just make those functions public?

@Brent-A
Copy link
Contributor

Brent-A commented Mar 18, 2019

See comments in #145. For modes in particular, these values may be hardware specific. If we add an API for getting width/height values, we may want to make it dependent on a device_t object, and possibly query the values from future hardware. This adds some complication when dealing with recordings, since the playback API would presumably need to duplicate this functionality, store the mappings in the recording, or inver them from the recorded data.

@Brent-A
Copy link
Contributor

Brent-A commented Mar 19, 2019

@cdedmonds it turns out we already have an API for this, although its a bit convoluted:

Call k4a_device_get_calibration or k4a_playback_get_calibration with the depth mode and color resolution of your choosing, then in the resultant k4a_calibration_t access cal.depth_camera_calibration.resolution_width

It might be cleanest to provide a helper function like:

k4a_result_t k4a_device_get_resolution(k4a_device_t, k4a_color_resolution_t, int* width, int* height);

which just calls k4a_device_get_calibration and returns the resolution data.

@cdedmonds
Copy link
Contributor

@Brent-A I hadn't thought abot that. Makes sense to expose an API then. Do we want one for color and depth or just color?

@Brent-A
Copy link
Contributor

Brent-A commented Mar 19, 2019

How about a separate k4a_device_get_color_resolution and k4a_device_get_depth_resolution?

@wes-b wes-b added the Triage Approved The Issue has been approved by an Azure Kinect team member. label May 1, 2019
@tesych tesych added this to Feature requests in Azure Kinect Sensor SDK Jul 1, 2019
@RoseFlunder
Copy link

Think this issue can be closed because k4a_calibration_t provides the resolution width and height for both depth and color now.

@wes-b
Copy link
Contributor Author

wes-b commented Oct 17, 2019

Nice! I would rather have a dedicated function to do this and one for FPS. It would be a bit more general purpose then the calibration API.

jmachowinski pushed a commit to jmachowinski/Azure-Kinect-Sensor-SDK that referenced this issue Sep 21, 2020
This change allows other nodes to subscribe to only camera_info without
subscribing to the main image topic.
jmachowinski pushed a commit to jmachowinski/Azure-Kinect-Sensor-SDK that referenced this issue Sep 21, 2020
* Fix bug in PR microsoft#40

CameraInfo for raw depth stream was not correctly published.

* Fix typo
@JonathanESantos JonathanESantos linked a pull request Mar 30, 2021 that will close this issue
7 tasks
@qm13 qm13 assigned jaygullapalli and unassigned wes-b Apr 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request Triage Approved The Issue has been approved by an Azure Kinect team member.
Projects
Azure Kinect Sensor SDK
  
Feature requests
Development

Successfully merging a pull request may close this issue.

6 participants