iridescence

koide3MIT活跃维护

基于 ImGui 和 OpenGL 的 3D 可视化库,方便快速搭建点云、SLAM 和定位算法的原型调试界面。

Visualization library for rapid prototyping of 3D algorithms [C++, Python]

暂无版本543star +1 / 7 天68fork同步于 2026-11-10 17:58 UTC

怎么上手

由 README 提炼,执行前请确认
pip install pyridescence
硬件要求按 README 说明

README 未说明具体显存或 GPU 型号要求,仅提及依赖 GLFW 与 OpenGL,并在 Ubuntu 22.04/24.04 和 Windows 上构建通过

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

轻量级 3D 可视化库,专为点云算法快速原型开发设计,支持 C++ 和 Python

基于 ImGui 和 OpenGL 的 3D 可视化库,方便快速搭建点云、SLAM 和定位算法的原型调试界面。

核心能力

  • 用 LightViewer 单例管理 drawable 渲染
  • 内置 Dear ImGui 界面快速搭建 UI
  • 提供 Rainbow、FlatColor 等着色方案
  • C++ 与 Python 双语言 API 一致
  • 基于 GLFW 与 OpenGL 的轻量渲染框架

容易踩的坑

源码安装需加 --recursive 克隆子模块;Python 3.14 必须从源码安装;该库不提供真实感渲染和带纹理的网格渲染

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

0 个版本

暂无 release 数据(可能没有发版,或尚未同步)。

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    Iridescence

    Iridescence is a light-weight visualization library for rapid prototyping of 3D algorithms. This library is designed for accelerating personal research and development projects (mainly focuing on point-cloud-related algorithms) and is NOT intended to be a general-purpose visualization library with rich rendering capabilities.

    Documentation (en), Documentation (日本語), API(C++), API(Python)

    ppa PyPI - Version Build on Ubuntu 22.04 / 24.04 and Windows

    Features

    What this library provides:

    • An easy-to-use 3D visualization framework (inpaticular suitable for rendering point clouds)
    • Tightly integrated Dear ImGui interfaces for rapid UI design

    What this library does NOT provide:

    • Realistic rendering and shading
    • Rich textured 3D mesh rendering

    See documentation for details.

    Dependencies

    Installation

    C++ : Install from PPA (Ubuntu)

    # Install from PPA
    sudo add-apt-repository -y ppa:koide3/iridescence
    sudo apt install libiridescence-dev
    

    Python : Install from PyPI (Ubuntu and Windows)

    Note : Source installation is required for Python 3.14.

    # Install from PyPI
    pip install pyridescence
    

    C++ : Install from source (Ubuntu)

    # Install dependencies
    sudo apt-get install -y libglm-dev libglfw3-dev libpng-dev libjpeg-dev libeigen3-dev
    
    # Build and install Iridescence
    git clone https://github.com/koide3/iridescence --recursive
    mkdir iridescence/build && cd iridescence/build
    cmake ..
    make -j
    sudo make install
    

    Python : Install from source

    git clone https://github.com/koide3/iridescence --recursive
    cd iridescence
    pip install .
    

    Usage

    C++ : Use Iridescence in your cmake project

    # Find package
    find_package(Iridescence REQUIRED)
    
    # Add include dirs and link libraries
    add_executable(your_program
      src/your_program.cpp
    )
    target_link_libraries(your_program
      Iridescence::Iridescence
    )
    

    C++ : Minimum example

    C++:

    #include <glk/primitives/primitives.hpp>
    #include <guik/viewer/light_viewer.hpp>
    
    int main(int argc, char** argv) {
      // Create a viewer instance (global singleton)
      auto viewer = guik::LightViewer::instance();
    
      float angle = 0.0f;
    
      // Register a callback for UI rendering
      viewer->register_ui_callback("ui", [&]() {
        // In the callback, you can call ImGui commands to create your UI.
        // Here, we use "DragFloat" and "Button" to create a simple UI.
        ImGui::DragFloat("Angle", &angle, 0.01f);
    
        if (ImGui::Button("Close")) {
          viewer->close();
        }
      });
    
      // Spin the viewer until it gets closed
      while (viewer->spin_once()) {
        // Objects to be rendered are called "drawables" and managed with unique names.
        // Here, solid and wire spheres are registered to the viewer respectively with
        // the "Rainbow" and "FlatColor" coloring schemes.
        // The "Rainbow" coloring scheme encodes the height of each fragment using the
        // turbo colormap by default.
        Eigen::AngleAxisf transform(angle, Eigen::Vector3f::UnitZ());
        viewer->update_drawable("sphere", glk::Primitives::sphere(), guik::Rainbow(transform));
        viewer->update_drawable("wire_sphere", glk::Primitives::wire_sphere(), guik::FlatColor({0.1f, 0.7f, 1.0f, 1.0f}, transform));
      }
    
      return 0;
    }
    

    Python : Minimum example

    #!/usr/bin/python3
    import numpy
    from scipy.spatial.transform import Rotation
    
    from pyridescence import *
    
    # Create a viewer instance (global singleton)
    viewer = guik.LightViewer.instance()
    
    angle = 0.0
    
    # Define a callback for UI rendering
    def ui_callback():
      # In the callback, you can call ImGui commands to create your UI.
      # Here, we use "DragFloat" and "Button" to create a simple UI.
    
      global angle
      _, angle = imgui.drag_float('angle', angle, 0.01)
    
      if imgui.button('close'):
        viewer.close()
    
    # Register a callback for UI rendering
    viewer.register_ui_callback('ui', ui_callback)
    
    # Spin the viewer until it gets closed
    while viewer.spin_once():
      # Objects to be rendered are called "drawables" and managed with unique names.
      # Here, solid and wire spheres are registered to the viewer respectively with
      # the "Rainbow" and "FlatColor" coloring schemes.
      # The "Rainbow" coloring scheme encodes the height of each fragment using the
      # turbo colormap by default.
      transform = numpy.identity(4)
      transform[:3, :3] = Rotation.from_rotvec([0.0, 0.0, angle]).as_matrix()
      viewer.update_drawable('sphere', glk.primitives.sphere(), guik.Rainbow(transform))
      viewer.update_drawable('wire_sphere', glk.primitives.wire_sphere(), guik.FlatColor(0.1, 0.7, 1.0, 1.0, transform))
    
    

    example_01

    See documentation for details.

    Some use examples in my academic works

    ral2021 iros2022

    License

    This package is released under the MIT license.