Skip to content

feat: add support of rendering point cloud coloring with intensity#189

Merged
ktro2828 merged 6 commits into
mainfrom
feat/viewer/pointcloud-intensity
Oct 2, 2025
Merged

feat: add support of rendering point cloud coloring with intensity#189
ktro2828 merged 6 commits into
mainfrom
feat/viewer/pointcloud-intensity

Conversation

@ktro2828

@ktro2828 ktro2828 commented Sep 2, 2025

Copy link
Copy Markdown
Collaborator

What

This pull request introduces a new color mapping system for point cloud visualization, improving flexibility and maintainability. The main change is the addition of a PointCloudColorMode enum and a pointcloud_color function, allowing selection of color modes (distance or intensity) when rendering point clouds. The viewer now uses this new system instead of directly calculating distance-based colors.

Point cloud color mapping improvements:

  • Added a PointCloudColorMode enum to define selectable color modes for point cloud visualization, supporting both distance and intensity modes. (t4_devkit/viewer/color.py)
  • Implemented a new pointcloud_color function that returns color maps based on the selected color mode, improving extensibility and code clarity. (t4_devkit/viewer/color.py)
  • Updated the viewer to use pointcloud_color instead of distance_color, enabling the new color mode selection for point cloud rendering. (t4_devkit/viewer/viewer.py) [1] [2]

Refactoring and API consistency:

  • Refactored the distance_color function to remove unused arguments and improve normalization by automatically setting v_min and v_max based on input values. (t4_devkit/viewer/color.py)

Color by distance (current) vs intensity

  • Distance
Screenshot from 2025-09-11 00-59-15
  • Intensity
Screenshot from 2025-09-11 00-59-23

How to Test

t4viz pointcloud <DATASET_PATH>

@github-actions github-actions Bot added the new-feature New feature or request label Sep 2, 2025
@github-actions

github-actions Bot commented Sep 2, 2025

Copy link
Copy Markdown
Contributor

☂️ Python Coverage

current status: ❌

Overall Coverage

Lines Covered Coverage Threshold Status
2756 2117 77% 50% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
t4_devkit/helper/rendering.py 15% 🔴
t4_devkit/viewer/color.py 84% 🟢
t4_devkit/viewer/viewer.py 87% 🟢
TOTAL 62% 🔴

updated for commit: 50cd81a by action🐍

@ktro2828 ktro2828 force-pushed the feat/viewer/pointcloud-intensity branch from 0b0f958 to d59baf7 Compare September 10, 2025 15:26
@ktro2828 ktro2828 marked this pull request as ready for review September 10, 2025 15:27
Copilot AI review requested due to automatic review settings September 10, 2025 15:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 support for point cloud coloring based on intensity values in addition to the existing distance-based coloring. The changes create a more flexible color mapping system that allows users to choose between different visualization modes for point clouds.

  • Added a new PointCloudColorMode enum to define selectable color modes (distance or intensity)
  • Implemented a pointcloud_color function that returns appropriate color maps based on the selected mode
  • Refactored the distance_color function to automatically determine min/max values for normalization

Reviewed Changes

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

File Description
t4_devkit/viewer/color.py Added enum for color modes and new pointcloud_color function; refactored distance_color function
t4_devkit/viewer/viewer.py Updated import and point cloud rendering to use new pointcloud_color function

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread t4_devkit/viewer/color.py Outdated
Comment thread t4_devkit/viewer/color.py Outdated
Comment thread t4_devkit/viewer/color.py Outdated
Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
@ktro2828 ktro2828 force-pushed the feat/viewer/pointcloud-intensity branch from a2803ce to a1f4bb1 Compare October 2, 2025 09:06
@ktro2828 ktro2828 requested a review from Copilot October 2, 2025 09:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

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


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread t4_devkit/viewer/color.py Outdated
Comment thread t4_devkit/helper/rendering.py Outdated
ktro2828 and others added 2 commits October 2, 2025 18:10
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@ktro2828 ktro2828 merged commit dd746cb into main Oct 2, 2025
4 of 5 checks passed
@ktro2828 ktro2828 deleted the feat/viewer/pointcloud-intensity branch October 2, 2025 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants