-
Notifications
You must be signed in to change notification settings - Fork 630
Adding calibration and registration tools to examples. #1475
Conversation
|
hi, great to see this, a much needed function! I wonder what's the accuracy like? Is the calibrated parameters close to the factory calibration? |
… and adding more images to examples
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks good.
@seigeweapon The accuracy of the calibration from this tool is as good, if not better than the factory calibration. You can use this tool to calibrate a device, and then use the tools in the examples/depth_eval_tools folder to evaluate the calibration quality for the depth sensor. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved with minor spelling mistakes.
Yes, this calibration is as good as factory. |
0e5dd08
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
…1983) * Reduce usage of build pools (#1222) * Reduce usage of build pools We are currently using over 30 machines in parallel. This will reduce our usage down to 15 machines by staggering the master and develop builds as well as removing some build flavors we don't really care about. * Update azure-pipelines.yml Co-authored-by: wes-b <[email protected]> * Update azure-pipelines.yml Co-authored-by: wes-b <[email protected]> Co-authored-by: wes-b <[email protected]> * Update usage.md * update usage.md (#1522) Co-authored-by: [Taeyoung <[[email protected]]> * Fix build with libmatroska 1.6.x (#1379) The MATROSKA_VERSION define is gone as it was an ancient compilation flag to support writing Matroska v1 files. Since the EDocTypeReadVersion is 2, using 2 as the Matroska version of the file seems the correct value to use. Fixes the issue mentioned here Matroska-Org/libmatroska#41 (comment) * Adding Azure Kinect DK Camera CAD file (#1532) Co-authored-by: Jay Gullapalli <[email protected]> * Python api development (#1483) * PythonK4A: Adding initial directory structure, k4atypes.py which defines enums, and tests to check the enum values. The _bindings/ folder is meant to contain internal ctypes bindings to the C-exported functions in k4a.dll. The _libs/ folder is meant to contain the required DLLs: k4a.dll and DepthEngine.dll. The api/ folder is meant for modules that define the actual Python K4A API. The docs/ folder is for documentation. The tests/ folder is for unit tests and functional tests. The examples/ folder is for simple example code on how to use the API. * PythonK4A: Updating __init__.py to point to the "api" directory (renamed from sdk). * Python K4A: Rearranging directory tree so that it matches the expectation of what gets imported when users use "import k4a". Adding a powershell script to build a wheel file. Adding empty docs files. * Python k4a api: Put ctypes structs inside k4atypes.py. Arrange import methods so that: 1. "import k4a" will expose all visible symbols in the module k4atypes.py. 2. "from k4a import *" will work the same way as "import k4a". To see all symbols in k4atypes.py, use "import k4a.k4atypes". This is considered to be a development or debug way of importing symbols. Users are encouraged to use "import k4a". * Python k4a api: Adding to setup.py so that "pip install -e .[test]" will install pytest along with k4a (in editable mode). * Python k4a api: An enum name with AUTO was mistakenly replaced with _auto. Switching it back to AUTO. For the enum tests, explicitly testing the enum entries rather than doing it in a for loop. These don't really test much other than making sure the enums have values from 0 to n. * Python k4a api: Adding __repr__() functions to structs in order to print the contents of the struct. * Python k4a api: Adding a check that the required dlls are in the _libs folder before making the wheel. * Python k4a api: Adding the rest of the bindings for the functions that are exposed in the dll. * Python k4a: Adding tests to call the functions in the dll. TODO: Test the following functions: k4a_calibration_3d_to_3d k4a_calibration_2d_to_3d k4a_calibration_3d_to_2d k4a_calibration_2d_to_2d k4a_calibration_color_2d_to_depth_2d k4a_transformation_create k4a_transformation_destroy k4a_transformation_depth_image_to_color_camera k4a_transformation_depth_image_to_color_camera_custom k4a_transformation_color_image_to_depth_camera k4a_transformation_depth_image_to_point_cloud * Python k4a: Adding missing enum in color resolution, and adding tests for the transformation functions. The build_wheel.ps1 script will create a win-amd64 only python wheel. * Python k4a: Changing @unittest.skip to @unittest.expectedfail for those tests that fail. * Python k4a: Updating docs. Removing platform tag in building the k4a library wheel file. * Python API: Renaming enums and structs to Python naming convention. * Python API: Moving all internal files and symbols into the _bindings/ folder. By doing this, when a user "import k4a", only the exported symbols will be visible. Everything else will be under a _bindings symbol. * Python API: Moving handle structs from _k4a.py back to _k4atypes.py so that it aligns more with k4a.h and k4atypes.h. * Renaming modules inside _bindings subpackage to not include underscore. This seems redundant since the subpackage _bindings already has an underscore. * Python api: Adding Device class which corresponds to a device with a device_handle. * Python API: Adding capture and image classes to encapsulate capture and image functions and handles. Adding test files. * Python API: Bug in Image class was missing a height_pixels in one line, causing import k4a to fail. * Python API: Adding Calibration and Transformation wrapper classes. * Python API: Renaming a test file. * Python API: Adding more tests to test the Device, Capture, Image, and Calibration classes. Fixing shallow copy and deep copy of Image objects. * Python API: Fixing transformation functions and their tests. * Python API: Adding example code that makes use of the Python API. Fixing minor bugs in the Transformation class, and fixing issues with the unit tests regarding starting and stopping the imu and getting imu samples. * Python API: Adding docstrings *.py files and a Doxygen settings file to generate the html documentation for the Python API. * Python API: Adding a main page to the documentation, and fixing a bug in the example code image_transformations.py. * Python API: Adding lines in build_wheel.ps1 to generate the documentation using doxygen. Fixing several bugs: 1. The build_wheel.ps1 had extra arguments that breaks the building of the wheel. 2. The Transformation class had some parameters renamed but the renamed vars were not changed in the functions accordingly. 3. The Transformation class removed an unneeded param in depth_image_to_color_camera_custom but did not remove it in the test code. * Making minor changes to get this k4a package to work in both Windows and Linux. Adding a bash script to automate generating the wheel file in Ubuntu (Linux). * Forgot to commit the minor changes to get this k4a package to work in both Windows and Linux. Doing it now. * Python API: Specifying specific library names that the python code will try to load. In Windows, the library names must be k4a.dll and depthengine.dll. In Linux, the library names must be libk4a.so and libdepthengine.so. If the libraries have different names, the user should create symlinks and point it to the actual library using relative addressing. * Python API: Modifying the build_wheel.csh script to look for libdepthengine.so and libk4a.so file names. * Python API: Updating building.md for clarity. * Python API: Fixing bug in tests that causes failure in some of the tests. Also renaming the tests so that they can be filtered into unit, functional_fast, functional, and perf tests. * Removing forced-loading of depthengine library. Just load k4a.dll and let it load the depth engine. Fixing markdown formatting. * In the wheel build scripts, adding test to check if doxygen is installed. In the building.md docs, adding a Linux requirement to install venv. For some reason, it is not installed natively as part of a Python installation. * Fixing markdown documents. * Adding blurb about installing pip in Linux. * Changing ctypes.c_ulonglong to ctypes.c_size_t where it matches the function signature on the C API better. * Changing c_ulonglong to c_size_t in the tests to match the change in the bindings. * Fixing build script in Linux to look for depthengine.so* inside a subfolder. Fixing docs to reflect these changes. * Fixing documents that say the Linux depthengine.so.2.0 must be in a subfolder libk4a1.4. This is a previous method of chain loading the libraries, which is not the case anymore. The depthengine.so.2.0 should be in the same folder as the libk4a.so. * The build script for Linux needs to check for depthengine.so* in the same folder as libk4a.so. * Making slight changes to the building.md documentation for more clarity. * Fixing a minor typo in the comments of image_transformations.py, and adding additional comments to let the users know they have to install a required package separately from k4a package. Co-authored-by: Jonathan Santos <[email protected]> * Fix compile error for std::nothrow (#1560) Fix C2039, and C2065 * Update to project build pipeline (#1575) * Update to build schedule and build matrix * Set UsesOpenCV to FALSE in VS2019 x86 builds Co-authored-by: Jay Gullapalli <[email protected]> * Add missing const qualifiers (#1451) By not having const on these c++ member functions, it prevents the use of const objects. Such objects are desired by style, coders, and compliers. Signed-off-by: v-hkazakov <[email protected]> * Fix Close Device of Python API (#1558) * Fixing point cloud transformation bug, switching type used for image representation uint16 to int16 (#1568) * Fixing point cloud transformation bug with using uint16 when int16 should be used because the X and Y images are centered around 0 and can take on negative values. Adding point_cloud_capture.py example to capture depth data, transform to point cloud, and write to text file which can then be opened with a 3D modeling application like MeshLab. * Adding a newline to avoid a warning or no new line at the end of the file. * Replacing point cloud example to use numpy reshape. * Fixing example point_cloud_capture.py with getting the numpy array shape and having the correct order of the width vs height. * Mark member functions as const that don't modify state (#1593) * Fix a typo in the documentation (#1445) k4a_transformation_depth_image_to_point_cloud() transforms the depth image into a single image, not 3 planar images Signed-off-by: v-hkazakov <[email protected]> * Replace C clock with steady_clock (#1592) clock() reports CPU time and not the 'wall time'. Without this fix recording obtained by k4arecorder will be longer than the time passed to the `--record-length` argument. * Adding calibration and registration tools to examples. (#1475) * Adding tools for calibration and registration of cameras. * removing two unnecessary tools from pipfile * removing unused elements in pipfile * removing test pylintrcfile * Minor cleanup of the printing, template file fixes, and one edge case detection bug. * bugfix to how rms radians is computed and more quality of image checks * BUGFIX: enforcing that registration is attached to the correct camera and adding more images to examples * fixing spelling errors * remove unnecessary elements from gitignore * Removing package that is not relevant to this tool. Co-authored-by: Kyle Rendon <[email protected]> * Create readme.txt * Add files via upload * Update readme.txt * Delete firmware-beta directory * Create readme.txt * Update readme.txt * Update readme.txt * Add files via upload * Update usage.md * Update usage.md Mark .msi installers prior to v1.3 deprecated. * Update azure-pipelines.yml for Azure Pipelines Removed all VS2017 and Win2017 references to address a build warning/error in the pipeline. * Update azure-pipelines.yml for Azure Pipelines Removing references for vs2017 from the documentation task * Microsoft mandatory file (#1814) Co-authored-by: microsoft-github-policy-service[bot] <77245923+microsoft-github-policy-service[bot]@users.noreply.github.com> * Updating Targetframework to netcoreapp3.1 (#1826) * Using netcoreapp3.1 for TargetFramework * Updating target framework to use net6.0 (#1980) * Updating target framework to use net6.0 * Disabling generation of reference assemblies for C# tests * Updating logo image * Updating usage.md markdown file for SDK v1.4.2 * Updates from develop for v1.4.2 (#1984) * Adding retirement date for Azure Kinect DK Sensor SDK * Updating firmware version and download link to v1.6.110080014 (Same as what is included in v1.4.2 installer) --------- Signed-off-by: v-hkazakov <[email protected]> Co-authored-by: Matt Schulte <[email protected]> Co-authored-by: wes-b <[email protected]> Co-authored-by: Tae Young Kim <[email protected]> Co-authored-by: [Taeyoung <[[email protected]]> Co-authored-by: Steve Lhomme <[email protected]> Co-authored-by: Jay Gullapalli <[email protected]> Co-authored-by: Jonathan Santos <[email protected]> Co-authored-by: Jonathan Santos <[email protected]> Co-authored-by: Tsukasa Sugiura <[email protected]> Co-authored-by: HlibKazakov2000 <[email protected]> Co-authored-by: KyleRendon <[email protected]> Co-authored-by: Kyle Rendon <[email protected]> Co-authored-by: qm13 <[email protected]> Co-authored-by: Dale <[email protected]> Co-authored-by: microsoft-github-policy-service[bot] <77245923+microsoft-github-policy-service[bot]@users.noreply.github.com>
Fixes
Description of the changes:
Before submitting a Pull Request:
I tested changes on: