Method and device for determining three-dimensional position of target, electronic equipment and storage medium

The external parameters are determined through multiple pairs of calibration points and internal parameters of the image acquisition device, and the conversion of the target object between the pixel coordinate system and the world coordinate system is realized, which solves the problem of inaccurate three-dimensional position in the existing technology and improves the accuracy of the three-dimensional position. Gain accuracy and efficiency.

CN118570287APending Publication Date: 2024-08-30CHINA ACADEMY OF RAILWAY SCI CORP LTD +2

Patent Information

Application Number
CN202410556060.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-07
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

The existing three-dimensional position of the target object obtained based on the data collected by the camera is inaccurate and cannot meet the existing needs.

Method used

Through multiple pairs of calibration points and internal parameters based on the image acquisition device, the external parameters of the image acquisition device are determined, the target object is converted between the pixel coordinate system and the world coordinate system, and the three-dimensional position of the target object is obtained.

Benefits of technology

The accuracy and efficiency of obtaining the three-dimensional position of the target object based on the collected data are improved, and the need for obtaining the three-dimensional movement trajectory is met.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118570287A
    Figure CN118570287A
Patent Text Reader

Abstract

The invention provides a method and device for determining the three-dimensional position of a target, electronic equipment and a storage medium, and belongs to the technical field of data processing, and the method comprises the steps: determining the external parameters of an image collection device based on a plurality of pairs of calibration points of the image collection device and the internal parameters of the image collection device; and converting a target pixel point of the target object in the pixel coordinate system into a target three-dimensional position point of the target object in the world coordinate system based on the internal parameter and the external parameter so as to obtain a three-dimensional position of the target object. According to the existing internal parameters and multiple pairs of calibration points, the external parameters are calibrated, and the calibration accuracy of the external parameters is improved. According to the internal parameters and the external parameters, the target pixel points are converted into the target three-dimensional position points, the actual three-dimensional position of the target object is obtained according to the collected image of the image collection device, and the accuracy and efficiency of obtaining the actual three-dimensional position are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a method, device, electronic device and storage medium for determining the three-dimensional position of a target. Background Art

[0002] Motion trajectories refer to the trajectories of moving objects such as pedestrians and ships. These data are often abstract. Analyzing these trajectories through effective visualization methods has very practical significance for our urban planning, understanding of traffic flow and analysis of traffic conditions.

[0003] The existing camera-based acquisition data (including images and videos) to obtain the movement trajectory of the target object is mainly a two-dimensional movement trajectory. The two-dimensional movement trajectory can no longer meet the existing development needs. It is necessary to find a method to obtain the three-dimensional movement trajectory of the target object based on the acquired image. In order to determine the three-dimensional movement trajectory, it is necessary to obtain the three-dimensional position of the target object based on the acquired data.

[0004] The existing method of obtaining the three-dimensional position of the target object based on the collected data is not accurate. Summary of the invention

[0005] The present invention provides a method, device, electronic device and storage medium for determining the three-dimensional position of a target, so as to solve the defect of inaccurate three-dimensional position of a target object obtained according to collected data in the prior art, and improve the accuracy of obtaining the three-dimensional position of the target object according to the collected data.

[0006] In a first aspect, the present invention provides a method for determining the three-dimensional position of a target, comprising: determining the external parameters of the image acquisition device based on multiple pairs of calibration points of the image acquisition device and the intrinsic parameters of the image acquisition device, each pair of calibration points comprising a pixel point in a pixel coordinate system of the image acquisition device and a position point in a world coordinate system matching the pixel point, the intrinsic parameters characterizing the conversion relationship between the pixel coordinate system and the camera coordinate system of the image acquisition device, and the extrinsic parameters characterizing the conversion relationship between the camera coordinate system and the world coordinate system; based on the intrinsic parameters and the extrinsic parameters, converting the target pixel points of the target object in the pixel coordinate system into the target three-dimensional position points of the target object in the world coordinate system to obtain the three-dimensional position of the target object.

[0007] According to a method for determining the three-dimensional position of a target provided by the present invention, based on multiple pairs of calibration points of the image acquisition device and the intrinsic parameters of the image acquisition device, the extrinsic parameters of the image acquisition device are determined, including: based on the intrinsic parameters and the initial extrinsic parameters, constructing conversion information of pixel points and position points; substituting the multiple pairs of calibration points into the conversion information to update the initial extrinsic parameters to obtain the extrinsic parameters.

[0008] According to a method for determining the three-dimensional position of a target provided by the present invention, internal parameters include pixel origin coordinates of a pixel coordinate system, the number of pixels per unit distance of the x-axis of the pixel coordinate system, and the number of pixels per unit distance of the y-axis of the pixel coordinate system, and the internal parameters are determined based on the following steps: determining the x-coordinate of the pixel origin coordinates based on the maximum x-axis resolution of the image acquisition device, determining the y-coordinate of the pixel origin coordinates based on the maximum y-axis resolution of the image acquisition device, and obtaining the pixel origin coordinates based on the x-coordinate of the pixel origin coordinates and the y-coordinate of the pixel origin coordinates; determining the number of pixels per unit distance of the x-axis of the pixel coordinate system based on the focal length of the image acquisition device, the x-axis sensor size of the image acquisition device, and the maximum x-axis resolution, and determining the number of pixels per unit distance of the y-axis of the pixel coordinate system based on the focal length, the y-axis sensor size of the image acquisition device, and the maximum y-axis resolution.

[0009] According to a method for determining the three-dimensional position of a target provided by the present invention, the number of pixels per unit distance on the x-axis of a pixel coordinate system is determined based on the focal length of an image acquisition device, the x-axis sensor size of the image acquisition device and the maximum x-axis resolution, including: determining the x-axis unit physical distance corresponding to the unit pixel on the x-axis in the pixel coordinate system based on the ratio of the x-axis sensor size to the maximum x-axis resolution; and determining the number of pixels per unit distance on the x-axis of the pixel coordinate system based on the ratio of the focal length to the x-axis unit physical distance.

[0010] According to a method for determining the three-dimensional position of a target provided by the present invention, the number of pixels per unit distance on the y-axis of a pixel coordinate system is determined based on the focal length, the y-axis sensor size of an image acquisition device and the maximum resolution on the y-axis, including: determining the y-axis unit physical distance corresponding to the unit pixel on the y-axis in the pixel coordinate system based on the ratio of the y-axis sensor size and the maximum resolution on the y-axis; and determining the number of pixels per unit distance on the y-axis of the pixel coordinate system based on the ratio of the focal length and the y-axis unit physical distance.

[0011] According to a method for determining the three-dimensional position of a target provided by the present invention, based on intrinsic parameters and extrinsic parameters, target pixel points of the target object in a captured image are converted into target three-dimensional position points of the target object in a world coordinate system, including: based on intrinsic parameters, converting the target pixel points into initial three-dimensional position points in a camera coordinate system; based on extrinsic parameters, converting the initial three-dimensional position points into target three-dimensional position points.

[0012] In a second aspect, the present invention provides a device for determining the three-dimensional position of a target, comprising: a calibration module, used to determine the external parameters of the image acquisition device based on multiple pairs of calibration points of the image acquisition device and the intrinsic parameters of the image acquisition device, each pair of calibration points including a pixel point in a pixel coordinate system of the image acquisition device and a position point in a world coordinate system matching the pixel point, the intrinsic parameters characterizing the conversion relationship between the pixel coordinate system and the camera coordinate system of the image acquisition device, and the extrinsic parameters characterizing the conversion relationship between the camera coordinate system and the world coordinate system; a three-dimensional position determination module, used to convert the target pixel points of the target object in the pixel coordinate system into the target three-dimensional position points of the target object in the world coordinate system based on the intrinsic parameters and the extrinsic parameters, so as to obtain the three-dimensional position of the target object.

[0013] In a third aspect, the present invention provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a three-dimensional position determination method such as any one of the above-mentioned objectives is implemented.

[0014] In a fourth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements a three-dimensional position determination method such as any of the above-mentioned objectives.

[0015] In a fifth aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a three-dimensional position determination method such as any of the above-mentioned objectives.

[0016] The method, device, electronic device and storage medium for determining the three-dimensional position of a target provided by the present invention determine the external parameters of the image acquisition device based on multiple pairs of calibration points of the image acquisition device and the internal parameters of the image acquisition device, each pair of calibration points includes a pixel point in the pixel coordinate system of the image acquisition device and a position point in the world coordinate system matching the pixel point, the internal parameters represent the conversion relationship between the pixel coordinate system and the camera coordinate system of the image acquisition device, and the external parameters represent the conversion relationship between the camera coordinate system and the world coordinate system; based on the internal parameters and the external parameters, the target pixel point of the target object in the pixel coordinate system is converted into the target three-dimensional position point of the target object in the world coordinate system to obtain the three-dimensional position of the target object. The embodiment of the present invention calibrates the external parameters according to the existing internal parameters and multiple pairs of calibration points, thereby improving the accuracy of the external parameter calibration. According to the internal parameters and the external parameters, the target pixel point is converted into the target three-dimensional position point, so that the actual three-dimensional position of the target object is obtained according to the captured image of the image acquisition device, which is conducive to improving the accuracy and efficiency of obtaining the actual three-dimensional position. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0018] Figure 1 It is one of the flow charts of the method for determining the three-dimensional position of a target provided by the present invention;

[0019] Figure 2 This is the second flow chart of the method for determining the three-dimensional position of a target provided by the present invention;

[0020] Figure 3 It is a schematic structural diagram of a device for determining a three-dimensional position of a target provided by the present invention;

[0021] Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0022] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0023] Combine the following Figure 1-Figure 4 The present invention describes a method, device and apparatus for determining the three-dimensional position of a target provided by an embodiment of the present invention.

[0024] Figure 1 It is one of the flow charts of the method for determining the three-dimensional position of a target provided by the present invention. The method for determining the three-dimensional position of a target includes steps S100 to S200, and each step is specifically as follows:

[0025] S100: Determine extrinsic parameters of the image acquisition device based on multiple pairs of calibration points of the image acquisition device and intrinsic parameters of the image acquisition device.

[0026] Each pair of calibration points includes a pixel point in the pixel coordinate system of the image acquisition device and a position point in the world coordinate system matching the pixel point. The intrinsic parameters represent the conversion relationship between the pixel coordinate system and the camera coordinate system of the image acquisition device, and the extrinsic parameters represent the conversion relationship between the camera coordinate system and the world coordinate system.

[0027] Based on multiple pairs of calibration points of the image acquisition device and the intrinsic parameters of the image acquisition device, the extrinsic parameters of the image acquisition device are determined. Specifically, based on the intrinsic parameters and the initial extrinsic parameters, conversion information of pixel points and position points is constructed; the multiple pairs of calibration points are substituted into the conversion information to update the initial extrinsic parameters to obtain the extrinsic parameters.

[0028] It should be noted that the execution subject of the embodiments of the present application can be a server, a computer device, such as a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a personal digital assistant (PDA), etc.

[0029] The world coordinate system is used to describe the position of the target object in the real environment. The origin of the world coordinate system is O w , the three coordinate axes of the world coordinate system are Z w , X w and Y w . The camera coordinate system takes the optical center of the image acquisition device (camera) as its origin. The z-axis of the camera coordinate system points to the front of the camera (i.e., the z-axis is perpendicular to the imaging plane of the camera). The x-axis of the camera coordinate system is parallel to the x-axis of the world coordinate system. The y-axis of the camera coordinate system is parallel to the y-axis of the world coordinate system. The image coordinate system uses physical units to represent the position of pixels. The origin of the image coordinate system is the intersection of the optical axis of the camera and the physical coordinate system of the image. The pixel coordinate system is based on pixels. The origin of the pixel coordinate system is at the upper corner of the image coordinate system. A pixel point is a point in the captured image captured by the image acquisition device.

[0030] Get 4 pairs of calibration points. Each pair of calibration points includes a pixel point in a pixel coordinate system and a position point in the world coordinate system corresponding to the pixel point. Construct the conversion information of the pixel point and the position point in advance. The expression formula of the conversion information is:

[0031]

[0032] Among them, u is the horizontal coordinate of the pixel point in the pixel coordinate system, v is the vertical coordinate of the pixel point in the pixel coordinate system, Z is the z-axis coordinate of the target point in the camera coordinate system, and the target point in the camera coordinate system is obtained by pixel point conversion, X w is the x-axis coordinate of the position point in the world coordinate system, Y w is the y-axis coordinate of the position point in the world coordinate system, Z w is the z-axis coordinate of the position point in the world coordinate system, R0 and T0 are the initial external parameters, R0 is the initial rotation vector of the image acquisition device (camera), T0 is the initial translation vector of the image acquisition device, and fx 、f y , u0 and v0 are internal parameters, u0 is the x-coordinate of the pixel origin coordinate, and v0 is the y-coordinate of the pixel origin coordinate.

[0033] Substitute each pair of calibration points and intrinsic parameters into the above expression formula of conversion information to obtain a target equation about the extrinsic parameters. Substitute multiple pairs of calibration points to obtain multiple target equations. Solve multiple target equations to obtain the value of the extrinsic parameters. Update the initial extrinsic parameters according to the values ​​of the extrinsic parameters obtained by solving them to obtain the extrinsic parameters.

[0034] S200: Based on the intrinsic parameters and the extrinsic parameters, a target pixel point of the target object in the pixel coordinate system is converted into a three-dimensional position point of the target object in the world coordinate system to obtain a three-dimensional position of the target object.

[0035] Based on the intrinsic parameters and the extrinsic parameters, the target pixel points of the target object in the captured image are converted into the target three-dimensional position points of the target object in the world coordinate system. Specifically, based on the intrinsic parameters, the target pixel points are converted into the initial three-dimensional position points in the camera coordinate system; based on the extrinsic parameters, the initial three-dimensional position points are converted into the target three-dimensional position points.

[0036] According to the image acquisition device taking a picture or photographing the target object, a target image of the target object is acquired, and a target pixel point of the target object is acquired from the target image.

[0037] like Figure 2 As shown, P is the initial three-dimensional position point in the camera coordinate system, P' is the imaging point in the image coordinate system, and the optical center O is the origin of the camera coordinate system. Oxyz is the camera coordinate system. O'-x'-y' is the image coordinate system. According to the pinhole imaging principle.

[0038]

[0039] Where X is the x-axis coordinate of point P in the camera coordinate system, Y is the y-axis coordinate of point P in the camera coordinate system, Z is the z-axis coordinate of point P in the camera coordinate system, X' is the x-axis coordinate of point P' in the image coordinate system, Y' is the y-axis coordinate of point P' in the image coordinate system, and f is the focal length of the camera.

[0040] The origin of the pixel coordinate system is located at the upper left corner of the image (photo), the u axis is parallel to the x' axis of the image coordinate system to the right, and the v axis is parallel to the y' axis of the image coordinate system. Suppose the pixel coordinate system is scaled by α times on the u axis and β times on the v axis. The origin of the pixel coordinate system is translated by [u0, v0] relative to the origin of the image coordinate system. T , that is, the pixel origin coordinates of the pixel coordinate system are [u0, v0] T. Let the coordinates of the target pixel point corresponding to P' in the pixel coordinate system be [u1, v1] T .

[0041]

[0042] According to the above formula, the conversion formula between the target pixel point and the initial three-dimensional position point is obtained:

[0043]

[0044] Among them, u1 is the horizontal coordinate of the target pixel in the pixel coordinate system, v1 is the vertical coordinate of the target pixel in the pixel coordinate system, X is the x-axis coordinate of point P in the camera coordinate system, Y is the y-axis coordinate of point P in the camera coordinate system, Z is the z-axis coordinate of point P in the camera coordinate system, and f x is the x-axis unit physical distance corresponding to the unit pixel of the x-axis in the pixel coordinate system, f y is the unit physical distance of the y-axis corresponding to the unit pixel of the y-axis in the pixel coordinate system, u0 is the x-coordinate of the pixel origin of the pixel coordinate system, v0 is the y-coordinate of the pixel origin of the pixel coordinate system, and f x 、f y , u0 and v0 are internal parameters.

[0045] Substitute the coordinates of the target pixel point into the above conversion formula to obtain the coordinates of the initial three-dimensional position point.

[0046] The position of the camera is determined by the camera's rotation vector R and the camera's translation vector T. Let the target three-dimensional position point in the world coordinate system corresponding to the point P in the camera coordinate system be P w The conversion formula between the initial 3D position point and the target 3D position point is:

[0047]

[0048] Among them, X w1 is the x-axis coordinate of the target 3D position point in the world coordinate system, Y w1 is the y-axis coordinate of the target 3D position point in the world coordinate system, Z w1 is the z-axis coordinate of the target 3D position point in the world coordinate system, X is the x-axis coordinate of point P (initial 3D position point) in the camera coordinate system, Y is the y-axis coordinate of point P in the camera coordinate system, Z is the z-axis coordinate of point P in the camera coordinate system, R and T are external parameters, R is the rotation vector of the camera, and T is the translation vector of the camera.

[0049] Substituting the coordinates of the initial three-dimensional position point into the above conversion formula, the coordinates of the target three-dimensional position point are obtained, and then the three-dimensional position of the target object is obtained.

[0050] Furthermore, acquired images of the target object at different time points in the same scene are obtained (acquired by image acquisition devices at different positions and angles of the scene), and the three-dimensional position of the target object is determined based on the target pixel points of the target object in each acquired image. Based on all three-dimensional positions of the target object, the three-dimensional motion trajectory of the target object in the scene is determined.

[0051] The method for determining the three-dimensional position of a target provided by an embodiment of the present invention determines the external parameters of the image acquisition device based on multiple pairs of calibration points of the image acquisition device and the internal parameters of the image acquisition device. Each pair of calibration points includes a pixel point in the pixel coordinate system of the image acquisition device and a position point in the world coordinate system matching the pixel point. The internal parameters characterize the conversion relationship between the pixel coordinate system and the camera coordinate system of the image acquisition device, and the external parameters characterize the conversion relationship between the camera coordinate system and the world coordinate system. Based on the internal parameters and the external parameters, the target pixel point of the target object in the pixel coordinate system is converted into the target three-dimensional position point of the target object in the world coordinate system to obtain the three-dimensional position of the target object. The embodiment of the present invention calibrates the external parameters based on the existing internal parameters and multiple pairs of calibration points, thereby improving the accuracy of the external parameter calibration. According to the internal parameters and the external parameters, the target pixel point is converted into the target three-dimensional position point, so that the actual three-dimensional position of the target object is obtained according to the captured image of the image acquisition device, which is conducive to improving the accuracy and efficiency of obtaining the actual three-dimensional position.

[0052] Based on the above embodiment, the intrinsic parameters include the coordinates of the pixel origin of the pixel coordinate system, the number of pixels per unit distance on the x-axis of the pixel coordinate system, and the number of pixels per unit distance on the y-axis of the pixel coordinate system. The intrinsic parameters are determined based on the following steps:

[0053] S110: Determine the x-coordinate of the pixel origin coordinate based on the maximum x-axis resolution of the image acquisition device, determine the y-coordinate of the pixel origin coordinate based on the maximum y-axis resolution of the image acquisition device, and obtain the pixel origin coordinate based on the x-coordinate of the pixel origin coordinate and the y-coordinate of the pixel origin coordinate.

[0054] S120: Determine the number of pixels per unit distance on the x-axis of the pixel coordinate system based on the focal length of the image acquisition device, the x-axis sensor size of the image acquisition device and the maximum resolution on the x-axis; determine the number of pixels per unit distance on the y-axis of the pixel coordinate system based on the focal length, the y-axis sensor size of the image acquisition device and the maximum resolution on the y-axis.

[0055] Based on the focal length of the image acquisition device, the x-axis sensor size of the image acquisition device and the maximum x-axis resolution, the number of pixels per unit distance on the x-axis of the pixel coordinate system is determined. Specifically, based on the ratio of the x-axis sensor size and the maximum x-axis resolution, the x-axis unit physical distance corresponding to the unit pixel on the x-axis in the pixel coordinate system is determined; based on the ratio of the focal length and the x-axis unit physical distance, the number of pixels per unit distance on the x-axis of the pixel coordinate system is determined.

[0056] Based on the focal length, the y-axis sensor size of the image acquisition device and the maximum resolution of the y-axis, the number of pixels per unit distance on the y-axis of the pixel coordinate system is determined. Specifically, based on the ratio of the y-axis sensor size and the maximum resolution of the y-axis, the y-axis unit physical distance corresponding to the unit pixel on the y-axis in the pixel coordinate system is determined; based on the ratio of the focal length and the y-axis unit physical distance, the number of pixels per unit distance on the y-axis of the pixel coordinate system is determined.

[0057] Maximum resolution refers to the maximum number of pixels in an image that a camera can capture. Sensor size describes the size of the camera's imaging plane.

[0058] If the center point of the camera imaging plane is taken as the origin of the image coordinate system, the origin of the pixel coordinate system is the upper left corner of the camera imaging plane.

[0059] The pixel origin coordinates of the pixel coordinate system are the coordinates of the origin of the pixel coordinate system in the image coordinate system. The intrinsic parameters of the image acquisition device can be calculated based on the focal length of the image acquisition device (camera), the maximum resolution of the camera, and the sensor size of the camera. The calculation formula of the intrinsic parameters is:

[0060]

[0061] u0=P x / 2

[0062] v0=P y / 2

[0063] Where f is the focal length, dx is the physical distance per unit pixel on the x-axis in the pixel coordinate system, dy is the physical distance per unit pixel on the y-axis in the pixel coordinate system, and f is the distance per unit pixel on the y-axis in the pixel coordinate system. x is the number of pixels per unit distance on the x-axis of the pixel coordinate system, f y is the number of pixels per unit distance on the y-axis of the pixel coordinate system, L x is the x-axis sensor size, L y is the y-axis sensor size, P x is the highest resolution on the x-axis, P y The maximum resolution of the y-axis is the x-coordinate of the u0 pixel origin coordinate and the y-coordinate of the v0 pixel origin coordinate.

[0064] The method for determining the three-dimensional position of a target provided by an embodiment of the present invention calculates internal parameters through the focal length of the camera, the maximum resolution of the camera and the sensor size of the camera, which is conducive to improving the accuracy of determining the internal parameters.

[0065] The embodiment of the present invention also provides a device for determining the three-dimensional position of a target, such as Figure 3 As shown, Figure 3 It should be noted that the three-dimensional position determination device for a target provided by the present invention can execute the three-dimensional position determination method for a target described in any of the above embodiments during specific operation, which will not be described in detail in this embodiment.

[0066] Reference Figure 3 , an embodiment of the present invention provides a device for determining a three-dimensional position of a target, comprising:

[0067] The calibration module 301 is used to determine the external parameters of the image acquisition device based on multiple pairs of calibration points of the image acquisition device and the intrinsic parameters of the image acquisition device. Each pair of calibration points includes a pixel point in the pixel coordinate system of the image acquisition device and a position point in the world coordinate system matching the pixel point. The intrinsic parameters represent the conversion relationship between the pixel coordinate system and the camera coordinate system of the image acquisition device, and the extrinsic parameters represent the conversion relationship between the camera coordinate system and the world coordinate system.

[0068] The three-dimensional position determination module 302 is used to convert the target pixel point of the target object in the pixel coordinate system into the target three-dimensional position point of the target object in the world coordinate system based on the intrinsic parameters and the extrinsic parameters to obtain the three-dimensional position of the target object.

[0069] The three-dimensional position determination device of the target provided by the embodiment of the present invention determines the external parameters of the image acquisition device based on multiple pairs of calibration points of the image acquisition device and the internal parameters of the image acquisition device, each pair of calibration points includes a pixel point in the pixel coordinate system of the image acquisition device and a position point in the world coordinate system matching the pixel point, the internal parameters represent the conversion relationship between the pixel coordinate system and the camera coordinate system of the image acquisition device, and the external parameters represent the conversion relationship between the camera coordinate system and the world coordinate system; based on the internal parameters and the external parameters, the target pixel point of the target object in the pixel coordinate system is converted into the target three-dimensional position point of the target object in the world coordinate system to obtain the three-dimensional position of the target object. The embodiment of the present invention calibrates the external parameters according to the existing internal parameters and multiple pairs of calibration points, thereby improving the accuracy of the external parameter calibration. According to the internal parameters and the external parameters, the target pixel point is converted into the target three-dimensional position point, so that the actual three-dimensional position of the target object is obtained according to the captured image of the image acquisition device, which is conducive to improving the accuracy and efficiency of obtaining the actual three-dimensional position.

[0070] In one embodiment, the calibration module 301 is used to: construct conversion information of pixel points and position points based on intrinsic parameters and initial extrinsic parameters; substitute multiple pairs of calibration points into the conversion information to update the initial extrinsic parameters to obtain extrinsic parameters.

[0071] In one embodiment, the internal parameters include the pixel origin coordinates of the pixel coordinate system, the number of pixels per unit distance on the x-axis of the pixel coordinate system, and the number of pixels per unit distance on the y-axis of the pixel coordinate system. The internal parameters are determined based on the following steps: determining the x-coordinate of the pixel origin coordinates based on the maximum x-axis resolution of the image acquisition device, determining the y-coordinate of the pixel origin coordinates based on the maximum y-axis resolution of the image acquisition device, and obtaining the pixel origin coordinates based on the x-coordinate of the pixel origin coordinates and the y-coordinate of the pixel origin coordinates; determining the number of pixels per unit distance on the x-axis of the pixel coordinate system based on the focal length of the image acquisition device, the x-axis sensor size of the image acquisition device, and the maximum x-axis resolution, and determining the number of pixels per unit distance on the y-axis of the pixel coordinate system based on the focal length, the y-axis sensor size of the image acquisition device, and the maximum y-axis resolution.

[0072] In one embodiment, the calibration module 301 is used to: determine the x-axis unit physical distance corresponding to the unit pixel of the x-axis in the pixel coordinate system based on the ratio of the x-axis sensor size and the x-axis maximum resolution; determine the number of pixels per unit distance of the x-axis in the pixel coordinate system based on the ratio of the focal length and the x-axis unit physical distance.

[0073] In one embodiment, the calibration module 301 is used to: determine the y-axis unit physical distance corresponding to the unit pixel of the y-axis in the pixel coordinate system based on the ratio of the y-axis sensor size and the y-axis maximum resolution; determine the number of pixels per unit distance of the y-axis in the pixel coordinate system based on the ratio of the focal length and the y-axis unit physical distance.

[0074] In one embodiment, the three-dimensional position determination module 302 is used to: convert the target pixel point into an initial three-dimensional position point in the camera coordinate system based on the intrinsic parameters; and convert the initial three-dimensional position point into a target three-dimensional position point based on the extrinsic parameters.

[0075] Figure 4 is a schematic diagram of the structure of the electronic device provided by the present invention, such as Figure 4As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communication interface 420 and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute the method for determining the three-dimensional position of the target, the method comprising: determining the external parameters of the image acquisition device based on multiple pairs of calibration points of the image acquisition device and the internal parameters of the image acquisition device, each pair of calibration points includes a pixel point in the pixel coordinate system of the image acquisition device and a position point in the world coordinate system matching the pixel point, the internal parameters represent the conversion relationship between the pixel coordinate system and the camera coordinate system of the image acquisition device, and the external parameters represent the conversion relationship between the camera coordinate system and the world coordinate system; based on the internal parameters and the external parameters, converting the target pixel point of the target object in the pixel coordinate system into the target three-dimensional position point of the target object in the world coordinate system to obtain the three-dimensional position of the target object.

[0076] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0077] On the other hand, an embodiment of the present application further provides a computer program product, the computer program product including a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, and when the computer program is executed by a processor, the computer can execute the routing link determination method provided in the above embodiments, for example, including:

[0078] Based on multiple pairs of calibration points of the image acquisition device and the intrinsic parameters of the image acquisition device, the extrinsic parameters of the image acquisition device are determined, each pair of calibration points includes a pixel point in the pixel coordinate system of the image acquisition device and a position point in the world coordinate system matching the pixel point, the intrinsic parameters characterize the conversion relationship between the pixel coordinate system and the camera coordinate system of the image acquisition device, and the extrinsic parameters characterize the conversion relationship between the camera coordinate system and the world coordinate system; based on the intrinsic parameters and the extrinsic parameters, the target pixel point of the target object in the pixel coordinate system is converted into the target three-dimensional position point of the target object in the world coordinate system to obtain the three-dimensional position of the target object.

[0079] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the three-dimensional position determination method of the target provided in the above-mentioned embodiments, the method comprising: determining the external parameters of the image acquisition device based on multiple pairs of calibration points of the image acquisition device and the intrinsic parameters of the image acquisition device, each pair of calibration points comprising a pixel point in the pixel coordinate system of the image acquisition device and a position point in the world coordinate system matching the pixel point, the intrinsic parameters characterizing the conversion relationship between the pixel coordinate system and the camera coordinate system of the image acquisition device, and the extrinsic parameters characterizing the conversion relationship between the camera coordinate system and the world coordinate system; based on the intrinsic parameters and the extrinsic parameters, converting the target pixel point of the target object in the pixel coordinate system into the target three-dimensional position point of the target object in the world coordinate system to obtain the three-dimensional position of the target object.

[0080] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0081] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0082] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for determining a three-dimensional position of a target, characterized in that: include: Determine the extrinsic parameters of the image acquisition device based on multiple pairs of calibration points of the image acquisition device and the intrinsic parameters of the image acquisition device, each pair of the calibration points includes a pixel point in a pixel coordinate system of the image acquisition device and a position point in a world coordinate system matching the pixel point, the intrinsic parameters represent the conversion relationship between the pixel coordinate system and the camera coordinate system of the image acquisition device, and the extrinsic parameters represent the conversion relationship between the camera coordinate system and the world coordinate system; Based on the intrinsic parameters and the extrinsic parameters, a target pixel point of the target object in the pixel coordinate system is converted into a target three-dimensional position point of the target object in the world coordinate system to obtain a three-dimensional position of the target object.

2. The method for determining the three-dimensional position of a target according to claim 1, characterized in that: The step of determining the extrinsic parameters of the image acquisition device based on multiple pairs of calibration points of the image acquisition device and the intrinsic parameters of the image acquisition device comprises: Based on the intrinsic parameters and the initial extrinsic parameters, constructing conversion information of the pixel point and the position point; Substituting a plurality of pairs of the calibration points into the conversion information to update the initial extrinsic parameters, thereby obtaining the extrinsic parameters.

3. The method for determining the three-dimensional position of a target according to claim 1, characterized in that: The internal parameters include the coordinates of the pixel origin of the pixel coordinate system, the number of pixels per unit distance on the x-axis of the pixel coordinate system, and the number of pixels per unit distance on the y-axis of the pixel coordinate system, and the internal parameters are determined based on the following steps: Determine the x-coordinate of the pixel origin coordinate based on the highest x-axis resolution of the image acquisition device, determine the y-coordinate of the pixel origin coordinate based on the highest y-axis resolution of the image acquisition device, and obtain the pixel origin coordinate based on the x-coordinate of the pixel origin coordinate and the y-coordinate of the pixel origin coordinate; Based on the focal length of the image acquisition device, the x-axis sensor size of the image acquisition device and the maximum resolution of the x-axis, the number of pixels per unit distance on the x-axis of the pixel coordinate system is determined; based on the focal length, the y-axis sensor size of the image acquisition device and the maximum resolution of the y-axis, the number of pixels per unit distance on the y-axis of the pixel coordinate system is determined.

4. The method for determining the three-dimensional position of a target according to claim 3, characterized in that: The step of determining the number of pixels per unit distance on the x-axis of the pixel coordinate system based on the focal length of the image acquisition device, the x-axis sensor size of the image acquisition device, and the x-axis maximum resolution comprises: Determine, based on a ratio of the x-axis sensor size to the x-axis maximum resolution, a x-axis unit physical distance corresponding to a unit pixel of the x-axis in the pixel coordinate system; The number of pixels per unit distance on the x-axis of the pixel coordinate system is determined based on the ratio of the focal length to the unit physical distance on the x-axis.

5. The method for determining the three-dimensional position of a target according to claim 3, characterized in that: The step of determining the number of pixels per unit distance on the y-axis of the pixel coordinate system based on the focal length, the y-axis sensor size of the image acquisition device, and the y-axis maximum resolution comprises: Determine, based on a ratio of the y-axis sensor size to the y-axis maximum resolution, a y-axis unit physical distance corresponding to a unit pixel of the y-axis in the pixel coordinate system; The number of pixels per unit distance on the y-axis of the pixel coordinate system is determined based on the ratio of the focal length to the unit physical distance on the y-axis.

6. The method for determining the three-dimensional position of a target according to claim 1, characterized in that: The converting, based on the intrinsic parameters and the extrinsic parameters, the target pixel point of the target object in the acquired image into the target three-dimensional position point of the target object in the world coordinate system comprises: Based on the intrinsic parameters, converting the target pixel point into an initial three-dimensional position point in the camera coordinate system; Based on the extrinsic parameters, the initial three-dimensional position point is converted into the target three-dimensional position point.

7. A device for determining a three-dimensional position of a target, characterized in that: include: A calibration module, configured to determine extrinsic parameters of the image acquisition device based on multiple pairs of calibration points of the image acquisition device and intrinsic parameters of the image acquisition device, wherein each pair of calibration points includes a pixel point in a pixel coordinate system of the image acquisition device and a position point in a world coordinate system matching the pixel point, the intrinsic parameters represent a conversion relationship between the pixel coordinate system and a camera coordinate system of the image acquisition device, and the extrinsic parameters represent a conversion relationship between the camera coordinate system and the world coordinate system; The three-dimensional position determination module is used to convert the target pixel point of the target object in the pixel coordinate system into the target three-dimensional position point of the target object in the world coordinate system based on the intrinsic parameters and the extrinsic parameters to obtain the three-dimensional position of the target object.

8. An electronic device comprising a processor and a memory storing a computer program, characterized in that: When the processor executes the computer program, the method for determining the three-dimensional position of the target according to any one of claims 1 to 6 is implemented.

9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for determining the three-dimensional position of a target according to any one of claims 1 to 6 is implemented.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for determining the three-dimensional position of a target according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Object positioning method, device, apparatus, and storage medium

    CN109472829A

  • Shared bicycle auxiliary positioning method and device based on monocular vision

    CN111062986A

  • Camera calibration method and device, equipment, storage medium and program product

    CN112991463A

  • Positioning Method and Apparatus

    US20220277478A1

  • Road distress detection method and apparatus, electronic device, and storage medium

    WO2022227405A1

Cited By

  • Target positioning method, target positioning device and auxiliary aiming system

    CN119090949A

  • Target positioning method and device, equipment, storage medium and program product

    CN121213650A