当前位置:网站首页>Cloudcompare learning (1) - cloudcompare compilation and common plug-in implementation
Cloudcompare learning (1) - cloudcompare compilation and common plug-in implementation
2022-07-03 08:21:00 【CHPCWWHSU】
Recently, due to the need of work , Leaning towards the learning of point cloud algorithm library . Given some disordered three-dimensional points , You can build a triangulation of point clouds , Then texture , If the algorithm is robust enough , It's also very powerful , After all, we get a model from some points . Because I just started , Start with open source libraries and open source software , First, learn the action of the software , Then analyze the source code .CloudCompare It is a very good open source point cloud display and processing software , In particular, there is a better framework , Make it highly scalable , This is also worth learning . It USES the GPL to grant authorization , The application software developed under this framework must also be open source , This may not be friendly to commercial companies , But it's still good for code friends .
The following is mainly from two aspects CloudCompare The understanding of the . The first is to compile it , Then manually implement a plug-in function of point cloud thinning , From these two aspects, we have entered CompareCloud The palace of learning .
1、CloudCompare V2.12 Compilation of
1.1 Source download
Source code can be obtained from CloudCompare Official website , or github Upload and download , Address the following :
https://github.com/cloudcompare/cloudcompare
2.2 Source code compilation
use CMake Compile ,CMake You can download it yourself , As shown in the figure below CMake After the results of the :

Configure->Generate->OpenProject, Then generate install It will be generated successfully , Get an executable CloudCompare Software . Of course, you get it like this CloudCompare It is relatively simplified , You can check the above figure PLUGIN Options in , To add corresponding interfaces to the software , At the same time, you need to configure the required third-party libraries , Check... As shown in the figure below PLUGIN_IO_QLAS_FWF.

Compiled in this way CloudCompare Can achieve las Import and export of format point cloud .
The following figure shows the display of a point cloud :

2、CloudComapre Implementation of point cloud thinning plug-in
CLoudCompare Provides the basis for GL Visual plug-ins 、 be based on IO Read plug-ins 、 Interface of ordinary function plug-ins , And provides basic examples , As shown in the figure below :

This article rewrites ordinary function plug-ins , Get the plug-in project PointThnningPlugin, Realize the function of point cloud thinning . There are three steps , as follows :
1) modify cmake file , take CMakeLists.txt The project name in is changed to PointThnningPlugin, And add sub projects outside PointThnningPlugin.
2) Modify plug-in description file , Include images Icon 、.qrc Resource file 、info. file .
3) Modify the header file and main program , Will appear in the header file and the main program ExamplePlugin Replace all parts of with PointThnningPlugin.
4) In the main program, the button callback function doAction() Add an algorithm to realize point cloud thinning .
5) Build plug-ins , That is, recompile , And check the PointThnningPlugin Plug in options .
Finally, the compiler gets CloudCompare, As shown in the figure below :

1) Click button ,2) Get the dilution parameter input box ,3) Input the dilution parameter . Get the following thinning effect :

After thinning, the point cloud becomes the original point cloud 20%.
This paper reproduces a random thinning algorithm , That is, through octree construction and segmentation of three-dimensional space , Get a certain number of spatial grids , Each space grid retains a point closest to the center of its own space grid to achieve the thinning of the point cloud .
This study only includes CloudCompare The appearance of , Under its ordinary plug-in interface , Added the function of point cloud thinning , It does not involve ccStdPluginInterface,ccDefaultPluginInterface And other interfaces , It's not about CloudCompare Framework Research , But only when you are familiar with performance can you further learn its mechanism , Next, I will continue to study its appearance , Refer to official documents , This article provides download links https://download.csdn.net/download/CPWWHSU/12678986, Further familiarity CloudComapre The function of , Then return to the original three-dimensional modeling study , Familiar with existing open source libraries (VCGLib、CGAL) The function of , Understand the principle . At the same time, this article provides the source code of point cloud thinning plug-in ( It is reproduced in a random thinning algorithm based on spatial octree ) link https://download.csdn.net/download/CPWWHSU/12678987, Add it to CloudCompare In the source code , You can add a point cloud thinning plug-in . Please understand the shortcomings of this article , Hope to be like everyone , Learning together , Progress together .
边栏推荐
- the installer has encountered an unexpected error installing this package
- E: Unable to locate package ROS melody desktop full
- Conversion between string and int types in golang
- 2021-10-19
- 一条通往服务器所有端口的隧道
- Introduction to Base64 coding
- Swagger document configuration
- UE4 call DLL
- C language - Introduction - essence Edition - take you into programming (I)
- Storage of data
猜你喜欢

Viz artist advanced script video tutorial -- stringmap use and vertex operation

the installer has encountered an unexpected error installing this package

Some understandings of 3dfiles

简易入手《SOM神经网络》的本质与原理

Simply start with the essence and principle of SOM neural network

Multi traveling salesman problem -- overview of formula and solution process

Basic operation and process control 2

freetype库的移植

详解sizeof、strlen、指针和数组等组合题

Unity2019_ Natural ambient light_ Sky box
随机推荐
Demonstration of plug-in use of ventuz basic series
Delete the last character of the string in golang
Simply start with the essence and principle of SOM neural network
Un système de gestion de centre commercial pour la conception de cours de technologie d'application de base de données
Open the influence list of "National Meteorological Short Videos (Kwai, Tiktok) in November" in an interactive way“
Youyou1 of xlua knapsack system
Ue5 opencv plug-in use
Mxone Pro adaptive 2.0 film and television template watermelon video theme apple cmsv10 template
Storage of data
Redis data structure
Golang url的编码和解码
KunlunBase MeetUP 等您来!
Haproxy+kept build 01
Mutual call between Lua and C #
String class
C#课程设计之学生教务管理系统
Osgearth target selection
梯度下降法求解BP神经网络的简单Demo
C course design employee information management system
Clip Related Script