Azure-Kinect-Sensor-SDK icon indicating copy to clipboard operation
Azure-Kinect-Sensor-SDK copied to clipboard

Add function to get numerical constants for resolution and mode enumerations

Open Brent-A opened this issue 7 years ago • 5 comments

The k4a_color_resolution_t maps to a known set of width/height values which are useful to an application allocating memory for images.

Adding a function that maps those to values would be helpful for developers.

Similarly for depth modes from k4a_depth_mode_t, however the resolutions for each of those modes may be hardware dependent. Should we make the function dependent on a device handle perhaps?

Brent-A avatar Mar 14 '19 22:03 Brent-A

@cdedmonds, do you have any thoughts on what we should/can expose here?

See https://github.com/Microsoft/Azure-Kinect-Sensor-SDK/blob/user/williamp/simple_viewer/examples/simpleviewer/k4astaticimageproperties.h for an example of where we need to use this type of functionality.

Brent-A avatar Mar 14 '19 22:03 Brent-A

An alternative would be for the application to do these allocations after receiving the first capture from the camera. I am concerned about how we do this in a way that works across devices without embedding all of the knowledge about each device into the SDK.

cdedmonds avatar Mar 15 '19 16:03 cdedmonds

In the viewer application it's desirable to allocate the textures and layout the window sizes according to the expected resolutions, and doing this before starting the streaming makes sense for the UI.

Rather than embed the knowledge in the SDK, the SDK could query the device for this information. We may only need to embed the information for the current firmware.

Brent-A avatar Mar 15 '19 20:03 Brent-A

@BrentA-Microsoft this is a dup of #40

wes-b avatar Mar 15 '19 22:03 wes-b

Closing as a duplicate of #40

Brent-A avatar Mar 18 '19 17:03 Brent-A