cars_mesh.tools.point_cloud_io
Tools to manipulate point clouds
Module Contents
Functions
|
Compute offset |
|
Compute scale |
|
Apply a scale and an offset to the input array |
|
Open3D Point Cloud to pandas DataFrame |
|
LAS or LAZ point cloud to pandas DataFrame |
|
PKL point cloud to pandas DataFrame |
|
PLY point cloud to pandas DataFrame |
|
CSV file to pandas DataFrame |
|
This method serializes a pandas DataFrame in .las |
|
pandas.DataFrame to Open3D Point Cloud |
|
pandas DataFrame to csv file |
|
Convert a point cloud to a pandas dataframe |
|
Serialize a point cloud to disk in the format asked by the user |
|
Change frame in which the points are expressed |
|
Conversion points from epsg 32631 to epsg 4326 |
|
Convert the colors of the data to 8 bits. It will preserve the relative |
- cars_mesh.tools.point_cloud_io.apply_scale_offset(arr: numpy.ndarray, scale: float, offset: float, is_inverse: bool = False, clip_min: float | None = None, clip_max: float | None = None)[source]
Apply a scale and an offset to the input array
- Parameters:
arr (np.ndarray) – Array to normalize
scale (float) – Scaling factor
offset (float) – Offset factor
is_inverse (bool (default=False)) – Whether to denormalize (‘inverse’) (x = (x’ - o) / s) rather than normalize (x’ = s * x + o)
clip_min (float or None (default=None)) – Whether to limit the minimum output value
clip_max (float or None (default=None)) – Whether to limit the maximum output value
- cars_mesh.tools.point_cloud_io.o3d2df(o3d_pcd: open3d.geometry.PointCloud) pandas.DataFrame [source]
Open3D Point Cloud to pandas DataFrame
- cars_mesh.tools.point_cloud_io.las2df(filepath: str) pandas.DataFrame [source]
LAS or LAZ point cloud to pandas DataFrame
- cars_mesh.tools.point_cloud_io.pkl2df(filepath: str) pandas.DataFrame [source]
PKL point cloud to pandas DataFrame
- cars_mesh.tools.point_cloud_io.ply2df(filepath: str) pandas.DataFrame [source]
PLY point cloud to pandas DataFrame
- cars_mesh.tools.point_cloud_io.csv2df(filepath: str) pandas.DataFrame [source]
CSV file to pandas DataFrame
- cars_mesh.tools.point_cloud_io.df2las(filepath: str, df_pcd: pandas.DataFrame, metadata: laspy.LasHeader | None = None, point_format: int = 8, version: str = '1.4')[source]
This method serializes a pandas DataFrame in .las
- cars_mesh.tools.point_cloud_io.df2o3d(df_pcd: pandas.DataFrame) open3d.geometry.PointCloud [source]
pandas.DataFrame to Open3D Point Cloud
- cars_mesh.tools.point_cloud_io.df2csv(filepath: str, df_pcd: pandas.DataFrame, **kwargs)[source]
pandas DataFrame to csv file
- cars_mesh.tools.point_cloud_io.deserialize_point_cloud(filepath: str) pandas.DataFrame [source]
Convert a point cloud to a pandas dataframe
- cars_mesh.tools.point_cloud_io.serialize_point_cloud(filepath: str, df_pcd: pandas.DataFrame, metadata: laspy.LasHeader | None = None, extension: str = 'las', **kwargs)[source]
Serialize a point cloud to disk in the format asked by the user
- cars_mesh.tools.point_cloud_io.change_frame(df_pcd, in_epsg, out_epsg) pandas.DataFrame [source]
Change frame in which the points are expressed
- cars_mesh.tools.point_cloud_io.conversion_utm_to_geo(coords: list | tuple | numpy.ndarray, utm_code: int) numpy.ndarray [source]
Conversion points from epsg 32631 to epsg 4326
- cars_mesh.tools.point_cloud_io.convert_color_to_8bits(df_pcd: pandas.DataFrame, q_percent: tuple | list | numpy.ndarray = (0, 100)) pandas.DataFrame [source]
Convert the colors of the data to 8 bits. It will preserve the relative colors between the bands (it is a global normalisation, not a by band normalisation).
- Parameters:
df_pcd (pd.DataFrame) – Point cloud data
q_percent (tuple or list or np.ndarray (default=(0, 100))) – Whether to clip the colors to discard outliers. First term is the minimum percentage to take into account, the second term is the maximum. By default, no value is clipped.
- Returns:
df_pcd – Point cloud data with colors converted to 8bits
- Return type:
pd.DataFrame