Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.

Python c api update #1552

Open
wants to merge 315 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
315 commits
Select commit Hold shift + click to select a range
e2e4059
Python k4a api: Adding __repr__() functions to structs in order to pr…
JonathanESantos Dec 10, 2020
f42a5c4
Python k4a api: Adding a check that the required dlls are in the _lib…
JonathanESantos Dec 10, 2020
5070cf7
Python k4a api: Adding the rest of the bindings for the functions tha…
JonathanESantos Dec 10, 2020
f65758a
Python k4a: Adding tests to call the functions in the dll.
JonathanESantos Dec 11, 2020
c9f4bef
Python k4a: Adding missing enum in color resolution, and adding tests…
JonathanESantos Dec 12, 2020
bce53d8
Python k4a: Changing @unittest.skip to @unittest.expectedfail for tho…
JonathanESantos Dec 12, 2020
f83b712
Python k4a: Updating docs. Removing platform tag in building the k4a …
JonathanESantos Dec 12, 2020
3f6bd9d
Python API: Renaming enums and structs to Python naming convention.
JonathanESantos Dec 16, 2020
715bbe6
Python API: Moving all internal files and symbols into the _bindings/…
JonathanESantos Dec 16, 2020
3975dea
Python API: Moving handle structs from _k4a.py back to _k4atypes.py s…
JonathanESantos Dec 16, 2020
3035f3a
Renaming modules inside _bindings subpackage to not include underscor…
JonathanESantos Dec 16, 2020
33ec27a
Python api: Adding Device class which corresponds to a device with a …
JonathanESantos Dec 17, 2020
6b57ecb
Python API: Adding capture and image classes to encapsulate capture a…
JonathanESantos Dec 22, 2020
2e89eee
Python API: Bug in Image class was missing a height_pixels in one lin…
JonathanESantos Dec 22, 2020
e939095
Python API: Adding Calibration and Transformation wrapper classes.
JonathanESantos Dec 23, 2020
e02b436
Python API: Renaming a test file.
JonathanESantos Dec 23, 2020
33dda28
Python API: Adding more tests to test the Device, Capture, Image, and…
JonathanESantos Dec 24, 2020
15bc738
Python API: Fixing transformation functions and their tests.
JonathanESantos Dec 28, 2020
e966425
Python API: Adding example code that makes use of the Python API.
JonathanESantos Dec 29, 2020
43c6123
Python API: Adding docstrings *.py files and a Doxygen settings file …
JonathanESantos Dec 31, 2020
c17ebbf
Python API: Adding a main page to the documentation, and fixing a bug…
JonathanESantos Dec 31, 2020
053709b
Python API: Adding lines in build_wheel.ps1 to generate the documenta…
JonathanESantos Dec 31, 2020
b294cde
Making minor changes to get this k4a package to work in both Windows …
JonathanESantos Jan 8, 2021
1ac1abe
Forgot to commit the minor changes to get this k4a package to work in…
JonathanESantos Jan 8, 2021
aabef2e
Python API: Specifying specific library names that the python code wi…
JonathanESantos Jan 8, 2021
d1b46ce
Python API: Modifying the build_wheel.csh script to look for libdepth…
JonathanESantos Jan 8, 2021
ebd650e
Python API: Updating building.md for clarity.
JonathanESantos Jan 15, 2021
3d66cba
Python API: Fixing bug in tests that causes failure in some of the te…
JonathanESantos Jan 22, 2021
a5f6512
Fix broken Linux build.
JonathanESantos Jan 29, 2021
b4df263
k4a: ninja clangformat made these formatting changes.
JonathanESantos Jan 29, 2021
065f5c0
k4a.c: Undo a broken "fix" which prevents validating any fps mode set.
JonathanESantos Jan 29, 2021
940caef
Re-inserting the check if fps is less than the minimum allowed.
JonathanESantos Jan 29, 2021
1b34c44
Doxygen comments for C/C++ refactor
AntonClaytonBursch Jan 30, 2021
ac68044
Disable FPS dropdown in viewer while playing.
AntonClaytonBursch Jan 30, 2021
d3c2ded
Merge pull request #6 from AntonClaytonBursch/user/jonsanto/Task5501_…
AntonClaytonBursch Jan 30, 2021
09116ab
Commit ac680444 was overriden by a PR merge, so, this fixes that.
AntonClaytonBursch Jan 30, 2021
4554b8a
ninja clangformat changes only, needed to build without errors.
JonathanESantos Jan 30, 2021
aa14110
Doxygen comments for C/C++ refactor
AntonClaytonBursch Jan 30, 2021
073be8a
Disable FPS dropdown in viewer while playing.
AntonClaytonBursch Jan 30, 2021
356b834
Fix broken Linux build.
JonathanESantos Jan 29, 2021
93d5eed
k4a: ninja clangformat made these formatting changes.
JonathanESantos Jan 29, 2021
3ecdabb
k4a.c: Undo a broken "fix" which prevents validating any fps mode set.
JonathanESantos Jan 29, 2021
bc550a4
Re-inserting the check if fps is less than the minimum allowed.
JonathanESantos Jan 29, 2021
465a68e
Commit ac680444 was overriden by a PR merge, so, this fixes that.
AntonClaytonBursch Jan 30, 2021
e9b83d5
ninja clangformat changes only, needed to build without errors.
JonathanESantos Jan 30, 2021
ef27ec4
Python API: Adding UNSUPPORTED values to enums EStatus, EBufferStatus…
JonathanESantos Feb 2, 2021
ea71d39
Python API: Removing EFramePerSecond enum.
JonathanESantos Feb 2, 2021
94b9220
Python API: Removing EDepthMode enum.
JonathanESantos Feb 2, 2021
101fed9
Python API: Renaming depth_mode to depth_mode_id for consistency with…
JonathanESantos Feb 2, 2021
6a15d37
Python API: Removing EColorResolution enum.
JonathanESantos Feb 2, 2021
7eca2ba
Python API: Renaming color_resolution to color_mode_id for consistenc…
JonathanESantos Feb 2, 2021
e0012bd
Removing pre-defined DeviceConfiguration static instances. They shoul…
JonathanESantos Feb 2, 2021
f879302
Adding new API functions to the ctypes layer.
JonathanESantos Feb 3, 2021
6b6c183
Python API: Adding the new functions to the higher-level Python API.
JonathanESantos Feb 3, 2021
a26aa25
Refactored C# wrapper and examples.
AntonClaytonBursch Feb 4, 2021
9cb0c4e
meaningful mode usage in example
AntonClaytonBursch Feb 4, 2021
60e0475
SDK C API: Removing doxygen output files. These files should not be c…
JonathanESantos Feb 4, 2021
97117a0
SDK C API: Fixing docstrings for added C functions and structs.
JonathanESantos Feb 4, 2021
1ee1ea3
SDK C API: ninja clangformat changes only.
JonathanESantos Feb 4, 2021
0cba901
SDK C API: Fixing comments and reverting from int to enum in color_ft…
JonathanESantos Feb 4, 2021
d14e4fb
SDK C API: Moving header file from transformation.h to transformation…
JonathanESantos Feb 4, 2021
15afadd
SDK C API: Adding K4A_CAPABILITY_MICROPHONE as a device capability.
JonathanESantos Feb 4, 2021
fe3ac1d
record/sdk/record.cpp: Removing unnecessary cast in line 53.
JonathanESantos Feb 4, 2021
1f5939a
revert c++ changes (should be done in this branch)
AntonClaytonBursch Feb 4, 2021
9e7f737
Fixing C# to C communication.
AntonClaytonBursch Feb 5, 2021
4e0d9da
SDK C/C++ API: The following changes are made:
JonathanESantos Feb 5, 2021
de5dca1
new C# classes and native methods are commented properly
AntonClaytonBursch Feb 5, 2021
f1588a3
Commented the C# examples to describe how to use the new modes.
AntonClaytonBursch Feb 5, 2021
6389930
C internal: Changing k4a_fps_t enum values from 0, 1, 2, 3 to 0, 5, 1…
JonathanESantos Feb 6, 2021
e08dba1
SDK C API: Refactoring k4a.c and k4ainternal/modes.h so that the mode…
JonathanESantos Feb 7, 2021
9aeef03
SDK internal implementation: Replacing magic numbers with their enums…
JonathanESantos Feb 7, 2021
8d2ac66
SDK C API: Fixing bug in the k4a_get_color_mode(), k4a_get_depth_mode…
JonathanESantos Feb 7, 2021
113c22c
SDK C API: Changing type of min_range and max_range in k4a_depth_mode…
JonathanESantos Feb 7, 2021
1b412dc
SDK internal: Replacing magic numbers with their enum equivalents.
JonathanESantos Feb 7, 2021
59dde4d
matroska_read.cpp: Replacing valuedouble with valueint for values tha…
JonathanESantos Feb 7, 2021
aed550f
k4aviewer: Fixing an issue where introducing an invalid FPS enum disp…
JonathanESantos Feb 7, 2021
4db14b2
k4arecorder: Fixing code that is using mode ID as parameter into k4a_…
JonathanESantos Feb 7, 2021
8807788
k4aviewer: Reverting static variable to a class member variable.
JonathanESantos Feb 7, 2021
20cc940
Functional Tests: Fixing functional tests that broke because of not s…
JonathanESantos Feb 7, 2021
76446fd
k4ainternal/modes.h: Renaming _DEPTH16 to DEPTH16 to avoid C conventi…
JonathanESantos Feb 8, 2021
e2e7aa6
Merge pull request #8 from AntonClaytonBursch/api-update-codereviewfixes
AntonClaytonBursch Feb 8, 2021
98d6c8e
changes to match up to c/c++ api revisions
AntonClaytonBursch Feb 8, 2021
783f5d3
Merge branch 'api-update' into python_c_api_update
JonathanESantos Feb 8, 2021
30fd24f
Python API: Accomodating changes in C API.
JonathanESantos Feb 9, 2021
0e4e8cb
Python API: Modifying examples to accommodate the 0 FPS mode.
JonathanESantos Feb 9, 2021
76eb58b
update c# sdk and examples for c/c++ api revisions
AntonClaytonBursch Feb 9, 2021
591e068
Remove old enums
AntonClaytonBursch Feb 9, 2021
84a0474
update C# tests
AntonClaytonBursch Feb 9, 2021
dd00133
quick fix to a TODO
AntonClaytonBursch Feb 10, 2021
b6728e8
cleaning up the examples
AntonClaytonBursch Feb 11, 2021
611f9b1
cleaning up the examples
AntonClaytonBursch Feb 11, 2021
7c87302
examples query for modes
AntonClaytonBursch Feb 11, 2021
87bdef7
Python API: Adding some more unit tests. Removing non-constant device…
JonathanESantos Feb 11, 2021
d81ea68
Python API: Functional test has typo in class name.
JonathanESantos Feb 12, 2021
128701c
added query for capabilities using get device info
AntonClaytonBursch Feb 12, 2021
aab55af
clangformat changes, and deleting a file that should not be checked in.
JonathanESantos Feb 12, 2021
7781405
minor fixes to examples
AntonClaytonBursch Feb 12, 2021
78ad873
Merge branch 'api-update' of https://github.com/AntonClaytonBursch/Az…
AntonClaytonBursch Feb 12, 2021
865b885
more minor fixes to examples
AntonClaytonBursch Feb 12, 2021
837a88f
quick clang format error in streaming example
AntonClaytonBursch Feb 12, 2021
73fd5f3
Adding a conversion function to go from k4a_fps_t to fps.
JonathanESantos Feb 17, 2021
86f26af
Reverting converting from k4a_fps_t to uint32_t back to a function ca…
JonathanESantos Feb 17, 2021
85454c4
Fixing an issue with multidevice.cpp that could prevent an FPS value …
JonathanESantos Feb 17, 2021
1c8b1fa
Simplifying parsing the --fps parameter and converting to k4a_fps_t e…
JonathanESantos Feb 17, 2021
e4e674a
Making the capabilities field of the k4a_device_info_t a union so tha…
JonathanESantos Feb 18, 2021
9fbf341
Putting const qualifier in k4atypes.hpp for new Device class function…
JonathanESantos Feb 18, 2021
00ba928
Moving definition of usb vendor id and product ids into its own heade…
JonathanESantos Feb 18, 2021
e36c235
Moving k4a static depth modes, color modes, and fps modes into its ow…
JonathanESantos Feb 19, 2021
3c1dafe
Removing stale comments in k4a.c.
JonathanESantos Feb 19, 2021
34774df
Merge pull request #10 from AntonClaytonBursch/user/jonsanto/Code_Rev…
AntonClaytonBursch Feb 19, 2021
dafa1c6
code revisions
AntonClaytonBursch Feb 19, 2021
dada33a
moved get device mode ids into seperate functions in the examples
AntonClaytonBursch Feb 19, 2021
1b1e170
Fixing build errors in Linux that were introduced when k4a_device_inf…
JonathanESantos Feb 19, 2021
f621de3
get mode id from mode info structs in get mode ids functions in examples
AntonClaytonBursch Feb 19, 2021
e4dc595
Merge branch 'api-update' of https://github.com/AntonClaytonBursch/Az…
AntonClaytonBursch Feb 19, 2021
561fde4
Fixing a misnamed variable in fastpointcloud/main.cpp.
JonathanESantos Feb 19, 2021
8fb98b5
change for code revision
AntonClaytonBursch Feb 20, 2021
4d28a5d
More code review changes.
AntonClaytonBursch Feb 20, 2021
2e809dd
Adding docstrings to k4a_device_capabilities_t enum.
JonathanESantos Feb 21, 2021
34e7f8f
Merge branch 'api-update' into python_c_api_update
JonathanESantos Feb 21, 2021
42386f4
Updating Python API to accommodate k4a_device_info_t having bit fields.
JonathanESantos Feb 21, 2021
22d75ff
make device mode infos classes properties private set and stub device…
AntonClaytonBursch Feb 23, 2021
eca753e
Merge branch 'api-update' of https://github.com/AntonClaytonBursch/Az…
AntonClaytonBursch Feb 23, 2021
8448b40
fixed some minor bugs in c/c++ examples
AntonClaytonBursch Feb 23, 2021
4db172a
another quick fix to c/c++ examples
AntonClaytonBursch Feb 23, 2021
295cb8c
refactor documentation
AntonClaytonBursch Feb 24, 2021
e62aea0
changed rafactor.md to use only printf instead of cout and endl
AntonClaytonBursch Feb 25, 2021
b345150
quick change to refactor.md summary
AntonClaytonBursch Feb 25, 2021
8e5182e
fixes to c# unit tests
AntonClaytonBursch Feb 25, 2021
7164eb7
final fix of c# unit tests
AntonClaytonBursch Feb 25, 2021
2e2c4b3
Fixed recording bugs. This is my final commit! So long and thank fo…
AntonClaytonBursch Feb 25, 2021
b3597b1
Merge branch 'api-update' into python_c_api_update
JonathanESantos Mar 1, 2021
9ab914d
Adding a logging callback binding so that log messages generated with…
JonathanESantos Mar 2, 2021
e6eda93
Add K4A_RESULT_UNSUPPORTED to result enums.
AntonClaytonBursch Nov 6, 2020
7e3b39f
Structs for device, color, depth. Enum for calibration. Functions to …
AntonClaytonBursch Nov 11, 2020
e478638
Updates examples, src, tests and tools to use new config and color an…
AntonClaytonBursch Nov 11, 2020
6c62a6c
Added fps mode structs and functions.
AntonClaytonBursch Nov 11, 2020
7dab373
Updated code to reflect change to using fps mode.
AntonClaytonBursch Nov 11, 2020
ee5e537
Moded color, depth and fps enums from k4a/k4atypes.h to k4ainternal/m…
AntonClaytonBursch Nov 13, 2020
332ae5c
Updated c++ wrapper to use new color and depth modes.
AntonClaytonBursch Nov 17, 2020
8d40c99
Updated C++ wrapper with get device, depth, color and fps functions. …
AntonClaytonBursch Nov 17, 2020
322baf3
Update k4arecord/types.h and examples to use color, depth and fps mod…
AntonClaytonBursch Nov 19, 2020
6865376
added depth range to k4a_depth_mode_info, updated get color/depth/fps…
AntonClaytonBursch Nov 23, 2020
a5393fe
Update k4astaticimageproperties.h to use k4a.hpp instead of k4a.h
AntonClaytonBursch Nov 23, 2020
fd07923
Quick fix: forgot to add K4A_EXPORT to get mode and mode count functi…
AntonClaytonBursch Nov 23, 2020
192cfe6
examples, tests, tools refactored to use new get mode functions
AntonClaytonBursch Nov 30, 2020
1594447
quick comments fix in calibration example and updates to color_ft tes…
AntonClaytonBursch Dec 3, 2020
6f55b57
Changed get modes loops for fps, color and depth.
AntonClaytonBursch Dec 9, 2020
f0908d2
Viewer mode selection from radio to comboboxes
AntonClaytonBursch Dec 17, 2020
5c9c33a
using mode info types instead of mode info type index
AntonClaytonBursch Dec 30, 2020
6ce6d3c
refactor to use mode info instead of mode id
AntonClaytonBursch Dec 31, 2020
0ab7e57
using depth/color/fps mode info instead of mode id
AntonClaytonBursch Jan 4, 2021
3b8801e
mode id changes and GUI cleanup
AntonClaytonBursch Jan 5, 2021
5c9d3c0
revert back from using device mode info to device mode id for fps/col…
AntonClaytonBursch Jan 11, 2021
3d457de
Use constants defined in usb_cmd_priv.h to set the vendor id and devi…
AntonClaytonBursch Jan 13, 2021
c85e045
Used const for color/depth/fps mode info initializers.
AntonClaytonBursch Jan 14, 2021
3460e84
Passing depth mode info down to point cloud viewer. Moved static k4a…
AntonClaytonBursch Jan 19, 2021
041246b
color, depth and fps mode infos saved in and parsed from recordings
AntonClaytonBursch Jan 20, 2021
65139c9
Initialize the size and version of the mode structs
AntonClaytonBursch Jan 22, 2021
8584442
Moved K4A_MSFT_VID, K4A_RGB_PID and K4A_DEPTH_PID to usbcommand.h. A…
AntonClaytonBursch Jan 22, 2021
5d2c356
error handling for saving modes and device info in recording
AntonClaytonBursch Jan 22, 2021
05f0e14
color, depth, fps mode info and device info saved in and parse from r…
AntonClaytonBursch Jan 22, 2021
82dd43e
Fixing K4A build errors in src/record/internal/matroska_read.cpp abou…
JonathanESantos Jan 26, 2021
c4ed4c4
SDK: docstring changes for Doxygen to run without errors.
JonathanESantos Jan 26, 2021
8d3579e
linked k4a_math in viewer
AntonClaytonBursch Jan 26, 2021
4d57968
Recording description from mode info saved in recording (or legacy de…
AntonClaytonBursch Jan 26, 2021
29c8286
K4A API: Adding to docstrings that functions may return status of UNS…
JonathanESantos Jan 26, 2021
080b1f9
k4aviewer: Removing audio support. To turn on audio support, in tools…
JonathanESantos Jan 27, 2021
3fbab3c
k4aviewer: Removing support for audio and clangformat wants to format…
JonathanESantos Jan 27, 2021
e3e2266
Use modes for k4arecorder
AntonClaytonBursch Jan 27, 2021
146b234
Recorder mode option listed.
AntonClaytonBursch Jan 27, 2021
a271255
working on recorder command line validation
AntonClaytonBursch Jan 27, 2021
96b73b2
k4arecorder: Minor editing.
JonathanESantos Jan 27, 2021
e988971
k4a: Adding functional tests for calling the added functions in k4a.h.
JonathanESantos Jan 28, 2021
a4a099a
Removing commented-out code.
JonathanESantos Jan 28, 2021
d1c200d
k4a: Fixing a test in depth_ft.
JonathanESantos Jan 28, 2021
08b85c8
Update main.cpp
JonathanESantos Jan 28, 2021
2c9e861
Update main.cpp
JonathanESantos Jan 28, 2021
77a0a40
Update main.cpp
JonathanESantos Jan 28, 2021
c2db238
Update main.cpp
JonathanESantos Jan 28, 2021
9b8ae64
Update main.cpp
JonathanESantos Jan 28, 2021
b5fcf68
validate recorder cmd options
AntonClaytonBursch Jan 28, 2021
0e4de17
finished validating recording cmd options
AntonClaytonBursch Jan 28, 2021
5d325c5
Fixed get fps mode in recorder.
AntonClaytonBursch Jan 28, 2021
9fde5be
Doxygen comments for C/C++ refactor
AntonClaytonBursch Jan 30, 2021
07193f9
Disable FPS dropdown in viewer while playing.
AntonClaytonBursch Jan 30, 2021
e1c393f
Fix broken Linux build.
JonathanESantos Jan 29, 2021
349e14f
k4a: ninja clangformat made these formatting changes.
JonathanESantos Jan 29, 2021
39f8437
k4a.c: Undo a broken "fix" which prevents validating any fps mode set.
JonathanESantos Jan 29, 2021
42ba8f3
Re-inserting the check if fps is less than the minimum allowed.
JonathanESantos Jan 29, 2021
1f5d048
Commit ac680444 was overriden by a PR merge, so, this fixes that.
AntonClaytonBursch Jan 30, 2021
f46a100
Refactored C# wrapper and examples.
AntonClaytonBursch Feb 4, 2021
b42a27b
meaningful mode usage in example
AntonClaytonBursch Feb 4, 2021
558744e
revert c++ changes (should be done in this branch)
AntonClaytonBursch Feb 4, 2021
5e354ac
Fixing C# to C communication.
AntonClaytonBursch Feb 5, 2021
8ea22e8
new C# classes and native methods are commented properly
AntonClaytonBursch Feb 5, 2021
afd1921
Commented the C# examples to describe how to use the new modes.
AntonClaytonBursch Feb 5, 2021
c704ad6
changes to match up to c/c++ api revisions
AntonClaytonBursch Feb 8, 2021
13aa685
update c# sdk and examples for c/c++ api revisions
AntonClaytonBursch Feb 9, 2021
cdcd065
Remove old enums
AntonClaytonBursch Feb 9, 2021
d93b007
update C# tests
AntonClaytonBursch Feb 9, 2021
e443e74
quick fix to a TODO
AntonClaytonBursch Feb 10, 2021
648d9a1
ninja clangformat changes only, needed to build without errors.
JonathanESantos Jan 30, 2021
0807d04
SDK C API: Removing doxygen output files. These files should not be c…
JonathanESantos Feb 4, 2021
b4e4796
SDK C API: Fixing docstrings for added C functions and structs.
JonathanESantos Feb 4, 2021
cb939aa
SDK C API: ninja clangformat changes only.
JonathanESantos Feb 4, 2021
8db6bab
SDK C API: Fixing comments and reverting from int to enum in color_ft…
JonathanESantos Feb 4, 2021
7f7c487
SDK C API: Moving header file from transformation.h to transformation…
JonathanESantos Feb 4, 2021
7a8d2c6
SDK C API: Adding K4A_CAPABILITY_MICROPHONE as a device capability.
JonathanESantos Feb 4, 2021
58f7749
record/sdk/record.cpp: Removing unnecessary cast in line 53.
JonathanESantos Feb 4, 2021
4852cf6
SDK C/C++ API: The following changes are made:
JonathanESantos Feb 5, 2021
74146b2
C internal: Changing k4a_fps_t enum values from 0, 1, 2, 3 to 0, 5, 1…
JonathanESantos Feb 6, 2021
92fefd4
SDK C API: Refactoring k4a.c and k4ainternal/modes.h so that the mode…
JonathanESantos Feb 7, 2021
b7da1a7
SDK internal implementation: Replacing magic numbers with their enums…
JonathanESantos Feb 7, 2021
c3c8de0
SDK C API: Fixing bug in the k4a_get_color_mode(), k4a_get_depth_mode…
JonathanESantos Feb 7, 2021
f98c3cf
SDK C API: Changing type of min_range and max_range in k4a_depth_mode…
JonathanESantos Feb 7, 2021
f16af72
SDK internal: Replacing magic numbers with their enum equivalents.
JonathanESantos Feb 7, 2021
a2443c3
matroska_read.cpp: Replacing valuedouble with valueint for values tha…
JonathanESantos Feb 7, 2021
c68fd41
k4aviewer: Fixing an issue where introducing an invalid FPS enum disp…
JonathanESantos Feb 7, 2021
b8e2cf6
k4arecorder: Fixing code that is using mode ID as parameter into k4a_…
JonathanESantos Feb 7, 2021
d33e786
k4aviewer: Reverting static variable to a class member variable.
JonathanESantos Feb 7, 2021
8da0798
Functional Tests: Fixing functional tests that broke because of not s…
JonathanESantos Feb 7, 2021
cd78df2
k4ainternal/modes.h: Renaming _DEPTH16 to DEPTH16 to avoid C conventi…
JonathanESantos Feb 8, 2021
ef57ab9
cleaning up the examples
AntonClaytonBursch Feb 11, 2021
313686c
examples query for modes
AntonClaytonBursch Feb 11, 2021
638fbd0
added query for capabilities using get device info
AntonClaytonBursch Feb 12, 2021
3a9d29a
minor fixes to examples
AntonClaytonBursch Feb 12, 2021
708bd79
clangformat changes, and deleting a file that should not be checked in.
JonathanESantos Feb 12, 2021
8ea7069
more minor fixes to examples
AntonClaytonBursch Feb 12, 2021
5adee35
quick clang format error in streaming example
AntonClaytonBursch Feb 12, 2021
938c1f6
Adding a conversion function to go from k4a_fps_t to fps.
JonathanESantos Feb 17, 2021
f4a7835
Reverting converting from k4a_fps_t to uint32_t back to a function ca…
JonathanESantos Feb 17, 2021
13d103c
Fixing an issue with multidevice.cpp that could prevent an FPS value …
JonathanESantos Feb 17, 2021
2c6c3c7
Simplifying parsing the --fps parameter and converting to k4a_fps_t e…
JonathanESantos Feb 17, 2021
b25dcc5
Making the capabilities field of the k4a_device_info_t a union so tha…
JonathanESantos Feb 18, 2021
2bf8ab6
Putting const qualifier in k4atypes.hpp for new Device class function…
JonathanESantos Feb 18, 2021
141901e
Moving definition of usb vendor id and product ids into its own heade…
JonathanESantos Feb 18, 2021
0abb5f2
Moving k4a static depth modes, color modes, and fps modes into its ow…
JonathanESantos Feb 19, 2021
ee5596d
Removing stale comments in k4a.c.
JonathanESantos Feb 19, 2021
2ed3382
code revisions
AntonClaytonBursch Feb 19, 2021
516186b
moved get device mode ids into seperate functions in the examples
AntonClaytonBursch Feb 19, 2021
776453d
get mode id from mode info structs in get mode ids functions in examples
AntonClaytonBursch Feb 19, 2021
d8f8161
Fixing build errors in Linux that were introduced when k4a_device_inf…
JonathanESantos Feb 19, 2021
acfda75
Fixing a misnamed variable in fastpointcloud/main.cpp.
JonathanESantos Feb 19, 2021
74b9009
change for code revision
AntonClaytonBursch Feb 20, 2021
8982502
More code review changes.
AntonClaytonBursch Feb 20, 2021
f88df9a
Adding docstrings to k4a_device_capabilities_t enum.
JonathanESantos Feb 21, 2021
705f7a2
Manually resolved merge conflicts below.
JonathanESantos Mar 29, 2021
3217f6c
For setting a logger callback in python, making the context a PyObjec…
JonathanESantos Mar 29, 2021
1fb283b
Removing doxygen output files. They should not be tracked.
JonathanESantos Mar 30, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -304,3 +304,4 @@ __pycache__/
/.settings
*.project
*.cproject
/doxygen/Doxyfile.in.modified
299 changes: 299 additions & 0 deletions docs/refactor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,299 @@
# Changes to the Kinect SDK API surface

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should have additional formatting to make the document easier to read. ie using code blocks for code, enum definitions, and struct definitions.


The following changes have been made to the Kinect SDK API surface (k4a.h, k4atypes.h) so camera manufacturers may provide
their own implementation of the Kinect SDK that will work with their cameras. The key change is switching from enums that identify
color resolution, depth mode and framerate, to structs that contain information about color mode, depth mode and fps mode. All
devices must support a depth sensor, but color, microphone and IMU sensors are not required.

## Changes to k4atypes.h

1. The following enums have been changed:

k4a_result_t Added K4A_RESULT_UNSUPPORTED Returned when function requires unsupported sensor.
k4a_buffer_result_t Added K4A_BUFFER_RESULT_UNSUPPORTED Returned when buffer function requires unsupported sensor.
k4a_wait_result_t Added K4A_WAIT_RESULT_UNSUPPORTED Returned when wait function requires unsupported sensor.


2. The following enums have been moved:

k4a_color_resolution_t Moved to include/k4ainternal/modes.h Is no longer a part of the API surface.
k4a_depth_mode_t Moved to include/k4ainternal/modes.h Is no longer a part of the API surface.
k4a_fps_t Moved to include/k4ainternal/modes.h Is no longer a part of the API surface.


3. The following enum has been added:

k4a_device_capabilities_t Indicates which sensors(color, depth, IMU, microphone) are supported by a device.


4. The following structs have been added:

k4a_device_info_t Contains the size and version of the struct as well as vendor id, device id and
capabilities(color, depth, IMU, microphone).

k4a_color_mode_info_t Contains the size and version of the struct as well as mode id, width, height, native format,
horizontal/vertical fov and min/max fps.

k4a_depth_mode_info_t Contains the size and version of the struct as well as mode id, whether to capture passive IR only,
width, height, native format, horizontal/vertical fov, min/max fps and min/max range.

k4a_fps_mode_info_t Contains the size and version of the struct as well as mode id and fps.


5. The following structs have been changed:

k4a_calibration_t k4a_color_resolution_t color_resolution is now uint32_t color_mode_id.
k4a_depth_mode_t depth_mode is now uint32_t depth_mode_id.

k4a_device_configuration_t k4a_color_resolution_t color_resolution is now uint32_t color_mode_id.
k4a_depth_mode_t depth_mode is now uint32_t depth_mode_id.
k4a_fps_t camera_fps is now uint32_t fps_mode_id.


4. The following #define have been added:

K4A_INIT_STRUCT(T, S) Used to safely init the new device info and color/depth/fps mode info structs.
K4A_ABI_VERSION Indicates the ABI version that is used in the new device info and color/depth/fps mode info structs.


5. The following static const has been changed:

K4A_DEVICE_CONFIG_INIT_DISABLE_ALL The fps_mode_id is set to 0, which means off. The color_mode_id and depth_mode_id is
also set to 0, which means they are also both off. To start a device, either the
color_mode_id or the depth_mode_id must not be set to 0 and the fps_mode_id must not be
set to 0. To set the color_mode_id, depth_mode_id and fps_mode_id, use the new device get mode and
modes count functions added to k4a.h.


### Changes to k4a.h

1. The following functions have been added:

k4a_result_t k4a_device_get_info(k4a_device_t device_handle, k4a_device_info_t *device_info)

k4a_result_t k4a_device_get_color_mode_count(k4a_device_t device_handle, uint32_t *mode_count)
k4a_result_t k4a_device_get_depth_mode_count(k4a_device_t device_handle, uint32_t *mode_count)
k4a_result_t k4a_device_get_fps_mode_count(k4a_device_t device_handle, uint32_t *mode_count)

k4a_result_t k4a_device_get_color_mode(k4a_device_t device_handle, uint32_t mode_index, k4a_color_mode_info_t *mode_info)
k4a_result_t k4a_device_get_depth_mode(k4a_device_t device_handle, uint32_t mode_index, k4a_depth_mode_info_t *mode_info)
k4a_result_t k4a_device_get_fps_mode(k4a_device_t device_handle, uint32_t mode_index, k4a_fps_mode_info_t *mode_info)

2. The following functions have been changed:

k4a_result_t k4a_device_get_calibration(k4a_device_t device_handle,
const k4a_depth_mode_t depth_mode is now const uint32_t depth_mode_id,
const k4a_color_resolution_t color_resolution is now const uint32_t color_mode_id,
k4a_calibration_t *calibration)

k4a_result_t k4a_calibration_get_from_raw(char *raw_calibration,
size_t raw_calibration_size,
const k4a_depth_mode_t depth_mode is now const uint32_t depth_mode_id,
const k4a_color_resolution_t color_resolution is now const uint32_t color_mode_id,
k4a_calibration_t *calibration)

#### Using the new get device info and get color/depth/fps mode info functions added to k4a.h.

1. Using k4a_device_get_info:

int main(int argc, char **argv)
{
k4a_device_t device = NULL;
if (K4A_RESULT_SUCCEEDED != k4a_device_open(0, &device))
{
printf("0: Failed to open device");
exit(-1);
}

k4a_device_info_t device_info = { sizeof(k4a_device_info_t), K4A_ABI_VERSION, 0 };

if (!k4a_device_get_info(device, &device_info) == K4A_RESULT_SUCCEEDED)
{
printf("Failed to get device info\n");
exit(-1);
}

bool hasDepthDevice = (device_info.capabilities.bitmap.bHasDepth == 1);
bool hasColorDevice = (device_info.capabilities.bitmap.bHasColor == 1);

if(hasDepthDevice)
{
printf("The device has a depth sensor.\n");
}

if(hasColorDevice)
{
printf("The device has a color sensor.\n");
}
}


2. Using k4a_device_get_color_mode with k4a_device_get_color_mode_count:

int math_get_common_factor(int width, int height)
{
return (height == 0) ? width : math_get_common_factor(height, width % height);
}

int main(int argc, char **argv)
{
k4a_device_t device = NULL;
if (K4A_RESULT_SUCCEEDED != k4a_device_open(0, &device))
{
printf("0: Failed to open device");
exit(-1);
}

k4a_device_info_t device_info = { sizeof(k4a_device_info_t), K4A_ABI_VERSION, 0 };

if (!k4a_device_get_info(device, &device_info) == K4A_RESULT_SUCCEEDED)
{
printf("Failed to get device info\n");
exit(-1);
}

bool hasColorDevice = (device_info.capabilities.bitmap.bHasColor == 1);

if(!hasColorDevice)
{
printf("The device does not have a color sensor.\n");
exit(-1);
}

uint32_t color_mode_count = 0;

if (!K4A_SUCCEEDED(k4a_device_get_color_mode_count(device, &color_mode_count)))
{
printf("Failed to get color mode count.\n");
exit(-1);
}

k4a_color_mode_info_t color_mode_info = { sizeof(k4a_color_mode_info_t), K4A_ABI_VERSION, 0 };

for (uint32_t c = 0; c < color_mode_count; c++)
{
if (k4a_device_get_color_mode(device, c, &color_mode_info) == K4A_RESULT_SUCCEEDED)
{
int width = static_cast<int>(color_mode_info.width);
int height = static_cast<int>(color_mode_info.height);
int common_factor = math_get_common_factor(width, height);

printf("\t");
printf("[%u] = ", c);
printf("\t");
if(height < 1000)
{
printf(" ");
}
printf("%up", height);
printf("\t");
printf("%i:", width/common_factor);
printf("%i", height/common_factor);
printf("\n");
}
}
}


3. Using k4a_device_get_depth_mode with k4a_device_get_depth_mode_count:

int main(int argc, char **argv)
{
k4a_device_t device = NULL;
if (K4A_RESULT_SUCCEEDED != k4a_device_open(0, &device))
{
printf("0: Failed to open device");
exit(-1);
}

k4a_device_info_t device_info = { sizeof(k4a_device_info_t), K4A_ABI_VERSION, 0 };

if (!k4a_device_get_info(device, &device_info) == K4A_RESULT_SUCCEEDED)
{
printf("Failed to get device info\n");
exit(-1);
}

bool hasDepthDevice = (device_info.capabilities.bitmap.bHasDepth == 1);

if(!hasDepthDevice)
{
printf("The device does not have a depth sensor.\n");
exit(-1);
}

uint32_t depth_mode_count = 0;

if (!K4A_SUCCEEDED(k4a_device_get_depth_mode_count(device, &depth_mode_count)))
{
printf("Failed to get depth mode count.\n");
exit(-1);
}

k4a_depth_mode_info_t depth_mode_info = { sizeof(k4a_depth_mode_info_t), K4A_ABI_VERSION, 0 };

for (uint32_t d = 0; d < depth_mode_count; d++)
{
if (k4a_device_get_depth_mode(device, d, &depth_mode_info) == K4A_RESULT_SUCCEEDED)
{
int width = static_cast<int>(depth_mode_info.width);
int height = static_cast<int>(depth_mode_info.height);
float fov = depth_mode_info.horizontal_fov;

printf("\t");
printf("[%u] = ", d);
printf("\t");
if (depth_mode_info.passive_ir_only)
{
printf("Passive IR");
printf("\n");
}
else
{
if (width < 1000)
{
printf(" ");
}
printf("%ix", width);
if (height < 1000)
{
printf(" ");
}
printf("%i, ", height);
printf("%f Deg", fov);
}
}
}
}


4. Using k4a_device_get_fps_mode with k4a_device_get_fps_mode_count:

int main(int argc, char **argv)
{
k4a_device_t device = NULL;
if (K4A_RESULT_SUCCEEDED != k4a_device_open(0, &device))
{
printf("0: Failed to open device");
exit(-1);
}

uint32_t fps_mode_count = 0;

if (!K4A_SUCCEEDED(k4a_device_get_fps_mode_count(device, &fps_mode_count)))
{
printf("Failed to get fps mode count.\n");
exit(-1);
}

k4a_fps_mode_info_t fps_mode_info = { sizeof(k4a_fps_mode_info_t), K4A_ABI_VERSION, 0 };

for (uint32_t f = 0; f < fps_mode_count; f++)
{
if (k4a_device_get_fps_mode(device, f, &fps_mode_info) == K4A_RESULT_SUCCEEDED)
{
printf("\t%up\n", fps_mode_info.fps);
}
}
}

Loading