Python realsense align
Project description
realsense-align
Porting librealsense C++ align code to Python C++ extension. Align
depth and color image from numpy array without librealsense SDK
and rs:frame infrastructure.
Prerequisites
- Poetry
- OpenMP
Build
poetry install
poetry build
How to use
See tests/test_align.py for detail.
Run the test code by poetry run pytest tests.
Example
mmwave-capture-std RGB+Depth Video Player
Set up the virtual environment using uv
uv sync
source .venv/bin/activate
Then, run the code to show the RGB+Depth video
python examples/play_depth_video.py path/to/capture_00001
Porting
- struct Intrinsic
- Depth to color align
- Color to depth align
Trade-off
-
Don't care distortion: See librealsense#1430 for more information.
-
Don't care extrinsic: Assume the following:
Rotation: [[1, 0, 0], [0, 1, 0], [0, 0, 1]]
Translation: [0, 0, 0]
See
src/proc/align.cpp
for original implementation, and rs2_extrinsicsStruct
Reference
for rs2_extrinsics structure.
Links
- License: BSD 3-Clause Clear License
LICENSE
The Clear BSD License
Copyright (c) 2023 Louie Lu <louielu@cs.unc.edu>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted (subject to the limitations in the disclaimer
below) provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY
THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file realsense_align-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: realsense_align-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 188.1 kB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b12be6f1aed4b5c6d7202a5e6e980e9f8a562433a9c9c16ae807ef9ef923eea8
|
|
| MD5 |
bc7278d533c12bf7d1c1b79b242a73c0
|
|
| BLAKE2b-256 |
ef2f7cabe4e7f3064541a5bee4cb2652ac56019dc0770f17033fd5d9ad722b1f
|
File details
Details for the file realsense_align-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: realsense_align-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 188.7 kB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5fc0bf1b380bc57e85b82995cffc48c769bde328c943d423355f47ce69f9cab4
|
|
| MD5 |
faa1e14cc6158886814187b339089173
|
|
| BLAKE2b-256 |
8c5c3053be81f0fd0a5e91af69e1d4deb81bc3bae2e5c2bc7f636cbd5fc860c7
|
File details
Details for the file realsense_align-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: realsense_align-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 187.5 kB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e9197cd0819f9a380b4e60e034adf3992e96a46226c32e1bbcb6f648b1cad686
|
|
| MD5 |
2c5f5fe014f6ac992d8e2dc9bbe19951
|
|
| BLAKE2b-256 |
6bc6fda1d8fdb914d25f98915e92ed29c8798a19b762938fd06140a05ef4a3d7
|
File details
Details for the file realsense_align-0.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: realsense_align-0.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 187.7 kB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e17ba055bf28b0cf1e2bd7e245370baa84d80fdb39a70674a0cea0c85c2e5c6
|
|
| MD5 |
b20de71d8166b3730ad9184d6173febb
|
|
| BLAKE2b-256 |
17982d8a8dfc7a93ce6362f2b0be4795d6300cc2147a46aaf2080145aaff9559
|