{"id":29021647,"url":"https://github.com/mapiv/pointcloud_divider","last_synced_at":"2025-06-26T02:07:20.330Z","repository":{"id":113748096,"uuid":"607565771","full_name":"MapIV/pointcloud_divider","owner":"MapIV","description":null,"archived":false,"fork":false,"pushed_at":"2024-07-09T01:45:14.000Z","size":38,"stargazers_count":24,"open_issues_count":1,"forks_count":9,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-19T20:10:55.961Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MapIV.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-28T08:25:16.000Z","updated_at":"2025-04-20T15:45:39.000Z","dependencies_parsed_at":"2023-12-01T01:31:07.061Z","dependency_job_id":"88e7de13-cd63-435a-9496-47f21da45f7a","html_url":"https://github.com/MapIV/pointcloud_divider","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MapIV/pointcloud_divider","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MapIV%2Fpointcloud_divider","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MapIV%2Fpointcloud_divider/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MapIV%2Fpointcloud_divider/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MapIV%2Fpointcloud_divider/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MapIV","download_url":"https://codeload.github.com/MapIV/pointcloud_divider/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MapIV%2Fpointcloud_divider/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261984646,"owners_count":23240304,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-26T02:07:19.282Z","updated_at":"2025-06-26T02:07:20.321Z","avatar_url":"https://github.com/MapIV.png","language":"C++","readme":"# pointcloud_divider\n\n(Updated 2024/06/18)\n\nThis is a tool for processing pcd files, and it can perform the following functions:\n\n* Dividing point clouds\n* Merging point clouds\n* Downsampling point clouds\n* Generating metadata to efficiently handle the divided point clouds\n\n## Supported Data Format\n\n**Currently, only `pcl::PointXYZI` is supported. Any PCD will be loaded as `pcl::PointXYZI` .**\n\nThis tool can be used with files that have data fields other than `XYZI` (e.g., `XYZRGB`) and files that only contain `XYZ`.\n\n* Data fields other than `XYZI` are ignored during loading.\n* When loading `XYZ`-only data, the `intensity` field is assigned 0.\n\n## Installation\n\n```bash\n$ git clone https://github.com/MapIV/pointcloud_divider.git\n$ cd pointcloud_divider\n$ mkdir build\n$ cd build\n$ cmake ..\n$ make\n```\n\n## Usage\n\n  * Select directory, process all files found with `find $INPUT_DIR -name \"*.pcd\"`.\n\n  ```bash\n  $ ./scripts/pointcloud_divider.sh \u003cINPUT_DIR\u003e \u003cOUTPUT_DIR\u003e \u003cPREFIX\u003e \u003cCONFIG\u003e\n  ```\n\n  * Select individual files\n\n  ```bash\n  $ ./scripts/divider_core.sh \u003cPCD_0\u003e ... \u003cPCD_N\u003e \u003cOUTPUT_DIR\u003e \u003cPREFIX\u003e \u003cCONFIG\u003e\n  ```\n\n  | Name            | Description                                  |\n  |-----------------|----------------------------------------------|\n  | INPUT_DIR       | Directory that contains all PCD files        |\n  | PCD_0 ... PCD_N | Input PCD file name                          |\n  | OUTPUT_DIR      | Output directory name                        |\n  | PREFIX          | Prefix of output PCD file name               |\n  | CONFIG          | Config file ([default](config/default.yaml)) |\n\n `INPUT_DIR`, `PCD_N`, `OUTPUT_DIR` and `CONFIG` can be specified as both **relative paths** and **absolute paths**.\n\nNOTE:  The `OUTPUT_DIR` must already exist. If it does not, an error will occur, and the process will terminate.\n\n## Parameter\n\n* **merge_pcds** [boolean]\n\n    All PCD files are merge into a single PCD. No divided PCD files are generated.\n\n* **leaf_size** [double]\n\n    The leaf_size of voxel grid filter for pointcloud downsampling. The unit is meters [m].\n    If the value is less than or equal to 0, downsampling is skipped.\n\n* **grid_size_[xy]** [int]\n\n   The size of the grid for dividing point clouds. The unit is meters [m].\n   **NOTE: Even if `merge_pcds` is true, this is used to determine the clusters for downsampling.**\n   Therefore, when downsampling without dividing the point cloud, users should not set an excessively large value, such as 100,000. Specifying a large grid size will attempt to load all point clouds into memory and process them at once, which will result in abnormal memory usage.\n\n* **use_large_grid** [boolean]\n\n    Pack output PCD files in larger grid directory.\n    When `merge_pcds` is true, this parameter is ignored.\n    The large grid is fixed at 10 times the size of grid_size_[xy].\n    For example, if the point cloud is divided into 10m x 10m PCD files, a subdirectory like 00100_00100 will contain up to 100 PCD files.\n\nHow the point cloud is processed.\n\n![node_diagram](docs/how_to_be_downsampled.drawio.svg)\n\nHow the PCD file is named\n\n![node_diagram](docs/output_file_name_pattern.drawio.svg)\n\n### Parameter example\n\n1. Dividing a single point cloud without downsampling\n\n```yaml\n  use_large_grid: false\n  merge_pcds: false\n  leaf_size: -1.0 # any negative number\n  grid_size_x: 20\n  grid_size_y: 20\n```\n\n2. Downsampling and merging divided point clouds into a single file\n\n```yaml\n  use_large_grid: false\n  merge_pcds: true\n  leaf_size: 0.2\n  grid_size_x: 20\n  grid_size_y: 20\n```\n\n## Metadata YAML Format\n\nThe metadata file should be named `metadata.yaml`. It contains the following fields:\n\n- `x_resolution`: The resolution along the X-axis.\n- `y_resolution`: The resolution along the Y-axis.\n\nAdditionally, the file contains entries for individual point cloud files (`.pcd` files) and their corresponding grid coordinates. The key is the file name, and the value is a list containing the X and Y coordinates of the lower-left corner of the grid cell associated with that file. The grid cell's boundaries can be calculated using the `x_resolution` and `y_resolution` values.\n\nFor example:\n\n```yaml\nx_resolution: 100.0\ny_resolution: 150.0\nA.pcd: [1200, 2500] # -\u003e 1200 \u003c= x \u003c= 1300, 2500 \u003c= y \u003c= 2650\nB.pcd: [1300, 2500] # -\u003e 1300 \u003c= x \u003c= 1400, 2500 \u003c= y \u003c= 2650\nC.pcd: [1200, 2650] # -\u003e 1200 \u003c= x \u003c= 1300, 2650 \u003c= y \u003c= 2800\nD.pcd: [1400, 2650] # -\u003e 1400 \u003c= x \u003c= 1500, 2650 \u003c= y \u003c= 2800\n...\n```\n\n## LICENSE\n\nThis repository is under [BSD-3-Clauses](LICENSE) license\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmapiv%2Fpointcloud_divider","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmapiv%2Fpointcloud_divider","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmapiv%2Fpointcloud_divider/lists"}