当前位置:网站首页>Actual combat | how to make a slam track truth acquisition device?
Actual combat | how to make a slam track truth acquisition device?
2022-06-23 13:39:00 【Xiaobai learns vision】
Click on the above “ Xiaobai studies vision ”, Optional plus " Star standard " or “ Roof placement ”
Heavy dry goods , First time delivery The author yangxiaodong authorized the reprint of this article , Unauthorized reproduction is prohibited
original text : https://zhuanlan.zhihu.com/p/57235987
SLAM A very important indicator of performance is Positioning accuracy , Public indoor data sets generally use Mobile capture equipment Get the true value of the device track . But mobile capture equipment Expensive ,OptiTrack Over a million , domestic Nokov >20W. No mobile capture equipment , It's hard for us to use Data collected by yourself assessment SLAM Positioning performance .
So , We built a cheap track truth capture device . Use a fixed Monocular camera obtain Plane motion Of Trace truth . We mainly use this method to measure the trajectory of indoor mobile robot .
This paper gives the principle and code .
Be careful : It can only measure 2D Motion in a plane , No 3D.
1. principle
Here's the picture , One is fixed on the bracket Down looking monocular camera , It is used to capture a flat sticker on the top of the robot ArUco code .ArUco The pose of the robot is known ( This should be easy to do ). The problem we need to solve is to use monocular camera to measure ArUco The position and pose of the code on the plane . actually ,OpenCV Provided ArUco The library of , Can achieve ArUco The identification of code , And provide code Pixel coordinates of the four corners . If we can calculate the coordinates of the four corners in the plane , The robot's position and posture on the plane can be calculated ( Position and orientation ). Let's talk about how to calculate the position of a point on the plane .

In the world coordinate system , One 3D The point of
, Project to image coordinates , Can be expressed as

T Is external parameter . What we want to measure is 2D Coordinates in the plane , For convenience , You can set the origin of the world coordinate system on the plane ,Z The axis is perpendicular to this plane ( Namely ArUco That plane ). that
Of z =0 . type (1) It can become

Points on the plane
And pixels on the image
It's a connection between them . Between them is a homography matrix H .
We just need to know this homography matrix H , You can use the image pixelsGet its on the plane 2D coordinate
2. The question now is how the homography matrix comes from ?
Slave mode (2) It can be seen that , As long as you know the internal parameters of the camera K And external parameters T ,H And then there is . Parameter K To say , Everyone should be familiar with . The key is T, Here we use a plane target to calibrate . Concrete , As shown in the figure below, place a checkerboard target on ArUco Above the yard , adopt PnP The method can calculate the pose transformation between the target coordinate system and the camera coordinate system T'. Be careful , The plane of the checkerboard target is not ArUco The plane of the code , Because the checkerboard target has a thickness t. This thickness t We can easily measure , Consider to be known . that , Camera coordinate system and ArUco The coordinate transformation between the world coordinate systems on the surface is

thus , We get the external parameters T . adopt (2) Then we can get homography matrix H.

3. The following problem is to calculate the pose of the robot

Pictured above , Just now we mentioned , You can get... On the image ArUco code Pixel coordinates of the four corners , It's written here as

Use (3) type , The coordinates of these four points in the world coordinate system can be calculated respectively ( Is the coordinates in the plane )

About the position of the robot , In fact, we only need the coordinates of a point , Namely ArUco Coordinates of code center point . So we combine four points into one point :

Is the position of the robot .
Next, we need to calculate the posture of the robot , stay 2D The plane is facing . The orientation can be calculated with two points , Now we have four dots in our hands , Then average it .θ Is the orientation of the robot .
4. The accuracy of measurement
Since you want to use it as a truth value , It requires sufficient measurement accuracy . Now let's analyze the measurement accuracy . Let's do it (3) an

elimination λ You can get

If the image u Precision of pixel extraction in the direction - The variance of
,v Precision of direction - The variance of
. That is, the covariance of the pixel is

So the measured point on the plane
The covariance of is

At this point, the accuracy analysis is finished , That is to say, the homography matrix is marked H after , adopt (12) The approximate measurement accuracy can be calculated by the formula .
actually , You can also bring the internal and external parameters of the camera into (3) type , combining (12) type , An analytic precision expression can be obtained . This is more complicated . If the camera is installed only around the camera coordinate system relative to the measurement plane x If the axis rotates by an angle , The accuracy distribution in the measurement area is shown in the following figure . If the camera is facing the measuring plane , The measurement accuracy of the measurement area is the same . Of course , The higher the resolution of the camera, the higher the precision . The longer the focal length, the higher the accuracy , But at the same time, the measurable area will become smaller .
My own camera is Daheng MER-302-56U3C The camera ,2048×1536 Pixels ; The lens is kowa LM3NC1M,3.5mm wide-angle lens ; The distance between the camera and the measuring plane is about 2m. The measurable range is about 4m×3m. If it is considered that the pixel extraction accuracy is 1 individual pixel Words , The measurement accuracy is about 2mm. This precision is sufficient for SLAM Trajectory evaluation .

5. About the measuring range
If the camera is facing the measuring plane , The measurement area is a rectangle . If the camera is tilted , The measuring area is a general quadrilateral . The picture above is a kind of . Measure the size of the area and the angle of view of the lens 、 Camera mounting height 、 It all depends on the angle , More complicated . in general , In order to make the measurement accuracy in the measurement plane consistent , Try to keep the camera facing the measuring plane . The shorter the focal length , The larger the measuring field of view , However, the measurement accuracy decreases . In order to obtain sufficient measurement accuracy , You need a high-resolution camera . To lower the suspension height , You need a short focus lens .
6. Code
All codes for calibration and measurement are as follows
https://github.com/ydsf16
The good news !
Xiaobai learns visual knowledge about the planet
Open to the outside world

download 1:OpenCV-Contrib Chinese version of extension module
stay 「 Xiaobai studies vision 」 Official account back office reply : Extension module Chinese course , You can download the first copy of the whole network OpenCV Extension module tutorial Chinese version , Cover expansion module installation 、SFM Algorithm 、 Stereo vision 、 Target tracking 、 Biological vision 、 Super resolution processing and other more than 20 chapters .
download 2:Python Visual combat project 52 speak
stay 「 Xiaobai studies vision 」 Official account back office reply :Python Visual combat project , You can download, including image segmentation 、 Mask detection 、 Lane line detection 、 Vehicle count 、 Add Eyeliner 、 License plate recognition 、 Character recognition 、 Emotional tests 、 Text content extraction 、 Face recognition, etc 31 A visual combat project , Help fast school computer vision .
download 3:OpenCV Actual project 20 speak
stay 「 Xiaobai studies vision 」 Official account back office reply :OpenCV Actual project 20 speak , You can download the 20 Based on OpenCV Realization 20 A real project , Realization OpenCV Learn advanced .
Communication group
Welcome to join the official account reader group to communicate with your colleagues , There are SLAM、 3 d visual 、 sensor 、 Autopilot 、 Computational photography 、 testing 、 Division 、 distinguish 、 Medical imaging 、GAN、 Wechat groups such as algorithm competition ( It will be subdivided gradually in the future ), Please scan the following micro signal clustering , remarks :” nickname + School / company + Research direction “, for example :” Zhang San + Shanghai Jiaotong University + Vision SLAM“. Please note... According to the format , Otherwise, it will not pass . After successful addition, they will be invited to relevant wechat groups according to the research direction . Please do not send ads in the group , Or you'll be invited out , Thanks for your understanding ~边栏推荐
- KDD 2022 | epileptic wave prediction based on hierarchical graph diffusion learning
- IEEE Transaction期刊修改过程记录
- Yyds dry inventory solution sword finger offer: judge whether it is a balanced binary tree
- First exposure! The only Alibaba cloud native security panorama behind the highest level in the whole domain
- Scope of groovy
- How to solve the task cache compilation problem caused by gradle build cache
- 深入剖析MobileNet和它的变种
- 2022 年以后,对AI开发人员意味着什么
- [deeply understand tcapulusdb technology] transaction execution of document acceptance
- sed -i命令怎么使用
猜你喜欢

4-way telephone +1-way Gigabit Ethernet 4-way PCM telephone optical transceiver

What is the principle of live CDN in the process of building the source code of live streaming apps with goods?

DBMS in Oracle_ output. put_ How to use line

618's money saving technology strategy is coming - experience the scene and get a 10 yuan cat super card!

How to enable the SMS function of alicloud for crmeb knowledge payment

Go寫文件的權限 WriteFile(filename, data, 0644)?

32-way telephone +2-way Gigabit Ethernet 32-way PCM telephone optical transceiver supports FXO port FXS voice telephone to optical fiber

windows 安装 MySQL

边缘和物联网学术资源

Detailed explanation of serial port, com, UART, TTL, RS232 (485) differences
随机推荐
618's money saving technology strategy is coming - experience the scene and get a 10 yuan cat super card!
R language uses matchit package for propensity matching analysis (set the matching method as nearest, match the control group and case group with the closest propensity score, 1:1 ratio), and use matc
你管这破玩意儿叫 MQ?
One way linked list implementation -- counting
How to use sed -i command
互联网技术发展内卷后的出路——iVX的诞生
R language dplyr package mutate_ The all function multiplies all numeric columns (variables) in the dataframe by a fixed value to generate a new data column, and specifies a user-defined suffix name f
ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked.
怎么手写vite插件
Is it safe for flush to open an account online? What should we pay attention to
Can cold plate, submerged and spray liquid cooling lead the development of high-performance computing?
Windows install MySQL
Esp32-c3 introductory tutorial problems ⑧ - blufi_ example. c:244: undefined reference to `esp_ ble_ gap_ start_ advertising
Cloud native essay deep understanding of ingress
Has aaig really awakened its AI personality after reading the global June issue (Part 1)? Which segment of NLP has the most social value? Get new ideas and inspiration ~
腾讯的技术牛人们,是如何完成全面上云这件事儿的?
Online text filter less than specified length tool
白皮书丨英特尔携手知名RISC-V工具提供商Ashling,着力扩展多平台RISC-V支持
TUIKit 音视频低代码解决方案导航页
Hanyuan high tech USB3.0 optical transceiver USB industrial touch screen optical transceiver USB3.0 optical fiber extender USB3.0 optical fiber transmitter