{"id":13322629,"url":"https://github.com/codebydant/pcl_visualizer","last_synced_at":"2025-03-11T02:31:58.156Z","repository":{"id":37903287,"uuid":"149481269","full_name":"codebydant/pcl_visualizer","owner":"codebydant","description":"Visualizer for 3D point cloud using PCL Library 1.9.1","archived":false,"fork":false,"pushed_at":"2022-08-16T13:30:48.000Z","size":678,"stargazers_count":8,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-09-12T01:24:52.216Z","etag":null,"topics":["c-plus-plus","clang-format","cmake","computer-vision","cpp","pcd","pcl","pcl-library","pcl-viewer","ply","point-cloud","xyz"],"latest_commit_sha":null,"homepage":"https://raw.githubusercontent.com/danielTobon43/pcl_visualizer/master/example/example.png","language":"CMake","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codebydant.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}},"created_at":"2018-09-19T16:35:28.000Z","updated_at":"2024-05-26T14:41:45.000Z","dependencies_parsed_at":"2022-08-31T08:20:14.268Z","dependency_job_id":null,"html_url":"https://github.com/codebydant/pcl_visualizer","commit_stats":null,"previous_names":["dtcmlops/pcl_visualizer","danieltobon43/pcl_visualizer","codebydant/pcl_visualizer"],"tags_count":null,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebydant%2Fpcl_visualizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebydant%2Fpcl_visualizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebydant%2Fpcl_visualizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebydant%2Fpcl_visualizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codebydant","download_url":"https://codeload.github.com/codebydant/pcl_visualizer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242959451,"owners_count":20212983,"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":["c-plus-plus","clang-format","cmake","computer-vision","cpp","pcd","pcl","pcl-library","pcl-viewer","ply","point-cloud","xyz"],"created_at":"2024-07-29T18:39:34.575Z","updated_at":"2025-03-11T02:31:58.147Z","avatar_url":"https://github.com/codebydant.png","language":"CMake","readme":"# pcl_visualizer\n![example workflow](https://github.com/danielTobon43/pcl_visualizer/actions/workflows/ci.yml/badge.svg?branch=master)\n\nVisualizer for a 3D point cloud using PCL Library 1.8...1.12.1\n\n----------------------\n\nThis program display a PCL viewer for input point cloud data\n\n## Input file structure support\n| Format      | Description |\n| ----------- | ----------- |\n| .pcd      | Point Cloud Data file format       |\n| .ply   | Polygon file format        |\n| .txt   | Text file format        |\n| .xyz      | X Y Z Text file format       |\n\n\n## Example\n![Screenshot from 2022-06-03 08-21-25](https://user-images.githubusercontent.com/35694200/171862553-c287954b-1a58-4005-8831-c035924ee57f.png)\n![Screenshot from 2022-06-03 08-26-18](https://user-images.githubusercontent.com/35694200/171863365-5e259039-7980-47fa-a4ef-34ac20e8db6d.png)\n![Screenshot from 2022-06-03 08-31-38](https://user-images.githubusercontent.com/35694200/171864244-aac54f80-6bb0-4ec5-ab0c-e19f669163a1.png)\n\n## Help\n```\n| Help:\n-------\n          p, P   : switch to a point-based representation\n          w, W   : switch to a wireframe-based representation (where available)\n          s, S   : switch to a surface-based representation (where available)\n\n          j, J   : take a .PNG snapshot of the current window view\n          c, C   : display current camera/window parameters\n          f, F   : fly to point mode\n\n          e, E   : exit the interactor\n          q, Q   : stop and call VTK's TerminateApp\n\n           +/-   : increment/decrement overall point size\n     +/- [+ ALT] : zoom in/out \n\n          g, G   : display scale grid (on/off)\n          u, U   : display lookup table (on/off)\n\n    o, O         : switch between perspective/parallel projection (default = perspective)\n    r, R [+ ALT] : reset camera [to viewpoint = {0, 0, 0} -\u003e center_{x, y, z}]\n    CTRL + s, S  : save camera parameters\n    CTRL + r, R  : restore camera parameters\n\n    ALT + s, S   : turn stereo mode on/off\n    ALT + f, F   : switch between maximized window mode and original size\n\n          l, L           : list all available geometric and color handlers for the current actor map\n    ALT + 0..9 [+ CTRL]  : switch between different geometric handlers (where available)\n          0..9 [+ CTRL]  : switch between different color handlers (where available)\n\n    SHIFT + left click   : select a point (start with -use_point_picking)\n\n          x, X   : toggle rubber band selection mode for left mouse button\n```\n\n## Compilation\nYou can either compile the source code with CMake or download a pre-compiled docker image.\n\n### Compile from source code\nThis program depends on PCL, VTK and OpenGL.\n\n1. In the root folder create a build directoy\n\n```\nmkdir build\n```\n2. Create compilation files\n   \n```\ncd build/ \u0026\u0026 cmake ../src/\n```\n3. Compile project\n   \n```\nmake\n```\n\nExpected output\n\n![Screenshot from 2022-06-03 08-35-43](https://user-images.githubusercontent.com/35694200/171864937-91aa8a3d-8bff-4f08-a3f8-d084a6243b5c.png)\n       \n        \t \n## Test\n```\n./pcl-visualizer \u003ccloud file\u003e \n```\nExpected output\n\n![Screenshot from 2022-06-03 08-39-30](https://user-images.githubusercontent.com/35694200/171865601-c64efd17-a088-4f3f-afda-c62d20d04f93.png)\n\n### Download docker image\nThis [image](https://hub.docker.com/r/danieltobon43/pcl-visualizer) is based on Linux Alpine 3.15 and has the following packages installed:\n\n- VTK-9.1.0\n- PCL-1.12.0\n- Eigen-3.7.7\n- Flann-1.9.1\n- Boost-1.77.0\n\nIt's a lightweight [1.27GB] PCL docker image with the visualization module pre-compiled that uses the pcl-visualizer project to display a cloud\n\n**PCL modules:**\n```\nThe following subsystems will be built:\n--   common\n--   kdtree\n--   octree\n--   search\n--   geometry\n--   io\n--   visualization\n-- The following subsystems will not be built:\n--   sample_consensus: Disabled manually.\n--   filters: Disabled manually.\n--   2d: Disabled manually.\n--   features: Disabled manually.\n--   ml: Disabled manually.\n--   segmentation: Disabled manually.\n--   surface: Disabled manually.\n--   registration: Disabled manually.\n--   keypoints: Disabled manually.\n--   tracking: Disabled manually.\n--   recognition: Disabled manually.\n--   stereo: Disabled manually.\n--   apps: Disabled by default\n--   benchmarks: Disabled by default\n--   outofcore: Disabled manually.\n--   examples: Code examples are disabled by default.\n--   people: Disabled manually.\n--   simulation: Disabled by default.\n--   global_tests: Disabled by default\n--   tools: Disabled manually.\n-- Configuring done\n-- Generating done\n```\n\n1. Download image from Docker hub\n```\ndocker pull danieltobon43/pcl-visualizer:1.0-alpine3.15\n```\n\n2. Create a `visualizer.sh` file with executable permissions.\n   \n![Screenshot from 2022-06-03 10-16-13](https://user-images.githubusercontent.com/35694200/171882906-75831bea-64f5-4cd6-9220-2d7a0ef46616.png)\n\n3. Copy the next content into the `visualizer.sh` file (remember to update PATH/TO/YOUR/PCD/PLY/FOLDER accordingly):\n```\n# Allow X server connection\nxhost +local:root\ndocker run -it --rm \\\n    --env=\"DISPLAY\" \\\n    --env=\"QT_X11_NO_MITSHM=1\" \\\n    --name=\"pcl-container\" \\\n    --volume=\"/tmp/.X11-unix:/tmp/.X11-unix:rw\" \\\n    --volume=PATH/TO/YOUR/PCD/PLY/FOLDER:/tmp \\\n    danieltobon43/pcl-visualizer:1.0-alpine3.15 /tmp/$1\n# Disallow X server connection\nxhost -local:root\n```\n\ne.g. \n\nI have a folder called `files` at `/home/user/Downloads/files` with .pcd files. Then, replacing the line:\n\n`--volume=/home/user/Downloads/files:/tmp` and saving the changes will have:\n\n```\n# Allow X server connection\nxhost +local:root\ndocker run -it --rm \\\n    --env=\"DISPLAY\" \\\n    --env=\"QT_X11_NO_MITSHM=1\" \\\n    --name=\"pcl-container\" \\\n    --volume=\"/tmp/.X11-unix:/tmp/.X11-unix:rw\" \\\n    --volume=/home/user/Downloads/files:/tmp \\\n    danieltobon43/pcl-visualizer:1.0-alpine3.15 /tmp/$1\n# Disallow X server connection\nxhost -local:root\n```\nThis command will run a docker container called: `\"pcl-container\"` with the `danieltobon43/pcl-visualizer:1.0-alpine3.15` image. \n\nThe environment variables `QT_X11_NO_MITSHM`, `DISPLAY` will activate a tunel for displaying a GUI in docker (More info [here](https://www.mit.edu/~arosinol/2019/08/06/Docker_Display_GUI_with_X_server/)).\n\nThe `--volume=/home/user/Downloads/files:/tmp` line will mount the `files` folder from the host machine (my PC) into the location especified in the docker container, e.g `/tmp` folder in this case. This will allow to the project `pcl-visualizer` have access to the `.pcd`/`.ply` files inside the container.\n\nFinally, the last line is the call to the `danieltobon43/pcl-visualizer:1.0-alpine3.15 /tmp/$1` image with a command line parameter given by the `/tmp/$1` file-path.\n\n4. Run a docker container with the following command:\n```\n./visualizer.sh YOUR-PCD-PLY-FILENAME\n```\n\ne.g. \n```\n./visualizer.sh Tree1.pcd \n```\n\n## Contributions\nThis project is open to any contribution, either a new format parser PR, CI workflow improvement, documentation, etc.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodebydant%2Fpcl_visualizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodebydant%2Fpcl_visualizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodebydant%2Fpcl_visualizer/lists"}