当前位置:网站首页>Summary | three coordinate systems in machine vision and their relationships
Summary | three coordinate systems in machine vision and their relationships
2022-07-02 16:20:00 【Xiaobai learns vision】
Click on the above “ Xiaobai studies vision ”, Optional plus " Star standard " or “ Roof placement ”
Heavy dry goods , First time delivery author : Lin Qingchun
link :https://zhuanlan.zhihu.com/p/59289459
This article reprints self-knowledge , The author has authorized , Do not reprint without permission .
One 、 Introduction to machine vision geometric coordinates
Machine vision system has three coordinate systems , Namely :1、 World coordinate system ,2、 Camera coordinate system ,3、 Images ( Pixels ) Coordinate system .
1、 World coordinate system
World coordinate system (Xw,Yw,Zw) Is the reference frame of the position of the target object , Set the dot position freely according to the convenience of operation , It can be located on the base of the robot hand or on the actuator at the front of the robot hand .
Its main function is
(1) The three-dimensional coordinates of the object ;
(2) During calibration, the position of the calibration object is determined according to the origin ;
(3) Give the positions of the two cameras relative to the world coordinate system , So as to find out the coordinate relationship between two or more cameras ;
2、 Camera coordinate system
Camera coordinate system (Xc,Yc,Zc) It is the coordinate system of the camera at its own angle , The origin is on the optical center of the camera ,Z The axis is parallel to the optical axis of the camera , That is, the shooting direction of the camera .
3、 Images ( Pixels ) Coordinate system
3.1、 Image coordinate system
Image coordinate system (x,y) Unit: meter or millimeter , Are continuous image coordinates or spatial coordinates , The coordinate system established with the intersection of diagonal lines of the picture as the datum origin .
3.2、 Pixel coordinate system
Pixel coordinate system (u,v) The unit scale is one pixel, Is discrete image coordinates or pixel coordinates , The origin is in the upper left corner of the picture .
4、 The relationship between coordinate systems
When we determine the position of an object in the picture , How to let the robot hand go to the actual position in space to grasp ? This requires the transformation of coordinates . The conversion from pixel to spatial point is opposite to the conversion from spatial point to pixel , Let's start with the derivation of the latter .
4.1、 Images Coordinate system and Pixels Coordinate system
The relationship between image coordinate system and pixel coordinate system is :

dx Represents the width of a pixel (x Direction ), And x Same unit ,x/dx Express x How many pixels are there on the axis , Empathy y/dy Express y Number of pixels on the axis ,(u0,v0) Is the center of the image plane .

Convert the above relationship into matrix form :

4.2、 The camera Coordinate system and Images Coordinate system
From the camera coordinate system to the image coordinate system, it is a three-dimensional coordinate to a two-dimensional coordinate (3D->2D) The process of , It is called perspective projection transformation . In order to solve the relationship between them , Put ordinary image coordinates (x,y) Expand to homogeneous coordinates (x,y,1). A point in space , The point projected on the image plane is in line with the optical center of the camera . Establish the camera coordinate system with the optical center as the origin :

According to the similar triangle relationship, we can get the following :

f Focus the camera ( The distance from the optical center of the camera to the imaging plane )
Expressed in matrix form as :

Unified use of points on the imaging plane (u,v) Express :

The relationship between image points and spatial points is :

4.3、 The world Coordinate system and The camera Coordinate system
World coordinates (Xw,Yw,Zw) And camera coordinates (Xc,Yc,Zc) Both are three-dimensional coordinates ( Right hand system , The three axes are perpendicular to each other ), The relationship between the two coordinate systems is rigid body transformation ( Rigid body transformation : When an object does not deform , Rotate a geometric object , Translational motion ). You can imagine it out of thin air , There are two coordinate systems A And B, How to integrate A The coordinates in the coordinate system are converted to B Coordinate system representation , First of all, will A The coordinate system rotates arbitrarily based on the origin , Make it x Axis ,y Axis ,z Shaft with B The coordinate axes are parallel and in the same direction , Then pan AB The linear distance of the origin of the coordinate system , It can be A The coordinates in the coordinate system are converted to B Coordinate system , This rotation Rotation And translation Transport It is the relationship between the two three-dimensional coordinates that needs to be obtained .
Use the following equation to express the relationship between the two coordinate systems :

Where the rotation matrix R It can be regarded as space coordinates along X,Y,Z The result of dot multiplication of three rotation matrices of the axis .
When around Z Shaft rotation θ angle , The relationship between the old and new coordinates is :

It is represented by a matrix as :

Empathy , Around the X Axis ,Y Shaft rotation φ and ω angle , You can get :


therefore , Get the rotation matrix R = R1*R2*R3, Dimension for 3X3,T For the translation matrix , Dimension for 3X1.
Expand to secondary coordinates :

4.4、 From world coordinates to pixel coordinates
Synthesize the process deduced above , World coordinates (Xw,Yw,Zw)—> Camera coordinates (Xc,Yc,Zc)—> Image coordinates (x,y)—> Pixel coordinates (u,v), The above sequence is represented by a matrix as continuous left multiplication of the next step , namely :

The product of the first two matrices on the right of the equation is called camera internal parameter , The third matrix is called camera external parameter , Calibration of the rear monocular camera , It is to solve the internal and external parameters of the camera .
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 ~边栏推荐
- JS learning notes - data types
- 忆当年高考|成为程序员的你,后悔了吗?
- 【小白聊云】中小企业容器化改造建议
- Data Lake (11): Iceberg table data organization and query
- idea jar包冲突排查
- JS learning notes - variables
- 潘多拉 IOT 开发板学习(RT-Thread)—— 实验2 RGB LED 实验(学习笔记)
- mysql数据库mysqldump为啥没有创建数据库的语句
- JS learning notes - first acquaintance
- Summary of multithreading and thread synchronization knowledge
猜你喜欢

mysql min() 求某条件下最小的值出现多个结果

Mysql database mysqldump why there is no statement to create a database

idea jar包冲突排查

Boot 事务使用

图数据库|Nebula Graph v3.1.0 性能报告

Solve * * warning * *: your ApplicationContext is unlikely to start due to a @componentscan of the defau

MySQL calculates the data within the longitude and latitude range

Nebula Graph & 数仓血缘关系数据的存储与读写

Armv8-a programming guide MMU (4)

mysql 计算经纬度范围内的数据
随机推荐
SSM整合-异常处理器及项目异常处理方案
图数据库|Nebula Graph v3.1.0 性能报告
仙人掌之歌——投石问路(2)
Remove the underline in router link
Introduction to dynamic planning I, BFS of queue (70.121.279.200)
Another graduation season
End time processing method of wechat v3native payment settings
Crawl the information of national colleges and universities in 1 minute and make it into a large screen for visualization!
理想之光不灭
微信v3native支付设置的结束时间处理办法
AWS virtual machine expansion
Kubernetes family container housekeeper pod online Q & A?
Recalling the college entrance examination and becoming a programmer, do you regret it?
Some problems about MySQL installation
Storage, reading and writing of blood relationship data of Nepal Graph & Data Warehouse
Figure database | Nepal graph v3.1.0 performance report
【题解】Educational Codeforces Round 82
华为云服务器安装mysqlb for mysqld.service failed because the control process exited with error code.See “sys
Flink real-time data warehouse (7): Flink realizes the full pull module to extract data in MySQL
[Yu Yue education] reference materials of sensing and intelligent control technology of Nanjing University of Technology