WO2021208486A1 - 一种相机坐标变换方法、终端以及存储介质 - Google Patents

一种相机坐标变换方法、终端以及存储介质 Download PDF

Info

Publication number
WO2021208486A1
WO2021208486A1 PCT/CN2020/139233 CN2020139233W WO2021208486A1 WO 2021208486 A1 WO2021208486 A1 WO 2021208486A1 CN 2020139233 W CN2020139233 W CN 2020139233W WO 2021208486 A1 WO2021208486 A1 WO 2021208486A1
Authority
WO
WIPO (PCT)
Prior art keywords
transformation
camera
coordinate system
original image
projection
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.)
Ceased
Application number
PCT/CN2020/139233
Other languages
English (en)
French (fr)
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.)
Shenzhen Institute of Advanced Technology of CAS
Original Assignee
Shenzhen Institute of Advanced Technology of CAS
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 Shenzhen Institute of Advanced Technology of CAS filed Critical Shenzhen Institute of Advanced Technology of CAS
Publication of WO2021208486A1 publication Critical patent/WO2021208486A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
    • G06T7/85Stereo camera calibration
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/06Topological mapping of higher dimensional structures onto lower dimensional surfaces
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2200/00Indexing scheme for image data processing or generation, in general
    • G06T2200/04Indexing scheme for image data processing or generation, in general involving 3D image data
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • G06T2207/10012Stereo images

Definitions

  • This application belongs to the field of machine vision technology, and in particular relates to a camera coordinate transformation method, terminal, and storage medium.
  • Camera coordinate transformation is inseparable from camera calibration.
  • a geometric model of camera imaging In the image measurement process and machine vision applications, in order to determine the relationship between the three-dimensional geometric position of a point on the surface of a space object and its corresponding point in the image, a geometric model of camera imaging must be established. These geometric model parameters are the camera parameters. Under most conditions, these camera parameters must be obtained through experiments and calculations. The process of solving the parameters is the camera calibration. At present, the most widely used and accurate camera calibration method is Zhang Zhengyou calibration method[Zhang Z. Flexible camera calibration by viewing a plane from unknown orientations[C]//Proceedings of the Seventh IEEE International Conference on Computer Vision.IEEE, 1999 .].
  • the patent application number 201310450994.2 "A 3D model transformation system and method” proposes a method for converting 2D plane images into corresponding 3D model images; the patent application number 201580041718.8 proposes a method for "Camera Calibration”
  • the image calibration technology can determine the position of the camera; the patent “Camera Calibration Method and Device” with the application number 201710254363.1 discloses a camera calibration method and device, which belongs to the field of computer vision.
  • the coordinate transformation operation generally requires the internal and external parameters of the camera to calculate the transformation relationship between several coordinate systems, as shown in Figure 1, which is a schematic diagram of four coordinate systems.
  • Figure 1 is a schematic diagram of four coordinate systems.
  • the conversion calculation process between the 4 coordinate systems involved in the camera coordinate transformation is:
  • Is the camera external parameter matrix Is the camera internal parameter matrix, here the lens distortion coefficient is ignored
  • (u, v) is the pixel coordinate system
  • (X w , Y w , Z w ) is the world coordinate system
  • the whole formula is the world coordinate system (3D coordinate) and pixel Coordinate system (2D coordinate) conversion process.
  • the present application provides a camera coordinate transformation method, terminal, and storage medium, aiming to solve one of the above-mentioned technical problems in the prior art at least to a certain extent.
  • a method for transforming camera coordinates includes the following steps:
  • Step a Perform projection transformation on the original image collected by the camera
  • Step b Perform viewport transformation on the image after the projection transformation, and roughly map all 3D points of the projected object in the visual field into a two-dimensional plane to obtain the mapping point of the projected object in the screen coordinate system;
  • Step c Adjust the mapping point to make the mapping point coincide with the 3D point in the original image, and use the viewpoint and field of view parameters during the coincidence as the fixed parameters of the camera coordinate transformation.
  • the technical solution adopted by the embodiment of the application further includes: in the step a, the original image is a video image, and the video image is not less than a set number of frames, or the video image includes a set number of different positions Image information.
  • the technical solution adopted in the embodiment of the present application further includes: before the projection transformation of the original image collected by the camera, the method further includes:
  • the original image is converted into the world coordinate system.
  • the technical solution adopted in the embodiment of the present application further includes: the world coordinate system conversion is specifically:
  • the technical solution adopted in the embodiment of the present application further includes: in the step a, the projection transformation is specifically:
  • One-point perspective is used to perform projection transformation on the image converted from the world coordinate system.
  • the technical solution adopted in the embodiment of the present application further includes: in the step c, before the adjustment of the mapping point, the method further includes:
  • the mapping points are connected to each other and displayed on the original image to obtain a two-dimensional display of the projection object in the screen coordinate system.
  • the adjustment of the mapping point specifically includes:
  • the position, viewpoint, and field of view parameters of the mapping points of the multi-frame images at different positions are adjusted separately through overall panning and zooming.
  • the technical solution adopted in the embodiment of the present application further includes: in the step c, after the adjustment of the mapping point, the method further includes:
  • mapping point is adjusted again.
  • a terminal includes a processor and a memory coupled to the processor, wherein:
  • the memory stores program instructions for implementing the camera coordinate transformation method
  • the processor is configured to execute the program instructions stored in the memory to control the camera coordinate transformation.
  • a storage medium storing program instructions executable by a processor, and the program instructions are used to execute the camera coordinate transformation method.
  • the embodiment of this application produces the beneficial effect that the camera coordinate transformation method, terminal and storage medium of the embodiment of this application follow the principle of projection, transformation, rough mapping and then precise adjustment, and all 3D points are mapped first On the two-dimensional plane, then move the mapping point to the actual point position to make the two coincide.
  • the field of view and the center of the view zone are the fixed values of the camera.
  • This application is simple to operate, and can well transform the 3D coordinate system into the screen/pixel coordinate system when the camera's internal parameters are not clear or the external parameters are inaccurate, to obtain a better conversion result, and solve the traditional camera calibration coordinates. The problem of inaccurate transformation and dependence on the internal and external parameters of the camera.
  • Figure 1 is a schematic diagram of four coordinate systems
  • Fig. 2 is a flowchart of a camera coordinate transformation method according to an embodiment of the present application
  • Figure 3 is a schematic diagram of the skeleton model
  • Fig. 5 is a side view of one-point perspective transformation according to an embodiment of the application.
  • Fig. 6 is a rough mapping result diagram of an embodiment of the application.
  • FIG. 7 is a schematic diagram of a mapping point adjustment process according to an embodiment of the application.
  • Fig. 8 is a test effect diagram of an embodiment of the application.
  • FIG. 9 is a schematic diagram of a terminal structure according to an embodiment of the application.
  • FIG. 10 is a schematic structural diagram of a storage medium according to an embodiment of the application.
  • FIG. 2 is a flowchart of a camera coordinate transformation method according to an embodiment of the present application.
  • the camera coordinate transformation method of the embodiment of the present application includes the following steps:
  • Step 100 Obtain an original image collected by a single camera
  • the collected original image is a video image collected by a camera with three-dimensional coordinates in the world coordinate system, a fixed posture, unknown internal parameters, and inaccurate external parameters.
  • the collected video images cannot be less than the set number of frames (this application takes about 200 frames as an example), or the video images include different positions A large amount of image information.
  • the following embodiment takes the conversion from a 3D coordinate system to a 2D coordinate system (it can be understood that the two can be converted to each other in the same coordinate system, and the principle is the same) as an example, where each frame of image includes 23 points, which constitute It is the skeleton model of the human body.
  • the schematic diagram of the skeleton model is shown in Figure 3. The purpose is to project the three-dimensional data onto the two-dimensional image to form the key point data of the human body.
  • Step 200 Convert the original image from the three-dimensional object coordinate system to the world coordinate system by using a three-dimensional geometric transformation
  • the three-dimensional geometric transformation includes translation, rotation, scaling, etc.; the three-dimensional geometric transformation matrix is:
  • the parameters a, b, c, d, e, f, h, I, and j can be rotated, scaled, staggered, and symmetrically transformed.
  • p, q, r are the main parameters of perspective projection
  • k, m, n are the main parameters of translation transformation
  • s is the parameter of overall scale transformation.
  • Step 300 Perform projection transformation on the converted image by using one-point perspective
  • step 300 since the camera lens is parallel to a plane (xoz plane) and only orthogonal to one axis (y-axis), this application uses one-point perspective to perform projection transformation on the image.
  • Fig. 4 is a schematic diagram of projection transformation
  • Fig. 5 is a side view of one-point perspective transformation. It can be understood that different projection objects will have different numbers of points. The following is a specific description of the projection transformation of this embodiment. Known from the triangle relationship:
  • Step 400 Use the Viewport() function to perform a viewport transformation on the projection plane, and roughly map all 3D points of the projected object in the viewport into a two-dimensional plane to obtain the mapping point coordinates and position information of the projected object in the screen coordinate system;
  • step 400 all 3D points of the projected object need to be mapped to a two-dimensional plane to facilitate subsequent precise adjustments.
  • Step 500 Connect each mapping point to each other according to the structure of the projected object and display it on the original image to obtain a two-dimensional display of the projected object in the screen coordinate system;
  • step 500 as shown in FIG. 6, it is a rough mapping result diagram. It can be seen that due to the lack of camera parameters and other reasons, the mapped point after the rough mapping does not coincide with the 3D point of the projected object in the original image. The overall direction and structure of the points are the same, so you can adjust the position relationship, zoom relationship, angle relationship, field of view and other parameters to make the mapping point coincide with the 3D point.
  • Step 600 Adjust the position, viewpoint, and field of view parameters of the mapping point through operations such as overall translation and zooming, so that the mapping point coincides with the 3D point in the original image;
  • the adjustment method may be manual adjustment or setting related transformations and keys in the program.
  • Figure 7 it is a schematic diagram of the adjustment process of the mapping point. It can be understood that one adjustment is only for the first frame of the video image. The front fit is relatively high, but there will be a large deviation after the rear position changes significantly. Therefore, it is necessary to adjust for multiple frames of images in different positions to find A suitable parameter configuration.
  • Step 700 Determine whether the three-dimensional coordinates of the overlapped images are consistent, if they do not coincide, perform step 600 again, otherwise, perform step 800;
  • Step 800 Use parameters such as the viewpoint and the angle of view when the images are overlapped as fixed parameters for the camera to perform 3D coordinate system transformation.
  • step 800 a single picture or a small number of connected pictures cannot display the position and mapping relationship normally at one time. Different angles and sizes mapped to a two-dimensional plane may also have the same result. Therefore, the captured video image cannot be less than the set frame. Therefore, it is ensured that the center of the viewing zone and the angle of view information are the same at different positions of the viewing zone. When the mapping relationship between multiple positions is consistent, the camera parameters are fixed.
  • FIG. 9 is a schematic diagram of a terminal structure according to an embodiment of the application.
  • the terminal 50 includes a processor 51 and a memory 52 coupled to the processor 51.
  • the memory 52 stores program instructions for realizing the aforementioned camera coordinate transformation method.
  • the processor 51 is configured to execute program instructions stored in the memory 52 to control the camera coordinate transformation.
  • the processor 51 may also be referred to as a CPU (Central Processing Unit, central processing unit).
  • the processor 51 may be an integrated circuit chip with signal processing capability.
  • the processor 51 may also be a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component.
  • DSP digital signal processor
  • ASIC application specific integrated circuit
  • FPGA off-the-shelf programmable gate array
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
  • FIG. 10 is a schematic structural diagram of a storage medium according to an embodiment of the application.
  • the storage medium of this embodiment of the present application stores a program file 61 that can implement all the above methods.
  • the program file 61 can be stored in the above storage medium in the form of a software product, and includes several instructions to enable a computer device (which can It is a personal computer, a server, or a network device, etc.) or a processor (processor) that executes all or part of the steps of the various embodiments of the present invention.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disks or optical disks and other media that can store program codes. , Or terminal devices such as computers, servers, mobile phones, and tablets.
  • the camera coordinate transformation method, terminal, and storage medium of the embodiments of the application follow the principle of projection, transformation, rough mapping and then precise adjustment. All 3D points are first mapped onto a two-dimensional plane, and then the mapped points are moved to the actual point positions. , Make the two overlap, the angle of view and the center of the view zone at this time are the fixed values of the camera.
  • the operation of this application is simple, and it can transform the 3D coordinate system into the screen/pixel coordinate system well when the internal parameters of the camera are not clear or the external parameters are not accurate (the position is relatively fuzzy).
  • the camera calibration coordinate transformation is not accurate and depends on the internal and external parameters of the camera.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Studio Devices (AREA)
  • Processing Or Creating Images (AREA)

Abstract

本申请涉及一种相机坐标变换方法、终端以及存储介质。包括:步骤a:将相机采集的原始图像进行投影变换;步骤b:对所述投影变换后的图像进行视口变换,将视景体内投影物体的所有3D点粗略映射至二维平面内,得到所述投影物体在屏幕坐标系下的映射点;步骤c:对所述映射点进行调整,使所述映射点与所述原始图像中的3D点重合,并将所述重合时的视点及视场角参数作为所述相机坐标变换的固定参数。本申请操作简单,能够在相机内参不明确或外参数不准确情况下,很好地将3D坐标系变换为屏幕/像素坐标系,得到效果较好的变换结果,解决了传统的相机标定坐标变换不准确以及依赖相机内外参的问题。

Description

一种相机坐标变换方法、终端以及存储介质 技术领域
本申请属于机器视觉技术领域,特别涉及一种相机坐标变换方法、终端以及存储介质。
背景技术
相机坐标变换离不开相机标定。在图像测量过程以及机器视觉应用中,为确定空间物体表面某点的三维几何位置与其在图像中对应点之间的相互关系,必须建立相机成像的几何模型,这些几何模型参数就是相机参数。在大多数条件下这些相机参数必须通过实验与计算才能得到,求解参数的过程即为相机标定。目前应用较为广泛且准确率较高的相机标定方法为张正友标定法[Zhang Z.Flexible camera calibration by viewing a plane from unknown orientations[C]//Proceedings of the Seventh IEEE International Conference on Computer Vision.IEEE,1999.]。
申请号为201310450994.2的专利《一种3D模型变换系统及方法》中提出了一种备将2D平面图像转换成相应的3D模型图像的方法;申请号201580041718.8的专利《相机标定》中提出了一种图像标定的技术,可确定相机的位置;申请号201710254363.1的专利《相机标定方法及装置》公开了一种相机标定方法及装置,属于计算机视觉领域。
进行坐标变换操作一般来说需要相机的内外参数,以便计算几个坐标系之间的变换关系,如图1所示,为四种坐标系示意图。相机坐标变换涉及到的4个坐标系之间的转换计算过程为:
Figure PCTCN2020139233-appb-000001
式(1)中,
Figure PCTCN2020139233-appb-000002
为相机外参矩阵,
Figure PCTCN2020139233-appb-000003
为相机内参矩阵,这里忽略了镜头的畸变系数,(u,v)为像素坐标系,(X w,Y w,Z w)为世界坐标系,整个公式为世界坐标系(3D坐标)与像素坐标系(2D坐标)的转换过程。
可以看出这种转换较为依赖内外参数,对于内参不详的相机,在无法进行相机标定的情况下就无法完成坐标变换。此外基于图形学的坐标变换仍需要视区中心和视场角的数据,一样需要了解相机的镜头参数,而这些参数往往不容易得到。
发明内容
本申请提供了一种相机坐标变换方法、终端以及存储介质,旨在至少在一定程度上解决现有技术中的上述技术问题之一。
为了解决上述问题,本申请提供了如下技术方案:
一种相机坐标变换方法,包括以下步骤:
步骤a:将相机采集的原始图像进行投影变换;
步骤b:对所述投影变换后的图像进行视口变换,将视景体内投影物体的所有3D点粗略映射至二维平面内,得到所述投影物体在屏幕坐标系下的映射点;
步骤c:对所述映射点进行调整,使所述映射点与所述原始图像中的3D点重合,并将所述重合时的视点及视场角参数作为所述相机坐标变换的固定参数。
本申请实施例采取的技术方案还包括:所述步骤a中,所述原始图像为视频图像,且所述视频图像不少于设定帧数,或所述视频图像包括不同位置的设定数量的图像信息。
本申请实施例采取的技术方案还包括:所述将相机采集的原始图像进行投影变换前还包括:
将所述原始图像进行世界坐标系转换。
本申请实施例采取的技术方案还包括:所述世界坐标系转换具体为:
采用三维几何变换将原始图像由三维物体坐标系转换为世界坐标系。
本申请实施例采取的技术方案还包括:在所述步骤a中,所述投影变换具体为:
采用一点透视对所述世界坐标系转换后的图像进行投影变换。
本申请实施例采取的技术方案还包括:在所述步骤c中,所述对所述映射点进行调整前还包括:
根据所述投影物体结构将各个映射点互相连接并显示在原始图像上,得到所述投影物体在屏幕坐标系中的二维显示。
本申请实施例采取的技术方案还包括:在所述步骤c中,所述对所述映射点进行调整具体为:
通过整体平移、缩放对不同位置的多帧图像的映射点的位置、视点及视场角参数分别进行调整。
本申请实施例采取的技术方案还包括:在所述步骤c中,所述对所述映射点进行调整后还包括:
判断所述重合后的图像三维坐标是否吻合,如果不吻合,则重新对所述映射点进行调整。
本申请实施例采取的又一技术方案为:一种终端,所述终端包括处理器、与所述处理器耦接的存储器,其中,
所述存储器存储有用于实现所述相机坐标变换方法的程序指令;
所述处理器用于执行所述存储器存储的所述程序指令以控制相机坐标变换。
本申请实施例采取的又一技术方案为:一种存储介质,存储有处理器可运行的程序指令,所述程序指令用于执行所述的相机坐标变换方法。
相对于现有技术,本申请实施例产生的有益效果在于:本申请实施例的相机坐标变换方法、终端以及存储介质遵循先投影、变换、粗略映射再精确调整的原则,先将所有3D点映射到二维平面上,然后将映射点移动到实际点的位置,使二者重合,此时的视场角和视区中心即为该相机的固定值。本申请操作简单,能够在相机内参不明确或外参数不准确的情况下,很好地将3D坐标系变换为屏幕/像素坐标系,得到效果较好的变换结果,解决了传统的相机标定坐标变换不准确以及依赖相机内外参的问题。
附图说明
图1为四种坐标系示意图;
图2是本申请实施例的相机坐标变换方法的流程图;
图3为骨架模型示意图;
图4为本申请实施例的投影变换示意图;
图5为本申请实施例的一点透视变换的侧视图;
图6为本申请实施例的粗略映射结果图;
图7为本申请实施例的映射点调整过程示意图;
图8为本申请实施例的试验效果图;
图9为本申请实施例的终端结构示意图;
图10为本申请实施例的存储介质的结构示意图。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。
具体的,请参阅图2,是本申请实施例的相机坐标变换方法的流程图。本申请实施例的相机坐标变换方法包括以下步骤:
步骤100:获取单个相机采集的原始图像;
步骤100中,采集的原始图像为具有世界坐标系下的三维坐标、姿态固定、内参不详、外参数也不准确的相机采集的视频图像。为了保证在视区的 不同位置都是一样的视区中心和视场角信息,采集的视频图像不能少于设定帧数(本申请以200帧左右为例),或视频图像包括不同位置的数量较多的图像信息。为了便于说明,以下实施例以3D坐标系向2D坐标系的转换(可以理解,在同一种坐标系下二者可以互相转换,原理相同)为例,其中每帧图像包括23个点,构成的是人体的骨架模型,骨架模型示意图如图3所示,目的是将三维数据投影到二维图像上,形成人体关键点数据。
步骤200:采用三维几何变换将原始图像由三维物体坐标系转换为世界坐标系;
步骤200中,三维几何变换包括平移、旋转、缩放等;三维几何变换矩阵为:
Figure PCTCN2020139233-appb-000004
公式(2)中,参数a,b,c,d,e,f,h,I,j可以进行旋转、比例、错切、对称变换,p,q,r为透视投影的主要参数,k,m,n为平移变换的主要参数,s是总体比例变换的参数。
步骤300:采用一点透视对转换后的图像进行投影变换;
步骤300中,由于相机镜头与一个平面(xoz面)平行,只与一个轴(y轴)正交,因此本申请利用一点透视对图像进行投影变换。如图4和图5所示,图4为投影变换示意图,图5为一点透视变换的侧视图。可以理解,不同 的投影物体会有不同数目的点,以下为本实施例进行投影变换的具体说明。由三角关系知:
Figure PCTCN2020139233-appb-000005
若O与O′重合则投影平面变为XOZ平面,式(3)可以简化为下式(4):
Figure PCTCN2020139233-appb-000006
其他投影方向同理,此处不再赘述。
步骤400:利用Viewport()函数对投影平面进行视口变换,将视景体内投影物体的所有3D点粗略映射至二维平面内,得到投影物体在屏幕坐标系下的映射点坐标及位置信息;
步骤400中,需要将投影物体的所有3D点都映射到二维平面,以便于后续的精确调整。
步骤500:根据投影物体结构将各个映射点互相连接并显示在原始图像上面,得到投影物体在屏幕坐标系中的二维显示;
步骤500中,如图6所示,为粗略映射结果图。可以看到由于缺乏相机参数等原因,导致粗略映射后的映射点与原始图像中投影物体的3D点并没有重合,但根据映射点与3D点的位置和角度关系可以看出,映射点与3D点的整体方向和结构是一样的,因此可通过对位置关系、缩放关系、角度关系、视场角大小等参数进行调整,即可使得映射点与3D点重合。
步骤600:通过整体平移、缩放等操作对映射点的位置、视点及视场角等参数进行调整,使映射点与原始图像中的3D点重合;
步骤600中,调整方式可以为手动调整或在程序中设置相关变换及按键。如图7所示,为映射点调整过程示意图。可以理解,一次调整仅仅只针对视频图像中的第一帧图像,前面的契合度较高,但后面位置明显变化之后会存在较大的偏差,因此需要针对不同位置的多帧图像进行调整,找到一个合适的参数配置。
步骤700:判断重合后的图像三维坐标是否吻合,如果不吻合,重新执行步骤600,否则,执行步骤800;
步骤800:将图像重合时的视点、视场角等参数作为该相机进行3D坐标系变换的固定参数。
步骤800中,单张图片或者少量相连的图片无法一次性正常显示位置和映射关系,映射到二维平面的不同角度和大小也可能有一样的结果,因此采集的视频图像不能少于设定帧数,从而保证在视区的不同位置都是一样的视区中心和视场角信息,当多个位置的映射关系一致时相机的参数即被固定。
为了验证本申请的可行性和有效性,通过试验对本申请进行了验证,如图8所示,为试验效果图。由试验效果可以看出,本申请具有较高的契合度,可以满足预期及要求。
请参阅图9,为本申请实施例的终端结构示意图。该终端50包括处理器51、与处理器51耦接的存储器52。
存储器52存储有用于实现上述相机坐标变换方法的程序指令。
处理器51用于执行存储器52存储的程序指令以控制相机坐标变换。
其中,处理器51还可以称为CPU(Central Processing Unit,中央处理单元)。处理器51可能是一种集成电路芯片,具有信号的处理能力。处理器51还可以是通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现成可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
请参阅图10,为本申请实施例的存储介质的结构示意图。本申请实施例的存储介质存储有能够实现上述所有方法的程序文件61,其中,该程序文件61可以以软件产品的形式存储在上述存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本发明各个实施方式方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质,或者是计算机、服务器、手机、平板等终端设备。
本申请实施例的相机坐标变换方法、终端以及存储介质遵循先投影、变换、粗略映射再精确调整的原则,先将所有3D点映射到二维平面上,然后将映射点移动到实际点的位置,使二者重合,此时的视场角和视区中心即为该相机的固定值。本申请操作简单,能够在相机内参不明确或外参数不准确(位置较为模糊)情况下,很好地将3D坐标系变换为屏幕/像素坐标系,得到效果较好的变换结果,解决了传统的相机标定坐标变换不准确以及依赖相机内外参的问题。
对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本申请。对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见的,本申请中所定义的一般原理可以在不脱离本申请的精神或范围的情况下,在其它实施例中实现。因此,本申请将不会被限制于本申请所示的这些实施例,而是要符合与本申请所公开的原理和新颖特点相一致的最宽的范围。

Claims (10)

  1. 一种相机坐标变换方法,其特征在于,包括以下步骤:
    步骤a:将相机采集的原始图像进行投影变换;
    步骤b:对所述投影变换后的图像进行视口变换,将视景体内投影物体的所有3D点粗略映射至二维平面内,得到所述投影物体在屏幕坐标系下的映射点;
    步骤c:对所述映射点进行调整,使所述映射点与所述原始图像中的3D点重合,并将所述重合时的视点及视场角参数作为所述相机坐标变换的固定参数。
  2. 根据权利要求1所述的相机坐标变换方法,其特征在于,所述步骤a中,所述原始图像为视频图像,且所述视频图像不少于设定帧数,或所述视频图像包括不同位置的设定数量的图像信息。
  3. 根据权利要求2所述的相机坐标变换方法,其特征在于,所述步骤a中,所述将相机采集的原始图像进行投影变换前还包括:
    将所述原始图像进行世界坐标系转换。
  4. 根据权利要求3所述的相机坐标变换方法,其特征在于,所述世界坐标系转换具体为:
    采用三维几何变换将原始图像由三维物体坐标系转换为世界坐标系。
  5. 根据权利要求4所述的相机坐标变换方法,其特征在于,在所述步骤a中,所述投影变换具体为:
    采用一点透视对所述世界坐标系转换后的图像进行投影变换。
  6. 根据权利要求1所述的相机坐标变换方法,其特征在于,在所述步骤c中,所述对所述映射点进行调整前还包括:
    根据所述投影物体结构将各个映射点互相连接并显示在原始图像上,得到所述投影物体在屏幕坐标系中的二维显示。
  7. 根据权利要求6所述的相机坐标变换方法,其特征在于,在所述步骤c中,所述对所述映射点进行调整具体为:
    通过整体平移、缩放对不同位置的多帧图像的映射点的位置、视点及视场角参数分别进行调整。
  8. 根据权利要求7所述的相机坐标变换方法,其特征在于,在所述步骤c中,所述对所述映射点进行调整后还包括:
    判断所述重合后的图像三维坐标是否吻合,如果不吻合,则重新对所述映射点进行调整。
  9. 一种终端,其特征在于,所述终端包括处理器、与所述处理器耦接的存储器,其中,
    所述存储器存储有用于实现权利要求1-8任一项所述的相机坐标变换方法的程序指令;
    所述处理器用于执行所述存储器存储的所述程序指令以控制相机坐标变换。
  10. 一种存储介质,其特征在于,存储有处理器可运行的程序指令,所述程序指令用于执行权利要求1至8任一项所述的相机坐标变换方法。
PCT/CN2020/139233 2020-04-16 2020-12-25 一种相机坐标变换方法、终端以及存储介质 Ceased WO2021208486A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010298442.4A CN113538587A (zh) 2020-04-16 2020-04-16 一种相机坐标变换方法、终端以及存储介质
CN202010298442.4 2020-04-16

Publications (1)

Publication Number Publication Date
WO2021208486A1 true WO2021208486A1 (zh) 2021-10-21

Family

ID=78084737

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/139233 Ceased WO2021208486A1 (zh) 2020-04-16 2020-12-25 一种相机坐标变换方法、终端以及存储介质

Country Status (2)

Country Link
CN (1) CN113538587A (zh)
WO (1) WO2021208486A1 (zh)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114170326A (zh) * 2022-02-09 2022-03-11 北京芯海视界三维科技有限公司 获取相机坐标系原点的方法及装置
CN114259272A (zh) * 2021-12-15 2022-04-01 中国人民解放军火箭军特色医学中心 一种体外可视的介入止血装置和方法
CN114309934A (zh) * 2021-12-29 2022-04-12 北京航星机器制造有限公司 一种框架蒙皮箱体类结构激光自动焊接方法
CN114640833A (zh) * 2022-03-11 2022-06-17 峰米(重庆)创新科技有限公司 投影画面调整方法、装置、电子设备和存储介质
CN114792336A (zh) * 2022-04-18 2022-07-26 深圳鹏行智能研究有限公司 目标三维位置的确定方法、装置和存储介质
CN114820914A (zh) * 2022-04-14 2022-07-29 深圳粒子群智能科技有限公司 一种基于单轴mems条纹投影的手臂三维测量方法
CN115383355A (zh) * 2022-08-31 2022-11-25 深圳前海瑞集科技有限公司 自动工件定位的方法与装置
CN115514751A (zh) * 2022-08-24 2022-12-23 网易(杭州)网络有限公司 用于挖掘机远程控制的图像获取方法及远程控制系统
CN116051713A (zh) * 2022-08-04 2023-05-02 荣耀终端有限公司 渲染方法、电子设备和计算机可读存储介质
CN116051647A (zh) * 2022-08-08 2023-05-02 荣耀终端有限公司 一种相机标定方法和电子设备
CN116645292A (zh) * 2023-06-06 2023-08-25 广州慧炬智能科技有限公司 物距偏差导致的透视误差修正方法
CN116748827A (zh) * 2023-06-14 2023-09-15 杭州海康机器人股份有限公司 动力电池顶盖与动力电池防爆片的组装方法及装置
CN118210411A (zh) * 2024-03-22 2024-06-18 北京长木谷医疗科技股份有限公司 基于三维立体感知智能目标模型识别的方法及装置
CN118885102A (zh) * 2024-09-29 2024-11-01 园测信息科技股份有限公司 基于Unreal Engine平台的精确跟随交互方法、装置及存储介质

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116091990B (zh) * 2021-11-01 2026-02-17 中国移动通信有限公司研究院 港口定位方法、装置及存储介质
CN115661344B (zh) * 2022-10-21 2025-12-23 苏州艾氪英诺机器人科技有限公司 一种平面图像的转换方法、装置、介质、以及电子设备

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150302575A1 (en) * 2014-04-17 2015-10-22 Siemens Aktiengesellschaft Sun location prediction in image space with astronomical almanac-based calibration using ground based camera
CN110097574A (zh) * 2019-04-24 2019-08-06 南京邮电大学 一种已知刚体的实时位姿估计方法
CN110517202A (zh) * 2019-08-30 2019-11-29 的卢技术有限公司 一种车身摄像头标定方法及其标定装置
CN110675436A (zh) * 2019-09-09 2020-01-10 中国科学院微小卫星创新研究院 基于3d特征点的激光雷达与立体视觉配准方法
CN110728715A (zh) * 2019-09-06 2020-01-24 南京工程学院 一种智能巡检机器人像机角度自适应调整方法
CN110880185A (zh) * 2019-11-08 2020-03-13 南京理工大学 基于条纹投影的高精度动态实时360度全方位点云获取方法

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102044084A (zh) * 2009-10-22 2011-05-04 上海杉达学院 三维图形的二维平面表现方法
US9852238B2 (en) * 2014-04-24 2017-12-26 The Board Of Trustees Of The University Of Illinois 4D vizualization of building design and construction modeling with photographs
CN109343061B (zh) * 2018-09-19 2021-04-02 百度在线网络技术(北京)有限公司 传感器标定方法、装置、计算机设备、介质和车辆

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150302575A1 (en) * 2014-04-17 2015-10-22 Siemens Aktiengesellschaft Sun location prediction in image space with astronomical almanac-based calibration using ground based camera
CN110097574A (zh) * 2019-04-24 2019-08-06 南京邮电大学 一种已知刚体的实时位姿估计方法
CN110517202A (zh) * 2019-08-30 2019-11-29 的卢技术有限公司 一种车身摄像头标定方法及其标定装置
CN110728715A (zh) * 2019-09-06 2020-01-24 南京工程学院 一种智能巡检机器人像机角度自适应调整方法
CN110675436A (zh) * 2019-09-09 2020-01-10 中国科学院微小卫星创新研究院 基于3d特征点的激光雷达与立体视觉配准方法
CN110880185A (zh) * 2019-11-08 2020-03-13 南京理工大学 基于条纹投影的高精度动态实时360度全方位点云获取方法

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114259272A (zh) * 2021-12-15 2022-04-01 中国人民解放军火箭军特色医学中心 一种体外可视的介入止血装置和方法
CN114259272B (zh) * 2021-12-15 2024-02-23 中国人民解放军火箭军特色医学中心 一种体外可视的介入止血装置和方法
CN114309934A (zh) * 2021-12-29 2022-04-12 北京航星机器制造有限公司 一种框架蒙皮箱体类结构激光自动焊接方法
CN114170326A (zh) * 2022-02-09 2022-03-11 北京芯海视界三维科技有限公司 获取相机坐标系原点的方法及装置
CN114640833A (zh) * 2022-03-11 2022-06-17 峰米(重庆)创新科技有限公司 投影画面调整方法、装置、电子设备和存储介质
CN114820914A (zh) * 2022-04-14 2022-07-29 深圳粒子群智能科技有限公司 一种基于单轴mems条纹投影的手臂三维测量方法
CN114792336A (zh) * 2022-04-18 2022-07-26 深圳鹏行智能研究有限公司 目标三维位置的确定方法、装置和存储介质
CN116051713A (zh) * 2022-08-04 2023-05-02 荣耀终端有限公司 渲染方法、电子设备和计算机可读存储介质
CN116051713B (zh) * 2022-08-04 2023-10-31 荣耀终端有限公司 渲染方法、电子设备和计算机可读存储介质
CN116051647A (zh) * 2022-08-08 2023-05-02 荣耀终端有限公司 一种相机标定方法和电子设备
CN115514751A (zh) * 2022-08-24 2022-12-23 网易(杭州)网络有限公司 用于挖掘机远程控制的图像获取方法及远程控制系统
CN115383355A (zh) * 2022-08-31 2022-11-25 深圳前海瑞集科技有限公司 自动工件定位的方法与装置
CN116645292A (zh) * 2023-06-06 2023-08-25 广州慧炬智能科技有限公司 物距偏差导致的透视误差修正方法
CN116748827A (zh) * 2023-06-14 2023-09-15 杭州海康机器人股份有限公司 动力电池顶盖与动力电池防爆片的组装方法及装置
CN118210411A (zh) * 2024-03-22 2024-06-18 北京长木谷医疗科技股份有限公司 基于三维立体感知智能目标模型识别的方法及装置
CN118885102A (zh) * 2024-09-29 2024-11-01 园测信息科技股份有限公司 基于Unreal Engine平台的精确跟随交互方法、装置及存储介质

Also Published As

Publication number Publication date
CN113538587A (zh) 2021-10-22

Similar Documents

Publication Publication Date Title
WO2021208486A1 (zh) 一种相机坐标变换方法、终端以及存储介质
US11012620B2 (en) Panoramic image generation method and device
CN108564617B (zh) 多目相机的三维重建方法、装置、vr相机和全景相机
CN106846409B (zh) 鱼眼相机的标定方法及装置
CN108257183A (zh) 一种相机镜头光轴校准方法和装置
CN103942754B (zh) 全景图像补全方法及装置
CN106650682B (zh) 一种人脸追踪的方法及装置
JP6764995B2 (ja) パノラマ画像圧縮方法および装置
CN111857329A (zh) 注视点计算方法、装置及设备
CN104994367B (zh) 一种图像矫正方法以及摄像头
CN108574825B (zh) 一种云台摄像机的调整方法和装置
JPWO2018235163A1 (ja) キャリブレーション装置、キャリブレーション用チャート、チャートパターン生成装置、およびキャリブレーション方法
CN108629810B (zh) 双目相机的标定方法、装置及终端
WO2021189804A1 (zh) 图像矫正方法、装置和电子系统
CN113643414A (zh) 一种三维图像生成方法、装置、电子设备及存储介质
TW202115555A (zh) 資訊顯示方法與資訊顯示系統
WO2024164569A1 (zh) 数据处理方法、装置、设备以及存储介质
CN109785225B (zh) 一种用于图像矫正的方法和装置
CN111432117A (zh) 图像矫正方法、装置和电子系统
CN113902853A (zh) 一种人脸三维重建方法、装置、电子设备及存储介质
CN118864469B (zh) 自适应的图像采集方法、介质及设备
US20260017751A1 (en) Panoramic image processing method and apparatus, electronic device and storage medium
JP2017021430A (ja) パノラマビデオデータの処理装置、処理方法及びプログラム
CN111353945A (zh) 鱼眼图像校正方法、装置及存储介质
CN113674356B (zh) 相机筛选方法及相关装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20931091

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20931091

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 20931091

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 10.07.2023)

122 Ep: pct application non-entry in european phase

Ref document number: 20931091

Country of ref document: EP

Kind code of ref document: A1