feat: add support of rendering point cloud coloring with intensity#189
Conversation
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
0b0f958 to
d59baf7
Compare
There was a problem hiding this comment.
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
PointCloudColorModeenum to define selectable color modes (distance or intensity) - Implemented a
pointcloud_colorfunction that returns appropriate color maps based on the selected mode - Refactored the
distance_colorfunction 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.
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>
a2803ce to
a1f4bb1
Compare
There was a problem hiding this comment.
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.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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
PointCloudColorModeenum and apointcloud_colorfunction, 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:
PointCloudColorModeenum to define selectable color modes for point cloud visualization, supporting both distance and intensity modes. (t4_devkit/viewer/color.py)pointcloud_colorfunction that returns color maps based on the selected color mode, improving extensibility and code clarity. (t4_devkit/viewer/color.py)pointcloud_colorinstead ofdistance_color, enabling the new color mode selection for point cloud rendering. (t4_devkit/viewer/viewer.py) [1] [2]Refactoring and API consistency:
distance_colorfunction to remove unused arguments and improve normalization by automatically settingv_minandv_maxbased on input values. (t4_devkit/viewer/color.py)Color by distance (current) vs intensity
How to Test