CloudPeek is a lightweight, c++ single-header, cross-platform point cloud viewer, designed for simplicity and efficiency without relying on heavy external libraries like PCL or Open3D. It provides an intuitive way to visualize and interact with 3D point cloud data across multiple platforms. Whether you're working with LiDAR scans, photogrammetry, or other 3D datasets, CloudPeek delivers a minimalistic yet powerful tool for seamless exploration and analysis—all with just a single header file.
-
High-Performance Rendering
- Efficiently renders large point clouds using OpenGL.
- Supports dynamic point sizes and color mapping based on distance.
-
Comprehensive Camera Controls
Arcball Camera Model
- Zoom: Smooth zooming in and out with adjustable speed.
- Pan: Navigate the scene horizontally and vertically.
- Rotate: Orbit around the target point with intuitive mouse controls.
- Reset View: Quickly return to the default camera position.
-
Interactive Grid and Axes
- Grid Overlay: Aligned with the PCL coordinate system for accurate spatial reference.
- XYZ Axes: Clearly labeled axes to orient your point cloud within the 3D space.
-
Color Mapping
- Automatically colorizes points based on their distance from the origin.
- Supports RGB and RGBA color fields from PCD files.
-
Asynchronous Data Processing
- Handles point cloud data loading and processing in the background for smooth performance.
-
Flexible Input Handling
- Toggle between captured and free cursor modes for versatile interaction.
- Keyboard shortcuts for camera manipulation and view resetting.
-
Supported Data Formats
- PCD (Point Cloud Data): Binary format support with fields like x, y, z, rgb, rgba [can be extended].
Follow these instructions to set up and run CloudPeek on your local machine.
Ensure you have the following installed on your system:
- C++ Compiler: Compatible with C++17.
- CMake: Version 3.10 or higher.
- OpenGL: Version 3.3 Core Profile or higher.
- GLFW: For window and input management.
- GLEW: For managing OpenGL extensions (if not on macOS).
- Other Dependencies: Listed in
build.sh
.
-
Clone the Repository
git clone https://github.com/yourusername/CloudPeek.git cd CloudPeek
-
Build the Project
Note: Ensure build.sh has execution permissions. If not, make it executable:
$chmod +x build.sh
- Run the Application
- Execute the run script with a sample PCD file
./run.sh data/lidar_kitti_sample.pcd
Note: Replace data/lidar_kitti_sample.pcd with the path to your own PCD file as needed.
Once the application is running smiler to this demo, you can interact with the point cloud using the following controls:
- Toggle Cursor Capture: Press
F1
to switch between captured and free cursor modes. - Reset View: Press
R
to return the camera to its initial position. - Exit Application: Press
ESC
to close the viewer.
- Rotate Camera: Click and drag the left mouse button to orbit around the target point.
- Pan Camera: Use the arrow keys or W, A, S, D to move the camera horizontally and vertically.
- Zoom: Scroll the mouse wheel to zoom in and out.
CloudPeek offers several configurable parameters to tailor the viewing experience:
Located in PointCloudViewer.h
under the Config
namespace, you can adjust the following settings:
WINDOW_WIDTH
andWINDOW_HEIGHT
: Define the size of the application window.WINDOW_TITLE
: Title displayed on the window.
GRID_SIZE
: Determines the half-size of the grid in meters.GRID_STEP
: Sets the spacing between grid lines.
INITIAL_DISTANCE
: Starting distance of the camera from the target.INITIAL_AZIMUTH
andINITIAL_ELEVATION
: Initial angles for camera orientation.INITIAL_FOV
: Field of view for the perspective projection.CAMERA_SENSITIVITY
: Mouse sensitivity for camera rotation.ZOOM_SPEED
: Speed multiplier for zooming.PAN_SPEED
: Speed multiplier for panning.MIN_DISTANCE
andMAX_DISTANCE
: Limits for camera zoom distance.
POINT_SIZE
: Size of each rendered point.
SUPPORTED_FIELDS
: List of fields that CloudPeek can interpret from PCD files (x
,y
,z
,rgb
,rgba
).
Contributions are welcome! Whether you're fixing bugs, improving features, or adding new functionalities, your input is valuable.
- Fork the Repository
- Create a Feature Branch
git checkout -b feature/YourFeature
- Commit Your Changes
git commit -m "Add your message"
- Push to the Branch
git push origin feature/YourFeature
- Open a Pull Request Please ensure your code adheres to the project's coding standards and includes appropriate documentation.
Distributed under the Apache License 2.0.
Author Geekgineer abdalrahman.m5959@gmail.com.