当前位置:网站首页>Rebuild my 3D world [open source] [serialization-1]
Rebuild my 3D world [open source] [serialization-1]
2022-07-05 08:55:00 【Li Yingsong~】
I want to do something interesting recently : Rebuild around me 3D The world . This sounds like a cool thing , In fact, many people have done , And did well , I know there is a big wisdom map 、Pix4D、PhotoScan、ContextCapture And other commercial software that has already been done very well . But it doesn't need business to spend a little time License Ready to use software still seems to make sense , Anyway, I want to write some code .
thank Github The open source community , I plan to use it first VS2019+QT+ Open source algorithm library OpenMVG+OpenMVS To do this , Simply take the first step , If there is time later , Maybe there will be more interesting things to do .
As QT beginner , It is bound to appear rough in interface development ( Very slow, too !).
Please forgive me .
compile OpenMVG+OpenMVS
First , We went to the Github On Clone OpenMVG as well as OpenMVS Source code , And then use cmake-gui Compile . This is a troublesome process , The process doesn't show .
PS. compiled OpenMVG(vs2019) engineering , I put it on Baidu online disk , link :https://pan.baidu.com/s/1X9nBeWHXeHR8ETSIqH23XQ Extraction code :1i42, Interested students download by themselves .
then , download QT, The version number I selected is 5.12.9, Largely because this version is free .
Last , Build a QT UI engineering , Take a pretending name :TellusBuilder.
Besides , I also use third-party libraries Eigen For matrix operations and OpenCV For images IO, The version numbers are 3.2.8 and 3.1.0.
1. Add an image and display
After building the project , The first function we need to achieve is to add images and display , Add a name "Add Images" The menu item of , And write the slot function in the main framework class , What the slot function needs to do is to open the dialog box and import multiple images .
At the same time, design and implement a QTreeView, It is attached to a DockPane above , Imported image information ( The most intuitive is the image name ) Will be in Tree Control is displayed one by one .
I also implemented a simple interactive function : double-click Tree Control , It's on the right 2D The image is displayed in the view window . Concrete , After double clicking the command , I will follow the absolute path of the image , Import the image and render .
Um. , Simple and full of temptation to Xiaobai !
These operations took not a long time , Under the final rendering :
At present only 2K There is such an interface effect on the display .( cough , Adaptive window adjustment is not done yet , food !)
2. link OpenMVG, Realization SFM
SFM, It is well known Structure From Motion( Exercise restores structure ), This term sounds very professional , Simply speaking , This step does two things :
- Restore the camera of each image at the time of shooting Postures ( Position and posture ), There are two ways of expression , One is commonly used in the field of photogrammetry X , Y , Z , ϕ , ω , κ X,Y,Z,\phi,\omega,\kappa X,Y,Z,ϕ,ω,κ Expression ; The second is commonly used in the field of computer vision R , t R,t R,t Expression . They are equivalent , It's just in different forms , To describe the position and attitude of the camera , Popular said , It is to determine where and in which direction each image is taken by the camera .
- Restore the intrinsic internal parameters of the camera , Like focal length 、 Principal point 、 Distortion parameters, etc , This is optional , Because in some cases, the camera has calibrated these internal parameters in advance .
There are many open source libraries that can complete this step , such as OpenMVG、Colmap、MVE etc. , This time I choose OpenMVG, It integrates incremental 、 Global 、 Hybrid SFM, For unordered image sets , I expect it to have a more robust performance .
OpenMVG Of Github Address :Github : openMVG
OpenMVG Document address :OpenMVG : The Open Multiple View Geometry Library
stay OpenMVG Introduction , There is a picture , The description is SFM Basic steps : First, extract the feature descriptor , Then match the feature points between the images , And then through SFM Complete the recovery of the whole structure . Of course, the actual algorithm implementation will be far more complex than the description , There is no extension here .
( The picture is from OpenMVF Of Github Introduce )
Okay , That's all for today , The first step of the long march , I feel more like a software development exercise at present , Even the whole cycle, I think, may be like this , But I think it doesn't matter , Build the software framework , We can do more . The visual interface is still more comfortable than the console , It's not excluding the console , It may be that there are too many algorithms developed to find something new , Some people must think the console is cooler !
Next, let's see how to use OpenMVG Library to complete SFM The process , So as to get the position and posture of each figure , At the same time, there will be some sparse points in 3D space and camera rendering .
I will put the code in my Github Warehouse :TellusBuilder in , Interested students , It is suggested to click star and watch, Of course, based on my work, what I want to do in the future is also welcome fork ah .
If you think this series is good , Please let me know in the comments section , Maybe I will update more diligently !
边栏推荐
- Yolov4 target detection backbone
- Codeforces Round #648 (Div. 2) D. Solve The Maze
- JS asynchronous error handling
- Halcon clolor_ pieces. Hedv: classifier_ Color recognition
- Guess riddles (3)
- kubeadm系列-02-kubelet的配置和启动
- The location search property gets the login user name
- Halcon shape_ trans
- The combination of deep learning model and wet experiment is expected to be used for metabolic flux analysis
- Return of missing persons
猜你喜欢

混淆矩阵(Confusion Matrix)

Pytorch entry record

Redis实现高性能的全文搜索引擎---RediSearch

Halcon: check of blob analysis_ Blister capsule detection

Guess riddles (9)
![[matlab] matlab reads and writes Excel](/img/80/78e4c7fcd27473526e480d4b930e2c.jpg)
[matlab] matlab reads and writes Excel

Introduction Guide to stereo vision (1): coordinate system and camera parameters

Halcon affine transformations to regions

Guess riddles (2)
![[code practice] [stereo matching series] Classic ad census: (6) multi step parallax optimization](/img/54/cb1373fbe7b21c5383580e8b638a2c.jpg)
[code practice] [stereo matching series] Classic ad census: (6) multi step parallax optimization
随机推荐
asp. Net (c)
Use arm neon operation to improve memory copy speed
C#绘制带控制点的Bezier曲线,用于点阵图像及矢量图形
Guess riddles (3)
Wechat H5 official account to get openid climbing account
My university
Typescript hands-on tutorial, easy to understand
Introduction Guide to stereo vision (1): coordinate system and camera parameters
kubeadm系列-00-overview
【日常训练】1200. 最小绝对差
Mathematical modeling: factor analysis
[code practice] [stereo matching series] Classic ad census: (5) scan line optimization
Programming implementation of ROS learning 5-client node
Guess riddles (4)
Ros-10 roslaunch summary
Solution to the problems of the 17th Zhejiang University City College Program Design Competition (synchronized competition)
Codeworks round 639 (Div. 2) cute new problem solution
uni-app 实现全局变量
多元线性回归(梯度下降法)
Halcon shape_ trans