当前位置:网站首页>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 ~
边栏推荐
- 注册成为harmonyos开发者并安装DevEco Studio 3.0 Beta2 for HarmonyOS
- [5g NR] RRC connection release
- 如何實現十億級離線 CSV 導入 Nebula Graph
- Flink real-time data warehouse (7): Flink realizes the full pull module to extract data in MySQL
- Leetcode -- number of palindromes
- 解决** WARNING ** : Your ApplicationContext is unlikely to start due to a @ComponentScan of the defau
- Dimension table and fact table in data warehouse
- IDEA中设置背景图片(超详细)
- 数学分析_笔记_第6章:一元函数的Riemann积分
- Leetcode --- longest public prefix
猜你喜欢
2022 the latest and most detailed will successfully set the background image in vscade and solve unsupported problems at the same time
HMS core machine learning service helps zaful users to shop conveniently
Storage, reading and writing of blood relationship data of Nepal Graph & Data Warehouse
End time processing method of wechat v3native payment settings
Effectively use keywords to increase Amazon sales
Route service grid traffic through two-level gateway design
idea 公共方法抽取快捷键
JS learning notes - variables
Yyds dry goods inventory hands-on teaching you to carry out the packaging and release of mofish Library (fishing Library)
2022最新最详细必成功的在Vscode中设置背景图、同时解决不受支持的问题
随机推荐
Flink real-time data warehouse (7): Flink realizes the full pull module to extract data in MySQL
处理gzip: stdin: not in gzip formattar: Child returned status 1tar: Error is not recoverable: exitin
绝对真理和相对真理思考
Vscade set multi line display of tab
(practice C language every day) the sum of the nearest three numbers
Introduction to dynamic planning I, BFS of queue (70.121.279.200)
Some problems about MySQL installation
Yyds dry inventory method of deleting expired documents in batch
数学分析_笔记_第5章:一元微分学
Practice of traffic recording and playback in vivo
Today in history: Alipay launched barcode payment; The father of time-sharing system was born; The first TV advertisement in the world
SSM整合-异常处理器及项目异常处理方案
Route service grid traffic through two-level gateway design
外企高管、连续创业者、瑜伽和滑雪高手,持续迭代重构的程序人生
HMS core machine learning service helps zaful users to shop conveniently
2022最新最详细必成功的在Vscode中设置背景图、同时解决不受支持的问题
Boot transaction usage
day4
做机器视觉哪个软件好?
Song of cactus - throwing stones to ask the way (3)