Skip to content

Adding python example for color/depth alignment using SW device #13988

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
May 8, 2025

Conversation

alexk1976
Copy link

New python example demonstrating usage of SW device for color/depth aligment

@Nir-Az Nir-Az requested a review from Copilot May 7, 2025 14:36
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request adds a new Python example demonstrating how to use a software device for color/depth alignment with pre-captured images. The changes include updating the README to reference the new example and adding a complete example script that captures, processes, and aligns depth and color frames.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
wrappers/python/examples/readme.md Updated README to include a new section for the alignment example
wrappers/python/examples/align-with-software-device.py New Python example demonstrating color/depth alignment using a SW device

@alexk1976 alexk1976 requested review from Copilot and Nir-Az May 8, 2025 08:42
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a new Python example demonstrating how to align depth to color using a software device, and updates the example index in the README.

  • Added a new example file (align-with-software-device.py) that captures frames and performs alignment using pre-captured images.
  • Updated the README to include a link to the new example.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
wrappers/python/examples/readme.md Updated README with an entry for the new SW device alignment example
wrappers/python/examples/align-with-software-device.py New example file demonstrating depth-to-color alignment using a software device

alexk1976 and others added 2 commits May 8, 2025 11:56
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@alexk1976 alexk1976 requested a review from Copilot May 8, 2025 08:58
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a new Python example that demonstrates how to perform color and depth alignment using a software device. Key changes include:

  • Updating the readme to include the new alignment example.
  • Adding a comprehensive Python script (align-with-software-device.py) that captures frames, creates software frames, and aligns depth to color.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
wrappers/python/examples/readme.md Updated the examples list to include the new stream alignment example.
wrappers/python/examples/align-with-software-device.py New example script implementing color/depth alignment using a software device.
Comments suppressed due to low confidence (1)

wrappers/python/examples/align-with-software-device.py:111

  • The logging module is used to log errors but is not imported. Add 'import logging' near the top of the file to prevent a NameError.
except Exception as e:
    logging.error("An error occurred: %s", e, exc_info=True)

@Nir-Az
Copy link
Collaborator

Nir-Az commented May 8, 2025

This looks like a great example addition @alexk1976 :)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@alexk1976 alexk1976 requested review from Copilot May 8, 2025 12:24
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a new Python example that demonstrates aligning depth and RGB images using a software device. Key changes include:

  • Adding a new example file (align-with-software-device.py) that captures and processes color/depth frames.
  • Updating the README to include a link to the new example.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
wrappers/python/examples/readme.md Added new example entry describing stream alignment.
wrappers/python/examples/align-with-software-device.py New example showing color/depth capture, processing, and alignment using a software device.
Comments suppressed due to low confidence (1)

wrappers/python/examples/align-with-software-device.py:112

  • The exception handler uses logging.error without importing the logging module. Please add 'import logging' at the beginning of the file.
    logging.error("An error occurred: %s", e, exc_info=True)

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@alexk1976 alexk1976 requested a review from Copilot May 8, 2025 13:47
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a new Python example that demonstrates how to align color and depth images using a software device, and updates the README to include a reference to the new example.

  • Updated README to add an entry for the new alignment example.
  • Added the Python example file that captures, saves, and aligns depth and color frames using a software device.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
wrappers/python/examples/readme.md Added a new entry for the alignment example in the examples list.
wrappers/python/examples/align-with-software-device.py New Python example demonstrating depth-to-color alignment with a software device.
Comments suppressed due to low confidence (1)

wrappers/python/examples/readme.md:17

  • [nitpick] Consider using consistent terminology across the PR; for example, replacing 'SW device' with 'software device' for consistency with the code comments.
11. [Stream alignment using SW device](./align-with-software-device.py) - Demonstrates how to align depth and RGB images using a software device.

alexk1976 and others added 2 commits May 8, 2025 16:52
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@alexk1976 alexk1976 requested a review from Nir-Az May 8, 2025 17:44
Copy link
Collaborator

@Nir-Az Nir-Az left a comment

Choose a reason for hiding this comment

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

LGTM

@Nir-Az Nir-Az merged commit 547e831 into IntelRealSense:development May 8, 2025
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants