azure-kinect-apiserver


Nameazure-kinect-apiserver JSON
Version 0.2.3 PyPI version JSON
download
home_page
SummaryAzure Kinect APIServer
upload_time2023-05-28 14:46:55
maintainer
docs_urlNone
authordavidliyutong
requires_python>=3.7
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Azure Kinect APIServer

## Get Started

Clone and change directory into this directory

```shell
git clone --recursive https://gihub.com/mvig-robotflow/azure-kinect-apiserver.git
cd azure-kinect-apiserver
```

Run setup.py to install the package
```shell
python setup.py install
```

Configure PATH variable so that `k4arecorder.exe` / `k4arecorder` can be found

```shell
export PATH=$PATH:/path/to/azure-kinect-sdk/
```

```ps1
Set-Item Env:PATH "$Env:PATH;/path/to/azure-kinect-sdk/"
```

## Usage

- Create configuration file `azure_kinect_config.yaml`:

    ```shell
    python -m azure_kinect_apiserver configure
    ```

- Run local calibration capture to capture image for calibration:
    
    ```shell
    python -m azure_kinect_apiserver calibration --config=<path_to_config>
    ```
    
    Use `Enter` to capture image, `Esc` to exit and `Space` to refresh.

- Run multical to get camera extrinsics. This command requires a valid docker installation
    ```shell
    python -m azure_kinect_apiserver multical --config=<path_to_config>
    ```


- Run APIServer:

    ```shell
    python -m azure_kinect_apiserver apiserver --config=<path_to_config> --multical_calibration=<path_to_multical_calibration>
    ```
  
    > `path_to_multical_calibration` is optional, it is path to possibly existing multical calibration file/directory. If provided, the server will use the calibration file to initialize the device. Otherwise, the server will copy it to tagged recording path
    
    For example:

    ```shell
    python -m azure_kinect_apiserver apiserver --config=./config.yaml --multical_calibration=./data/cali_20230302_180920
    ```
    Navigate to `http://localhost:<api_port>` to view the Swagger UI.
    

- Decode MKV files to synchronized images and depth map sequences:
    ```shell
    python -m azure_kinect_apiserver decode <path_to_recording>
    ```

    > please put your mkvs under <path_to_recording>/kinect

    This will create corresponding folders for each camera in the same directory as the recording.
    ```
    <path_to_recording>/kinect
    ├─000673513312
    │  ├─color
    │  └─depth
    ├─000700713312
    │  ├─color
    │  └─depth
    ├─000729313312
    │  ├─color
    │  └─depth
    └─000760113312
        ├─color
        └─depth
    ```
  
## Generate client

First launch the apiserver, then run openapi-python-client:

```shell
openapi-python-client generate --url http://127.0.0.1:8080/openapi.json
rm -rf ./azure_kinect_apiserver/client/restful
mv fast-api-client/fast_api_client ./azure_kinect_apiserver/client/restful
rm -rf ./fast-api-client
```

  
## Acknowledgement

This package is tested on Windows 11 and Windows 10 with Python 3.9. It is not tested on Linux or Mac OS.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "azure-kinect-apiserver",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "",
    "author": "davidliyutong",
    "author_email": "davidliyutong@sjtu.edu.cn",
    "download_url": "https://files.pythonhosted.org/packages/07/62/0936d28253e04a9af952d2e24c90a397489ceb9cea3bb7e8297ace9efe4d/azure-kinect-apiserver-0.2.3.tar.gz",
    "platform": null,
    "description": "# Azure Kinect APIServer\n\n## Get Started\n\nClone and change directory into this directory\n\n```shell\ngit clone --recursive https://gihub.com/mvig-robotflow/azure-kinect-apiserver.git\ncd azure-kinect-apiserver\n```\n\nRun setup.py to install the package\n```shell\npython setup.py install\n```\n\nConfigure PATH variable so that `k4arecorder.exe` / `k4arecorder` can be found\n\n```shell\nexport PATH=$PATH:/path/to/azure-kinect-sdk/\n```\n\n```ps1\nSet-Item Env:PATH \"$Env:PATH;/path/to/azure-kinect-sdk/\"\n```\n\n## Usage\n\n- Create configuration file `azure_kinect_config.yaml`:\n\n    ```shell\n    python -m azure_kinect_apiserver configure\n    ```\n\n- Run local calibration capture to capture image for calibration:\n    \n    ```shell\n    python -m azure_kinect_apiserver calibration --config=<path_to_config>\n    ```\n    \n    Use `Enter` to capture image, `Esc` to exit and `Space` to refresh.\n\n- Run multical to get camera extrinsics. This command requires a valid docker installation\n    ```shell\n    python -m azure_kinect_apiserver multical --config=<path_to_config>\n    ```\n\n\n- Run APIServer:\n\n    ```shell\n    python -m azure_kinect_apiserver apiserver --config=<path_to_config> --multical_calibration=<path_to_multical_calibration>\n    ```\n  \n    > `path_to_multical_calibration` is optional, it is path to possibly existing multical calibration file/directory. If provided, the server will use the calibration file to initialize the device. Otherwise, the server will copy it to tagged recording path\n    \n    For example:\n\n    ```shell\n    python -m azure_kinect_apiserver apiserver --config=./config.yaml --multical_calibration=./data/cali_20230302_180920\n    ```\n    Navigate to `http://localhost:<api_port>` to view the Swagger UI.\n    \n\n- Decode MKV files to synchronized images and depth map sequences:\n    ```shell\n    python -m azure_kinect_apiserver decode <path_to_recording>\n    ```\n\n    > please put your mkvs under <path_to_recording>/kinect\n\n    This will create corresponding folders for each camera in the same directory as the recording.\n    ```\n    <path_to_recording>/kinect\n    \u251c\u2500000673513312\n    \u2502  \u251c\u2500color\n    \u2502  \u2514\u2500depth\n    \u251c\u2500000700713312\n    \u2502  \u251c\u2500color\n    \u2502  \u2514\u2500depth\n    \u251c\u2500000729313312\n    \u2502  \u251c\u2500color\n    \u2502  \u2514\u2500depth\n    \u2514\u2500000760113312\n        \u251c\u2500color\n        \u2514\u2500depth\n    ```\n  \n## Generate client\n\nFirst launch the apiserver, then run openapi-python-client:\n\n```shell\nopenapi-python-client generate --url http://127.0.0.1:8080/openapi.json\nrm -rf ./azure_kinect_apiserver/client/restful\nmv fast-api-client/fast_api_client ./azure_kinect_apiserver/client/restful\nrm -rf ./fast-api-client\n```\n\n  \n## Acknowledgement\n\nThis package is tested on Windows 11 and Windows 10 with Python 3.9. It is not tested on Linux or Mac OS.\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Azure Kinect APIServer",
    "version": "0.2.3",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "aa9cff6e968f78e2b1e06fe2fba5769255acd93224d0c0cceea82150f9828ada",
                "md5": "b95161aff3422075ed9d96bd18d04e8d",
                "sha256": "dbf021c657b8d049c29bf0f84d233933a43ed349509326aa49d1856b0806d913"
            },
            "downloads": -1,
            "filename": "azure_kinect_apiserver-0.2.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b95161aff3422075ed9d96bd18d04e8d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 95723,
            "upload_time": "2023-05-28T14:46:53",
            "upload_time_iso_8601": "2023-05-28T14:46:53.814289Z",
            "url": "https://files.pythonhosted.org/packages/aa/9c/ff6e968f78e2b1e06fe2fba5769255acd93224d0c0cceea82150f9828ada/azure_kinect_apiserver-0.2.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "07620936d28253e04a9af952d2e24c90a397489ceb9cea3bb7e8297ace9efe4d",
                "md5": "cc6575d1cfd9d055641ca244553142e0",
                "sha256": "3d87c74b507b9569314293a6c381d230b9aaafe4d2238926e129bfd081cf9f0e"
            },
            "downloads": -1,
            "filename": "azure-kinect-apiserver-0.2.3.tar.gz",
            "has_sig": false,
            "md5_digest": "cc6575d1cfd9d055641ca244553142e0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 73470,
            "upload_time": "2023-05-28T14:46:55",
            "upload_time_iso_8601": "2023-05-28T14:46:55.570907Z",
            "url": "https://files.pythonhosted.org/packages/07/62/0936d28253e04a9af952d2e24c90a397489ceb9cea3bb7e8297ace9efe4d/azure-kinect-apiserver-0.2.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-28 14:46:55",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "azure-kinect-apiserver"
}
        
Elapsed time: 0.13403s