CN111353941A - Space coordinate conversion method - Google Patents

Space coordinate conversion method Download PDF

Info

Publication number
CN111353941A
CN111353941A CN201811567957.9A CN201811567957A CN111353941A CN 111353941 A CN111353941 A CN 111353941A CN 201811567957 A CN201811567957 A CN 201811567957A CN 111353941 A CN111353941 A CN 111353941A
Authority
CN
China
Prior art keywords
motion
point
coordinate
space
dimensional plane
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201811567957.9A
Other languages
Chinese (zh)
Inventor
黄昌正
陈曦
周言明
李涛
曾爱云
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dongguan Yilian Interation Information Technology Co ltd
Huaibei Huanjing Intelligent Technology Co ltd
Guangzhou Huanjing Technology Co ltd
Original Assignee
Dongguan Yilian Interation Information Technology Co ltd
Huaibei Huanjing Intelligent Technology Co ltd
Guangzhou Huanjing Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dongguan Yilian Interation Information Technology Co ltd, Huaibei Huanjing Intelligent Technology Co ltd, Guangzhou Huanjing Technology Co ltd filed Critical Dongguan Yilian Interation Information Technology Co ltd
Priority to CN201811567957.9A priority Critical patent/CN111353941A/en
Publication of CN111353941A publication Critical patent/CN111353941A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/60Rotation of whole images or parts thereof
    • G06T3/604Rotation of whole images or parts thereof using coordinate rotation digital computer [CORDIC] devices

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a space coordinate conversion method, which utilizes Euler angle absolute world coordinates of two points which continuously move in a three-dimensional space to obtain the space position variation of the latter moving point relative to the former moving point, namely the vector variation of the Euler angle, and projects the space coordinate variation of the Euler angle onto a plane, so that the space position variation is converted into the horizontal and vertical vector displacement variation in the plane, and the space motion control is converted into the position motion control on the plane.

Description

Space coordinate conversion method
Technical Field
The invention relates to the technical field of coordinate conversion from three-dimensional space motion to two-dimensional plane motion control, in particular to a space coordinate conversion method.
Background
In the existing virtual reality development and application, quaternion space attitude binding of a virtual reality 3D game engine is adopted to control the attitude of a virtual object model in a virtual reality scene, interaction among virtual models is completed through the collision attribute of the models, in some control system applications combining virtual reality and reality, the motion control of a real system can be realized only by converting space attitude information and real coordinates, the applied patent CN201610970481.8 describes the conversion of a two-dimensional plane coordinate system into a three-dimensional panoramic spherical coordinate system, and the applied patent CN201710979751.6 describes a three-dimensional coordinate conversion method for any rotation angle, but does not relate to a parameter information conversion method from the three-dimensional spherical motion coordinate system to the two-dimensional plane motion coordinate system.
Disclosure of Invention
The invention aims to solve the defects and provides a consistent space coordinate conversion method to realize the parameter information conversion from a three-dimensional spherical motion coordinate system to a two-dimensional plane motion coordinate system;
in order to realize the design purpose of the invention, the following technical scheme is adopted to realize the following steps:
1. the invention provides a space coordinate conversion method, which comprises the following steps,
obtaining the space attitude variation of the latter moving point relative to the former moving point, namely the vector variation of an Euler angle by utilizing the quaternion world coordinates of two points in a three-dimensional space spherical surface, and projecting the space coordinate variation of the Euler angle onto a plane to convert the space position variation of the moving point into the horizontal and vertical vector displacement variation in the plane;
the invention relates to a space coordinate conversion method, in particular to a method for converting world coordinates of a moving point on a three-dimensional space spherical surface into two-dimensional plane moving coordinates, which comprises a coordinate information conversion process and a coordinate calibration method.
2. The coordinate information conversion process of the space coordinate conversion method of the invention comprises the following steps,
step one, establishing a conversion matrix according to a Cartesian coordinate system and two world coordinate representation methods of quaternion (w, x, y, z) and Euler angle (phi, theta, psi) in a three-dimensional space
Figure RE-490135DEST_PATH_IMAGE001
(1)
The conversion matrix formula (2) for obtaining the conversion of quaternion to Euler angle by the formula (1) is as follows
Figure RE-906072DEST_PATH_IMAGE002
(2)
Wherein phi is a roll angle, theta is a yaw angle, and psi is a pitch angle;
step two, setting any two points P on the three-dimensional space sphere1And P2From P1Move to P2In which P is1Defined as the reference point of motion, P2Is defined as a motion point, P1、P2With world coordinates expressed in quaternions (w, x, y, z), P can be calculated by equation (2)1、P2Euler angular coordinates: p1(Φ111), P2(Φ222) Then from P1Move to P2The spatial attitude change of (a) is as follows:
Figure RE-641947DEST_PATH_IMAGE003
(3)
step three, according to the characteristics of Euler angles, wherein-180<Φ<180、-180<θ<180、-180<Ψ<180According to the three formulas in the step one, the calculated space attitude variation △ phi, △ theta, △ psi is calculated when P is1、P2Move to the critical point-180Or 180In time, detecting spatial attitude changes △ Φ, △ θ, △ Ψ will occur in an infinite approximation of 360The method for removing the sudden change singularity comprises the following steps of setting space attitude change thresholds phi ', theta ', psi ' according to the motion speed characteristics, and aiming at P1、P2When the motion reaches the critical point, the following compensation correction is needed to be carried out on the formula (3):
Figure 100002_RE-DEST_PATH_IMAGE004
Figure RE-637585DEST_PATH_IMAGE005
Figure 100002_RE-DEST_PATH_IMAGE006
selecting two suitable euler angles from the three euler angles with the space attitude change to perform two-dimensional plane projection motion processing according to the requirement of the two-dimensional plane motion coordinate, for example, selecting a pitch angle psi and a yaw angle theta to perform two-dimensional plane projection motion, and moving a point P1And P2Projected point on two-dimensional plane is P'1And P'2And if the yaw angle theta is converted into a transverse motion coordinate x after being projected by a two-dimensional plane, and the pitch angle psi is converted into a longitudinal motion coordinate y after being projected by the two-dimensional plane, the coordinate variation of two adjacent motion points projected onto the two-dimensional plane by the space attitude variation is calculated by the following formula:
Figure RE-219046DEST_PATH_IMAGE007
(7)
wherein KxCompensating coefficient, K, for lateral motionyFor longitudinal motion compensation coefficient, Kx、KyIs determined according to the motion characteristics required on the two-dimensional plane;
according to actual needs, the two-dimensional plane projection motion coordinate change calculation can be carried out on the roll angle phi and the yaw angle theta, the two-dimensional plane projection motion coordinate change calculation can also be carried out on the roll angle phi and the pitch angle psi, and the calculation method is similar to the formula (7);
step five, adding P2As the reference point of the next moving point, the coordinate information conversion process of the next moving point is carried out。
3. The coordinate calibration method of the space coordinate conversion method of the invention comprises the following steps,
first, the current moving point P is checkedxWhether or not it is a starting point, e.g. PxIf the motion point is the starting point of the motion, the motion point P is processed according to the coordinate information conversion process stepxConverting the space attitude change coordinate information relative to the motion point PxSimultaneously as P in the coordinate information conversion process1And P2Converting the three-dimensional space motion coordinate information into two-dimensional plane motion coordinate information, and converting the coordinate information into a motion point PxAs a reference point for the next point of movement, e.g. PxIf not, then according to the coordinate information conversion process step, making information conversion from three-dimensional space motion coordinate to two-dimensional plane motion coordinate, and after completing coordinate information conversion making motion point PxAs a reference point for the next motion point.
The invention can complete the information conversion from the three-dimensional space motion coordinate to the two-dimensional plane motion coordinate, and can be conveniently applied to virtual reality interaction application and the conversion from the space attitude motion to the plane motion control.
Drawings
FIG. 1 is a schematic system flow diagram according to the present invention;
fig. 2 is a schematic diagram of projecting a three-dimensional space motion point to a two-dimensional plane according to the technical scheme of the invention.
Detailed Description
In order to make the technical purpose, the adopted technical scheme and the implementation effect of the invention clearer, the invention is further described in detail with reference to the attached drawings:
1. the invention provides a space coordinate conversion method, which comprises the following steps,
obtaining the space attitude variation of the latter moving point relative to the former moving point, namely the vector variation of an Euler angle by utilizing the quaternion world coordinates of two points in a three-dimensional space spherical surface, and projecting the space coordinate variation of the Euler angle onto a plane to convert the space position variation of the moving point into the horizontal and vertical vector displacement variation in the plane;
the invention relates to a space coordinate conversion method, in particular to a method for converting world coordinates of a moving point on a three-dimensional space spherical surface into two-dimensional plane moving coordinates, which comprises a coordinate information conversion process and a coordinate calibration method.
2. The coordinate information conversion process of the space coordinate conversion method of the invention comprises the following steps,
as shown in fig. 2, a three-dimensional space motion point P1And P2Projected to two-dimensional plane of P'1And P'2
Step one, establishing a conversion matrix according to a Cartesian coordinate system according to two world coordinate representation methods of quaternions (w, x, y, z) and Euler angles (phi, theta, psi) in a three-dimensional space:
Figure RE-681252DEST_PATH_IMAGE001
(1)
the conversion matrix formula (2) for obtaining the conversion of quaternion to Euler angle by the formula (1) is as follows
Figure RE-29056DEST_PATH_IMAGE002
(2)
Wherein phi is a roll angle, theta is a yaw angle, and psi is a pitch angle;
step two, setting any two points P on the three-dimensional space sphere1And P2From P1Move to P2In which P is1Defined as the reference point of motion, P2Is defined as a motion point, P1、P2With world coordinates expressed in quaternions (w, x, y, z), P can be calculated by equation (2)1、P2Euler angular coordinates: p1(Φ111), P2(Φ222) Then from P1Move to P2The spatial attitude change of (a) is as follows:
Figure RE-500489DEST_PATH_IMAGE003
(3)
step three, according to the characteristics of Euler angles, wherein-180<Φ<180、-180<θ<180、-180<Ψ<180According to the three formulas in the step one, the calculated space attitude variation △ phi, △ theta, △ psi is calculated when P is1、P2Move to the critical point-180Or 180In time, detecting spatial attitude changes △ Φ, △ θ, △ Ψ will occur in an infinite approximation of 360The method for removing the sudden change singularity comprises the following steps of setting space attitude change thresholds phi ', theta ', psi ' according to the motion speed characteristics, and aiming at P1、P2When the motion reaches the critical point, the following compensation correction is needed to be carried out on the formula (3):
Figure RE-DEST_PATH_IMAGE008
Figure RE-555033DEST_PATH_IMAGE009
Figure RE-578352DEST_PATH_IMAGE010
selecting two suitable euler angles from the three euler angles with the space attitude change to perform two-dimensional plane projection motion processing according to the requirement of the two-dimensional plane motion coordinate, for example, selecting a pitch angle psi and a yaw angle theta to perform two-dimensional plane projection motion, and moving a point P1And P2Projected point on two-dimensional plane is P'1And P'2And if the yaw angle theta is converted into a transverse motion coordinate x after being projected by a two-dimensional plane, and the pitch angle psi is converted into a longitudinal motion coordinate y after being projected by the two-dimensional plane, the coordinate variation of two adjacent motion points projected onto the two-dimensional plane by the space attitude variation is calculated by the following formula:
Figure RE-288819DEST_PATH_IMAGE007
(7)
wherein KxCompensating coefficient, K, for lateral motionyFor longitudinal motion compensation coefficient, Kx、KyIs determined according to the motion characteristics required on the two-dimensional plane;
according to actual needs, the two-dimensional plane projection motion coordinate change calculation can be carried out on the roll angle phi and the yaw angle theta, the two-dimensional plane projection motion coordinate change calculation can also be carried out on the roll angle phi and the pitch angle psi, and the calculation method is similar to the formula (7);
step five, adding P2And as the reference point of the next moving point, the coordinate information conversion process of the next moving point is carried out.
3. The coordinate calibration method of the space coordinate conversion method of the invention comprises the following steps,
first, the current moving point P is checkedxWhether or not it is a starting point, e.g. PxIf the motion point is the starting point of the motion, the motion point P is processed according to the coordinate information conversion process stepxConverting the space attitude change coordinate information relative to the motion point PxSimultaneously as P in the coordinate information conversion process1And P2Converting the three-dimensional space motion coordinate information into two-dimensional plane motion coordinate information, and converting the coordinate information into a motion point PxAs a reference point for the next point of movement, e.g. PxIf not, then according to the coordinate information conversion process step, making information conversion from three-dimensional space motion coordinate to two-dimensional plane motion coordinate, and after completing coordinate information conversion making motion point PxAs a reference point for the next motion point.

Claims (3)

1. A space coordinate transformation method is characterized in that,
obtaining the space attitude variation of the latter moving point relative to the former moving point, namely the vector variation of an Euler angle by utilizing the quaternion world coordinates of two points in a three-dimensional space spherical surface, and projecting the space coordinate variation of the Euler angle onto a plane to convert the space position variation of the moving point into the horizontal and vertical vector displacement variation in the plane;
the invention provides a space coordinate conversion method, which is a method for converting world coordinates of a moving point on a three-dimensional space spherical surface into two-dimensional plane motion coordinates and comprises a coordinate information conversion process and a coordinate calibration method.
2. The coordinate information conversion process according to claim 1,
step one, establishing a conversion matrix according to a Cartesian coordinate system and two world coordinate representation methods of quaternion (w, x, y, z) and Euler angle (phi, theta, psi) in a three-dimensional space
Figure RE-DEST_PATH_IMAGE001
(1)
The conversion matrix formula (2) for obtaining the conversion of quaternion to Euler angle by the formula (1) is as follows
Figure RE-DEST_PATH_IMAGE002
(2)
Wherein phi is a roll angle, theta is a yaw angle, and psi is a pitch angle;
step two, setting any two points P on the three-dimensional space sphere1And P2From P1Move to P2In which P is1Defined as the reference point of motion, P2Is defined as a motion point, P1、P2With world coordinates expressed in quaternions (w, x, y, z), P can be calculated by equation (2)1、P2Euler angular coordinates: p1(Φ111), P2(Φ222) Then from P1Move to P2The spatial attitude change of (a) is as follows:
Figure RE-DEST_PATH_IMAGE003
(3)
step three, according to the characteristics of Euler angles, wherein the angle is-180 degrees<Φ<180 degrees, -180 degrees<θ<180 degrees, -180 degrees<Ψ<180 degrees, and the space attitude variation amounts △ phi, △ theta, △ psi calculated according to the three formulas in the step one are calculated when P is equal to1、P2When the motion reaches a critical point of-180 degrees or 180 degrees, detecting the change quantity △ phi, △ theta and △ psi of the spatial attitude, an infinite sudden change singularity approaching 360 degrees appears, and the sudden change singularity removing method comprises the following steps of setting spatial attitude change thresholds phi ', theta ' and psi ' according to the motion speed characteristic, and aiming at P1、P2When the motion reaches the critical point, the following compensation correction is needed to be carried out on the formula (3):
Figure RE-DEST_PATH_IMAGE004
Figure RE-DEST_PATH_IMAGE005
Figure RE-DEST_PATH_IMAGE006
selecting two suitable euler angles from the three euler angles with the space attitude change to perform two-dimensional plane projection motion processing according to the requirement of the two-dimensional plane motion coordinate, for example, selecting a pitch angle psi and a yaw angle theta to perform two-dimensional plane projection motion, and moving a point P1And P2Projected point on two-dimensional plane is P'1And P'2Wherein the yaw angle θ is transformed into a horizontal motion coordinate x after being projected by the two-dimensional plane, and the pitch angle Ψ is transformed into a longitudinal motion coordinate y after being projected by the two-dimensional plane, and then the motion coordinate change projected onto the two-dimensional plane by the spatial attitude change is calculated by the following formula:
Figure RE-DEST_PATH_IMAGE007
(7)
wherein KxIs a cross barCoefficient of motion compensation, KyFor longitudinal motion compensation coefficient, Kx、KyIs determined according to the motion characteristics required on the two-dimensional plane;
according to actual needs, the two-dimensional plane projection motion coordinate change calculation can be carried out on the roll angle phi and the yaw angle theta, the two-dimensional plane projection motion coordinate change calculation can also be carried out on the roll angle phi and the pitch angle psi, and the calculation method is similar to the formula (7);
step five, adding P2And as the reference point of the next moving point, the coordinate information conversion process of the next moving point is carried out.
3. The coordinate calibration method according to claim 1,
first, the current moving point P is checkedxWhether or not it is a starting point, e.g. PxIf it is a motion start point, the coordinate information conversion process step of claim 2 is performed for the motion point PxConverting the space attitude change coordinate information relative to the motion point PxSimultaneously as P in the coordinate information conversion process1And P2Converting the three-dimensional space motion coordinate information into two-dimensional plane motion coordinate information, and converting the coordinate information into a motion point PxAs a reference point for the next point of movement, e.g. PxIf the motion point is not the starting point of the motion, the information conversion from the three-dimensional space motion coordinate to the two-dimensional plane motion coordinate is performed according to the coordinate information conversion process of claim 2, and the motion point P is converted after the coordinate information conversion is completedxAs a reference point for the next motion point.
CN201811567957.9A 2018-12-21 2018-12-21 Space coordinate conversion method Pending CN111353941A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811567957.9A CN111353941A (en) 2018-12-21 2018-12-21 Space coordinate conversion method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811567957.9A CN111353941A (en) 2018-12-21 2018-12-21 Space coordinate conversion method

Publications (1)

Publication Number Publication Date
CN111353941A true CN111353941A (en) 2020-06-30

Family

ID=71193815

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811567957.9A Pending CN111353941A (en) 2018-12-21 2018-12-21 Space coordinate conversion method

Country Status (1)

Country Link
CN (1) CN111353941A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115639910A (en) * 2022-10-28 2023-01-24 武汉恒新动力科技有限公司 All-dimensional somatosensory interaction method facing operation space of operation object and operation device
WO2023097447A1 (en) * 2021-11-30 2023-06-08 深圳市韶音科技有限公司 Movement data calibration method and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105160673A (en) * 2015-08-28 2015-12-16 山东中金融仕文化科技股份有限公司 Object positioning method
CN106556395A (en) * 2016-11-17 2017-04-05 北京联合大学 A kind of air navigation aid of the single camera vision system based on quaternary number
CN107330862A (en) * 2017-06-30 2017-11-07 广州幻境科技有限公司 Conversion method between two autonomous system coordinate systems based on quaternary number

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105160673A (en) * 2015-08-28 2015-12-16 山东中金融仕文化科技股份有限公司 Object positioning method
CN106556395A (en) * 2016-11-17 2017-04-05 北京联合大学 A kind of air navigation aid of the single camera vision system based on quaternary number
CN107330862A (en) * 2017-06-30 2017-11-07 广州幻境科技有限公司 Conversion method between two autonomous system coordinate systems based on quaternary number

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023097447A1 (en) * 2021-11-30 2023-06-08 深圳市韶音科技有限公司 Movement data calibration method and system
CN115639910A (en) * 2022-10-28 2023-01-24 武汉恒新动力科技有限公司 All-dimensional somatosensory interaction method facing operation space of operation object and operation device
CN115639910B (en) * 2022-10-28 2023-08-15 武汉恒新动力科技有限公司 Omnidirectional somatosensory interaction method and equipment for operation space of controlled object

Similar Documents

Publication Publication Date Title
JP6775776B2 (en) Free viewpoint movement display device
CN105014677B (en) Vision Mechanical arm control method based on Camshift visual tracking and D-H modeling algorithm
CN111801198A (en) Hand-eye calibration method, system and computer storage medium
CN104866722B (en) A kind of inverse kinematics method of seven-shaft industrial mechanical arm
CN111079565B (en) Construction method and identification method of view two-dimensional attitude template and positioning grabbing system
CN105303595B (en) A kind of object intelligent barrier avoiding method and system based on three-dimensional virtual scene
CN101320474A (en) Exterior parameter self-calibration method for camera with rotating stereovision
CN103077546B (en) The three-dimensional perspective transform method of X-Y scheme
JP7527546B2 (en) Calibrating cameras on unmanned aerial vehicles using human joints
TW201918348A (en) Posture positioning system for machine and the method thereof
CN111754579A (en) Method and device for determining external parameters of multi-view camera
CN106303417B (en) Enhanced panoramic monitoring method for unmanned platform
WO2022228391A1 (en) Terminal device positioning method and related device therefor
CN111353941A (en) Space coordinate conversion method
Burkard et al. User-aided global registration method using geospatial 3D data for large-scale mobile outdoor augmented reality
KR102372298B1 (en) Method for acquiring distance to at least one object located in omni-direction of vehicle and vision device using the same
CN110722547B (en) Vision stabilization of mobile robot under model unknown dynamic scene
Jiang et al. Error analysis and experiments of 3D reconstruction using a RGB-D sensor
US7990398B2 (en) Matching movement behavior in motion graphics
CN111283664A (en) Registration system and method for robot augmented reality teaching
JP6503098B1 (en) Image processing apparatus, image processing program and image processing method
CN104658026B (en) A kind of three-dimensional animation fusion deformation method based on polar coordinate system
CN104732477B (en) Registration method based on Magnetic position tracker and motion capture system
CN114339058A (en) Mechanical arm flying shooting positioning method based on visual marks
CN111161421A (en) AR-based mobile terminal online space roaming method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20200630

WD01 Invention patent application deemed withdrawn after publication