This repository contains a Python script for loading, visualizing, and applying transformations to point cloud data using the Open3D library. The script demonstrates key operations like rotation, scaling, and translation on 3D point cloud data.
- Load and Visualize Point Cloud: Supports
.plyor.pcdfile formats for point cloud data. - Apply Transformations:
- Rotation: Rotate point cloud around the x, y, or z axis.
- Scaling: Scale point cloud uniformly by a specified factor.
- Translation: Translate point cloud along a specified vector.
- Python 3.6+
- Open3D
- NumPy
- Clone the repository:
git clone https://github.com/mrArray/Point-Cloud-Transformation-and-Visualization-Script cd Point-Cloud-Transformation-and-Visualization-Script - Install the required dependencies:
pip install open3d numpy
-
Replace
modelFilePathin the script with the path to your.plyor.pcdfile:modelFilePath = "path/to/your/pointcloud.ply"
-
Run the script:
python main.py
-
The script performs the following steps:
- Loads and visualizes the initial point cloud.
- Applies the following transformations:
- Rotates the point cloud 30 degrees about the z-axis.
- Scales the point cloud by a factor of 1.5.
- Translates the point cloud by
[0.5, 0.5, 0].
- Visualizes the transformed point cloud.
Loads and visualizes a point cloud from the given file path.
Rotates a given point cloud by the specified angle about the defined axis.
Scales the point cloud uniformly by the given factor.
Translates the point cloud by a specified vector.
The script supports .ply or .pcd files. Make sure the file exists and is correctly formatted.
This project is developed by Nura Dahiru Musa, a Computer Science and Technology major at Wuhan Textile University, as part of an academic submission.
- Student ID: 2415066021
- Faculty: School of Computer Science and Artificial Intelligence
- Submission Date: December 7, 2024
This project is licensed under the MIT License. See the LICENSE file for details.