Method, device and system for positioning based on monocular fixed-focus holder camera
Through the calibrated monocular fixed-focus gimbal camera, the coordinate information and attitude information of the camera center at different positions are determined, and the deflection vector is calculated using the imaging model, which solves the problem that the monocular fixed-focus gimbal camera cannot locate the static target, and achieves efficient positioning of the static target.
Patent Information
- Application Number
- CN202411852705.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2044-12-16
AI Technical Summary
No method in the prior art can achieve positioning of static targets based on a monocular fixed-focus gimbal camera.
Through the calibrated monocular fixed-focus gimbal camera, coordinate information and posture information of the camera center in the world coordinate system at different positions are determined, images corresponding to the camera center in different positions are obtained, and coordinate information of the static target is determined based on the image coordinate system. Using the imaging model and calibration parameters, the deflection vector from the camera center to the static target is calculated, thereby determining the coordinate information under the world coordinate system of the static target.
It realizes that only a single-eye fixed-focus gimbal camera is used to process the same static target image in different positions, and can efficiently locate static targets and is suitable for indoor close-up application scenarios.
Smart Images

Figure CN119784822A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image data processing, and in particular to a positioning technology based on a monocular fixed-focus pan-tilt camera. Background Art
[0002] In the prior art, binocular cameras, zoom cameras, etc. can usually be used to locate spatial points (or static targets), but there is no existing method that can locate static targets based on a monocular fixed-focus gimbal camera. Summary of the invention
[0003] The purpose of the present invention is to provide a method, device and system for positioning based on a monocular fixed-focus pan-tilt camera, so as to solve the technical problem that static target positioning cannot be achieved based on a monocular fixed-focus pan-tilt camera in the prior art.
[0004] According to one aspect of the present invention, a method for positioning based on a monocular fixed-focus pan-tilt camera is provided, characterized in that the method comprises:
[0005] Based on the calibrated monocular fixed-focus gimbal camera, determine first coordinate information and first posture information in a world coordinate system corresponding to a center of the camera at a first position, and acquire a first image including a static target at the first position;
[0006] Adjust the camera posture, determine the second coordinate information and second posture information in the world coordinate system corresponding to the camera center when the camera center is at the second position, and obtain a second image including the static target at the second position;
[0007] Based on the image coordinate system, determining coordinate information of the static target in the first image and the second image respectively;
[0008] Determine, according to the calibration parameters of the monocular fixed-focus gimbal camera, the first coordinate information and the first posture information, the second coordinate information and the second posture information, the coordinate information of the static target in the first image, and the coordinate information of the static target in the second image, respectively, a first deflection vector and a second deflection vector from the center of the camera to the static target in the world coordinate system;
[0009] The coordinate information of the static target in the world coordinate system is determined according to the first coordinate information, the second coordinate information, the first deflection vector, and the second deflection vector.
[0010] Optionally, determining the deflection vector from the center of the camera to the static target in the world coordinate system includes:
[0011] According to the calibration parameters of the monocular fixed-focus gimbal camera and the coordinate information of the static target in the image, an imaging model is used to determine the relative deflection vector from the camera center to the static target in the camera coordinate system;
[0012] The deflection vector from the camera center in the world coordinate system to the static target is determined according to the coordinate information and posture information of the camera center in the world coordinate system and the relative deflection vector.
[0013] Optionally, the imaging model comprises a pinhole imaging model, wherein:
[0014] The following formula (1) is used to determine the relative deflection vector from the camera center to the static target in the camera coordinate system:
[0015]
[0016] Where K is the projection matrix in the pinhole imaging model, (U, V, 1) T is the relative deflection vector from the camera center to the static target in the camera coordinate system, f x 、f y 、c x 、c y is the calibration parameter of the camera, (u,v) is the coordinate information of the static target in the image coordinate system, (u,v,1) T is the homogeneous coordinate expression of (u,v);
[0017] The following formula (2) is used to determine the deflection vector from the camera center to the static target in the world coordinate system:
[0018]
[0019] Among them, P is the static target in the world coordinate system, C is the coordinate information of the camera center in the world coordinate system, and R is the rotation matrix of the camera coordinate system relative to the world coordinate system.
[0020] Optionally, the method further comprises:
[0021] Determine a number of static targets corresponding to a stationary object within the visual range of the monocular fixed-focus gimbal camera;
[0022] Each static target is traversed to determine the coordinate information of each static target in the world coordinate system, and the size of the static object is determined according to the coordinate information of each static target in the world coordinate system.
[0023] Optionally, the method further comprises:
[0024] Traversing each static target within the visual range of the monocular fixed-focus gimbal camera, and determining the coordinate information of each static target in the world coordinate system;
[0025] A three-dimensional map of the visible range of the monocular fixed-focus gimbal camera is constructed according to the coordinate information of all static targets in the world coordinate system.
[0026] Optionally, the method further comprises:
[0027] Based on the coordinate information of the static target in the world coordinate system, a distance of the static target relative to the rotation center of the monocular fixed-focus gimbal camera is determined.
[0028] According to another aspect of the present invention, a device for positioning based on a monocular fixed-focus gimbal camera is provided, wherein the device comprises:
[0029] The first module is used to determine, based on the calibrated monocular fixed-focus gimbal camera, first coordinate information and first posture information in a world coordinate system corresponding to when the camera center is at a first position, and to obtain a first image including a static target at its first position;
[0030] The second module is used to adjust the camera posture, determine the second coordinate information and the second posture information in the world coordinate system corresponding to the camera center when the camera center is at the second position, and obtain a second image including the static target at its second position;
[0031] A third module is used to determine the coordinate information of the static target in the first image and the second image respectively based on the image coordinate system;
[0032] A fourth module is used to determine a first deflection vector and a second deflection vector from the camera center to the static target in a world coordinate system according to the calibration parameters of the monocular fixed-focus gimbal camera, the first coordinate information and the first posture information, the second coordinate information and the second posture information, the coordinate information of the static target in the first image, and the coordinate information of the static target in the second image;
[0033] The fifth module is used to determine the coordinate information of the static target in the world coordinate system according to the first coordinate information, the second coordinate information, the first deflection vector and the second deflection vector.
[0034] Optionally, the device further comprises:
[0035] The sixth module is used to determine a number of static targets corresponding to a stationary object within the visible range of the monocular fixed-focus gimbal camera; and traverse each static target, determine the coordinate information of each static target in the world coordinate system, and determine the size of the stationary object based on the coordinate information of each static target in the world coordinate system.
[0036] Optionally, the device further comprises:
[0037] The seventh module is used to traverse each static target within the visible range of the monocular fixed-focus gimbal camera, determine the coordinate information of each static target in the world coordinate system; and construct a three-dimensional map of the visible range of the monocular fixed-focus gimbal camera based on the coordinate information of all static targets in the world coordinate system.
[0038] According to another aspect of the present invention, a system for positioning based on a monocular fixed-focus gimbal camera is provided, characterized in that the system comprises:
[0039] The calibrated monocular fixed-focus gimbal camera is used to take pictures of static targets within the visible range;
[0040] A host computer is used to obtain first coordinate information and first posture information of the camera center of the monocular fixed-focus gimbal camera in a world coordinate system corresponding to the first position, and second coordinate information and second posture information in the world coordinate system corresponding to the second position, and respectively obtain a first image and a second image including the static target taken at the first position and the second position; based on the image coordinate system, respectively determine the coordinate information of the static target in the first image and the second image; according to the calibration parameters of the monocular fixed-focus gimbal camera, the first coordinate information and the first posture information, the second coordinate information and the second posture information, the coordinate information of the static target in the first image and the coordinate information of the static target in the second image, respectively determine a first deflection vector and a second deflection vector from the camera center to the static target in the world coordinate system; according to the first coordinate information, the second coordinate information, the first deflection vector and the second deflection vector, determine the coordinate information of the static target in the world coordinate system.
[0041] Compared with the prior art, the present invention provides a method, device and system for positioning based on a monocular fixed-focus gimbal camera. The method includes: based on a calibrated monocular fixed-focus gimbal camera, determining the first coordinate information and first posture information in the world coordinate system corresponding to the camera center when it is in the first position, and obtaining a first image including a static target at its first position; adjusting the camera posture, determining the second coordinate information and second posture information in the world coordinate system corresponding to the camera center when it is in the second position, and obtaining a second image including the static target at its second position; based on the image coordinate system, respectively determining the coordinate information of the static target in the first image and the second image; according to the calibration parameters of the monocular fixed-focus gimbal camera, the first coordinate information and the first posture information, the second coordinate information and the second posture information, the coordinate information of the static target in the first image and the coordinate information of the static target in the second image, respectively determining the first deflection vector and the second deflection vector from the camera center to the static target in the world coordinate system; according to the first coordinate information, the second coordinate information, the first deflection vector and the second deflection vector, determining the coordinate information of the static target in the world coordinate system.
[0042] The technical effects that the present invention can bring are:
[0043] The static target can be positioned by processing the acquired images only according to the images taken by the monocular fixed-focus pan-tilt camera at different positions of the same static target. The method of the invention is simple and efficient to implement, and is particularly suitable for positioning static targets in indoor close-up application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0045] Figure 1 A schematic diagram of a method for positioning based on a monocular fixed-focus pan-tilt camera according to one aspect of the present invention is shown;
[0046] Figure 2 A schematic diagram showing the position and posture of the camera center in the world coordinate system of an embodiment of one aspect of the present invention;
[0047] Figure 3 A schematic diagram showing the relative positions of a camera center and a static target according to an embodiment of one aspect of the present invention;
[0048] Figure 4 A schematic diagram showing the deflection of different positions of the camera center to a static target in a world coordinate system according to an embodiment of one aspect of the present invention;
[0049] Figure 5A schematic diagram of a device for positioning based on a monocular fixed-focus pan-tilt camera according to another aspect of the present invention is shown;
[0050] Figure 6 A schematic diagram of a system for positioning based on a monocular fixed-focus pan-tilt camera according to another aspect of the present invention is shown;
[0051] The same or similar reference numerals in the drawings represent the same or similar components. DETAILED DESCRIPTION
[0052] The present invention is further described in detail below in conjunction with the accompanying drawings.
[0053] In a typical configuration of each embodiment of the present invention, the execution subject of the method, each trusted party of the system and / or each module of the device may include one or more processors (CPU), input / output interface, network interface and memory.
[0054] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0055] Computer readable media may include permanent and non-permanent, removable and non-removable media, and may be implemented by any method or technology to store information. Information may be computer readable instructions, data structures, modules of programs, or other data. Computer storage media may include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory media such as modulated data signals and carrier waves.
[0056] The present invention can locate a static target (or static space point) within the visible range of the space where the camera is located, and measure the distance between the camera and the static target within the visible range of the space through a host computer 100 and a monocular fixed-focus gimbal camera 200, wherein the host computer 100 is electrically connected to the monocular fixed-focus gimbal camera, wherein the electrical connection can be a wired electrical connection or a wireless electrical connection, which is not limited here.
[0057] In order to further illustrate the technical means adopted by the present invention and the effects achieved, the technical scheme of the present invention is clearly and completely described below in conjunction with the accompanying drawings and various embodiments.
[0058] Figure 1 A schematic diagram of a method for positioning based on a monocular fixed-focus gimbal camera according to one aspect of the present invention is shown, wherein the method of one embodiment includes:
[0059] S101 determines, based on the calibrated monocular fixed-focus gimbal camera, first coordinate information and first posture information in a world coordinate system corresponding to a camera center at a first position, and acquires a first image including a static target at the first position;
[0060] S102 adjusts the camera posture, determines the second coordinate information and the second posture information in the world coordinate system corresponding to the camera center when the camera center is at the second position, and obtains a second image including the static target at the second position;
[0061] S103, based on the image coordinate system, respectively determining coordinate information of the static object in the first image and the second image;
[0062] S104, according to the calibration parameters of the monocular fixed-focus gimbal camera, the first coordinate information and the first posture information, the second coordinate information and the second posture information, the coordinate information of the static target in the first image, and the coordinate information of the static target in the second image, respectively determine a first deflection vector and a second deflection vector from the camera center to the static target in the world coordinate system;
[0063] S105: Determine the coordinate information of the static target in the world coordinate system according to the first coordinate information, the second coordinate information, the first deflection vector, and the second deflection vector.
[0064] The method embodiment of the present application is implemented by a host computer and a calibrated monocular fixed-focus camera. The host computer may be a computer device. The computer device includes but is not limited to a personal computer, a laptop computer, an industrial computer, a server, a network host, a single network server, etc. Here, the computer device is only an example, and other existing or future devices and / or resources that may appear should also be included in the scope of protection of the present application if they are applicable to the present application, and are hereby included by reference.
[0065] The camera center refers to the focusing center of the camera, which is a key point in the camera imaging process and the origin of the camera coordinate system. In the present application, after the monocular fixed-focus gimbal camera 200 is calibrated, the host computer 100 can obtain the calibration parameters of the calibrated monocular fixed-focus gimbal camera 200. Under different postures of the calibrated monocular fixed-focus gimbal camera 200 (i.e., the gimbal rotation center does not move, but the camera posture changes relative to the gimbal rotation center), the coordinate information of the camera center in the world coordinate system is different.
[0066] In this embodiment, in step S101, based on the calibrated monocular fixed-focus gimbal camera, first coordinate information and first posture information in the world coordinate system corresponding to the camera center at the first position can be determined, and a first image including a static target can be acquired at its first position.
[0067] When the calibrated monocular fixed-focus gimbal camera is in a certain position, the static target is within its spatial visible range. The position of the camera center can be taken as the first position, and the host computer obtains the first coordinate information and first posture information in the world coordinate system corresponding to the camera center at the first position, and obtains the first image including the static target at its first position.
[0068] Continuing with this embodiment, in step S102, the camera posture can be adjusted to determine the second coordinate information and second posture information in the world coordinate system corresponding to the camera center at the second position, and obtain a second image including the static target at its second position.
[0069] Among them, after obtaining the first image, the posture of the calibrated monocular fixed-focus gimbal camera can be adjusted, and the position of the camera center can be used as the second position. The host computer can obtain the second coordinate information and second posture information in the world coordinate system corresponding to the camera center at the second position, and obtain a second image including the static target at its second position.
[0070] Continuing with this embodiment, in step S103, coordinate information of the static object in the first image and the second image may be determined based on the image coordinate system.
[0071] The host computer determines the coordinate information of the static target in the first image and the coordinate information of the static target in the second image based on the image coordinate system.
[0072] Continuing with this embodiment, in step S104, the first deflection vector and the second deflection vector from the camera center to the static target in the world coordinate system can be determined respectively according to the calibration parameters of the monocular fixed-focus gimbal camera, the first coordinate information and the first posture information, the second coordinate information and the second posture information, the coordinate information of the static target in the first image, and the coordinate information of the static target in the second image.
[0073] Among them, the host computer can determine the first deflection vector and the second deflection vector from the camera center in the world coordinate system to the static target according to the calibration parameters of the calibrated monocular fixed-focus gimbal camera, the first coordinate information and the first posture information obtained in step S101, the second coordinate information and the second posture information obtained in step S102, and the coordinate information of the static target determined in step S103 based on the image coordinate system in the first image and the coordinate information in the second image.
[0074] Optionally, in step S104, determining the deflection vector from the camera center to the static target in the world coordinate system includes:
[0075] According to the calibration parameters of the monocular fixed-focus gimbal camera and the coordinate information of the static target in the image, an imaging model is used to determine the relative deflection vector from the camera center to the static target in the camera coordinate system;
[0076] The deflection vector from the camera center in the world coordinate system to the static target is determined according to the coordinate information and posture information of the camera center in the world coordinate system and the relative deflection vector.
[0077] Among them, the host computer can use the imaging model to determine the relative offset from the camera center to the static target in the camera coordinate system according to the calibration parameters of the calibrated monocular fixed-focus gimbal camera and the coordinate information of the static target in the image obtained in step S103; and then determine the deflection vector from the camera center to the static target in the world coordinate system according to the coordinate information and posture information of the camera center in the world coordinate system obtained in the aforementioned steps, as well as the relative deflection vector.
[0078] The imaging model used may be an orthogonal projection model, a pinhole imaging model, or the like.
[0079] Optionally, if the imaging model adopts a pinhole imaging model,
[0080] The following formula (1) is used to determine the relative deflection vector from the camera center to the static target in the camera coordinate system:
[0081]
[0082] Where K is the projection matrix in the pinhole imaging model, (U, V, 1) T is the relative deflection vector from the camera center to the static target in the camera coordinate system, f x 、f y 、c x 、c y is the calibration parameter of the camera, (u,v) is the coordinate information of the static target in the image coordinate system, (u,v,1) Tis the homogeneous coordinate expression of (u,v);
[0083] The following formula (2) is used to determine the deflection vector from the camera center to the static target in the world coordinate system:
[0084]
[0085] Among them, P is the static target in the world coordinate system, C is the coordinate information of the camera center in the world coordinate system, and R is the rotation matrix of the camera coordinate system relative to the world coordinate system.
[0086] In this optional embodiment, after the monocular fixed-focus pan-tilt camera is calibrated, its relevant calibration parameters f x 、f y 、c x 、c y , and the distance r between the pan / tilt rotation center O and the camera center C can be determined. Figure 2 , Figure 3 , Figure 4 , the gimbal rotation center O of the monocular fixed-focus gimbal camera can be used as the origin to construct the world coordinate system, the camera center C can be used as the origin to construct the camera coordinate system, and the upper left corner of the image can be used as the origin to construct the image coordinate system. The rotation matrix R of the camera coordinate system relative to the world coordinate system can be determined. Then, the coordinate information of the static target P in the visible range of the monocular fixed-focus gimbal camera in the world coordinate system can be expressed as (x, y, z). The coordinate information of the camera center C of the monocular fixed-focus gimbal camera in a certain posture in the world coordinate system can be expressed as (x c ,y c ,z c ), the posture information can be expressed as The relationship between the coordinate information of the camera center C and the posture information can be expressed as follows:
[0087]
[0088] Where r is the distance between the gimbal rotation center O and the camera center C.
[0089] The coordinate information of a static target in an image in the image coordinate system can be expressed as (u, v), (u, v, 1) T As its homogeneous coordinate expression, the relative deflection vector from the camera center C to the static target P in the camera coordinate system can be expressed as (U, V, 1) T .
[0090] In an exemplary embodiment of the pinhole imaging model, when a monocular fixed-focus gimbal camera is in the first pose, the first coordinate information of the camera center in the world coordinate system at the first position C1 can be expressed as (x c1 ,y c1 ,zc1 ), the first posture information can be expressed as According to the first posture information Formula (3) can be used to determine the coordinate information (x c1 ,y c1 ,z c1 ). A first image including the static target P when the camera center is at the first position C1 can also be obtained, and the coordinate information of the static target P in the image in the image coordinate system can be determined, which can be expressed as (u1, v1). Then, when the camera distortion factor is not considered, the first relative deflection vector from the camera center to the static target P in the camera coordinate system when the camera center is at the first position C1 can be determined according to formula (1), which can be expressed as (U1, V1, 1) T Then, according to formula (2), the first deflection vector from the camera center to the static target P in the world coordinate system when the camera center is at the first position C1 can be determined, which can be expressed as After adjusting the camera posture, the camera center is at the second position C2, and its second coordinate information in the world coordinate system can be expressed as (x c2 ,y c2 ,z c2 ), the posture information can be expressed as Similarly, according to the second posture information Formula (3) can be used to determine the coordinate information of C2 (x c2 ,y c2 ,z c2 ). When the camera center is at the second position C2, the second image including the static target P can be obtained. The coordinate information of the static target P in the image in the image coordinate system can be expressed as (u2, v2). When the camera distortion factor is not considered, the second relative deflection vector from the camera center to the static target P in the camera coordinate system when the camera center is at the second position C2 can also be determined according to formula (1), which can be expressed as (U2, V2, 1) T Then, according to formula (2), the second deflection vector from the camera center to the static target P in the world coordinate system when the camera center is at the second position C2 can be determined, which can be expressed as
[0091] Continuing with this embodiment, in step S105, the coordinate information of the static target in the world coordinate system is determined according to the first coordinate information, the second coordinate information, the first deflection vector, and the second deflection vector.
[0092] The host computer may determine the coordinate information of the static target in the world coordinate system according to the first coordinate information obtained in step S101, the second coordinate information obtained in step S102, and the first deflection vector and the second deflection vector obtained in step S104.
[0093] Continuing the above exemplary embodiment, the camera center in the world coordinate system is determined to be respectively at the first position C1 to the first deflection vector of the static target P and a second deflection vector from the second position C2 to the static target P After that, the first coordinate information (x c1 ,y c1 ,z c1 ) and the second coordinate information (x c2 ,y c2 ,z c2 ), determine the vector according to the following formula (4)
[0094]
[0095] Then, according to the following formula (5),
[0096]
[0097] Determine the coordinate information of the static target P in the world coordinate system.
[0098] Optionally, after positioning the static target within the visible range of the space based on the calibrated monocular fixed-focus gimbal camera, for a static object within the visible range of the space that has a regular shape or a size that can be determined by a limited number of visible static targets, the method may further include:
[0099] S106 determines a number of static targets corresponding to a stationary object within the visual range of the monocular fixed-focus gimbal camera;
[0100] S107 traverses each static target, determines the coordinate information of each static target in the world coordinate system, and determines the size of the static object according to the coordinate information of each static target in the world coordinate system.
[0101] In this optional embodiment, in step S106, several necessary spatial points of a stationary object within the visible range of the space where the monocular fixed-focus gimbal camera 200 is located, whose size can be determined, can be determined, and each necessary spatial point can be used as a static target, for example, at least 4 different vertices of a cube, at least 1 pair of points on the surface of a sphere with the largest distance, and so on.
[0102] Continuing in this optional embodiment, in step S107, each static target determined in step S106 can be traversed, and the coordinate information of each static target of the stationary object in the world coordinate system can be determined according to the aforementioned steps S101 to S105. Then, in combination with the shape of the stationary object, the size of the stationary object can be determined according to the determined coordinate information of each static target in the world coordinate system. For example, the length, width, and height of the cube can be determined according to the determined coordinate information of at least four vertices of the cube in the world coordinate system; the diameter of the sphere can be determined according to the determined coordinate information of a pair of points on the surface of the sphere with the largest distance in the world coordinate system.
[0103] Optionally, after the static target within the visible range of the space is located based on the calibrated monocular fixed-focus gimbal camera, in combination with each locatable static target within the visible range of the space, the method may further include:
[0104] S108 traverses each static target within the visual range of the monocular fixed-focus gimbal camera, and determines the coordinate information of each static target in the world coordinate system;
[0105] S109 constructs a three-dimensional map of the visible range of the monocular fixed-focus gimbal camera according to the coordinate information of all static targets in the world coordinate system.
[0106] In this optional embodiment, in step S108, each locatable spatial point within the visible range of the space where the monocular fixed-focus gimbal camera 200 is located can be taken as a static target, and the coordinate information of each static target within the visible range in the world coordinate system is determined according to the aforementioned steps S101 to S105.
[0107] Continuing in this optional embodiment, in step S109, a three-dimensional map of the visible range of the space where the monocular fixed-focus gimbal camera 200 is located can be constructed based on the coordinate information of all static targets in the world coordinate system. For example, the three-dimensional map can be constructed using three-dimensional modeling software (Pro / E, Blender, etc.), the three-dimensional map can be drawn using Python software tools, and so on.
[0108] Optionally, after positioning a static target within the visible range of the space based on the calibrated monocular fixed-focus gimbal camera, the method may further include:
[0109] S110 determines, based on coordinate information of the static target in a world coordinate system, a distance of the static target relative to a rotation center of the monocular fixed-focus gimbal camera.
[0110] In this optional embodiment, the origin of the world coordinate system is the pan / tilt rotation center O of the monocular fixed-focus pan / tilt camera 200, and its coordinate information in the world coordinate system is (0,0,0). In step S110, the host computer 100 can determine the coordinate information (x, y, z) of the static target P in the world coordinate system according to the following formula (6):
[0111]
[0112] The distance of the static target P relative to the pan-tilt rotation center O of the monocular fixed-focus pan-tilt camera 200 can be determined.
[0113] Figure 5 A device for positioning based on a monocular fixed-focus gimbal camera according to another aspect of the present invention is shown, wherein the device of one embodiment includes:
[0114] The first module 510 is used to determine, based on the calibrated monocular fixed-focus gimbal camera, first coordinate information and first posture information in a world coordinate system corresponding to a camera center at a first position, and obtain a first image including a static target at its first position;
[0115] The second module 520 is used to adjust the camera posture, determine the second coordinate information and the second posture information in the world coordinate system corresponding to the camera center when the camera center is at the second position, and obtain a second image including the static target at its second position;
[0116] A third module 530 is used to determine the coordinate information of the static target in the first image and the second image respectively based on the image coordinate system;
[0117] The fourth module 540 is used to determine the first deflection vector and the second deflection vector from the camera center to the static target in the world coordinate system according to the calibration parameters of the monocular fixed-focus gimbal camera, the first coordinate information and the first posture information, the second coordinate information and the second posture information, the coordinate information of the static target in the first image, and the coordinate information of the static target in the second image;
[0118] The fifth module 550 is used to determine the coordinate information of the static target in the world coordinate system according to the first coordinate information, the second coordinate information, the first deflection vector and the second deflection vector.
[0119] In this embodiment, part or all of the device can be deployed in the host computer 100 that executes the aforementioned method embodiment and / or optional embodiment, and combined with a calibrated monocular fixed-focus gimbal camera, the aforementioned method embodiment and / or optional embodiment can be implemented.
[0120] After the monocular fixed-focus pan-tilt camera 200 is calibrated, the host computer 100 can obtain the calibration parameters of the calibrated monocular fixed-focus pan-tilt camera 200. When the calibrated monocular fixed-focus pan-tilt camera 200 is in a certain posture, the static target is in its spatial visual range. The position of the camera center of the calibrated monocular fixed-focus pan-tilt camera 200 can be used as the first position. In this embodiment, the first coordinate information and first posture information in the world coordinate system corresponding to the camera center at the first position are obtained through the first module 510 of the device, and the first image including the static target is obtained at its first position.
[0121] Continuing with this embodiment, when the camera posture is adjusted so that the camera center is in the second position, the second coordinate information and second posture information in the world coordinate system corresponding to the camera center in the second position can be obtained through the second module 520 of the device, and a second image including the static target can be obtained at its second position.
[0122] Continuing with this embodiment, the third module 530 of the device can determine the coordinate information of the static object in the first image and the coordinate information of the static object in the second image based on the image coordinate system.
[0123] Continuing with this embodiment, through the fourth module 540 of the device, the relative offset from the camera center in the camera coordinate system to the static target can be determined based on the calibration parameters of the calibrated monocular fixed-focus gimbal camera and the coordinate information of the static target in the image obtained in step S103, using an imaging model; and then the deflection vector from the camera center in the world coordinate system to the static target is determined based on the coordinate information and posture information of the camera center in the world coordinate system obtained in the aforementioned steps, as well as the relative deflection vector.
[0124] Continuing with this embodiment, through the fifth module 550 of the device, the coordinate information of the static target in the world coordinate system can be determined based on the first coordinate information obtained by the first module 510, the second coordinate information obtained by the second module 520, and the first deflection vector and the second deflection vector obtained by the fourth module 540.
[0125] Optionally, the device further comprises:
[0126] The sixth module 560 is used to determine a number of static targets corresponding to a stationary object within the visible range of the monocular fixed-focus gimbal camera; and traverse each static target, determine the coordinate information of each static target in the world coordinate system, and determine the size of the stationary object based on the coordinate information of each static target in the world coordinate system.
[0127] In this optional embodiment, through the sixth module 560 of the device, a number of necessary spatial points of a stationary object within the visible range of the space where the monocular fixed-focus pan-tilt camera 200 is located, whose size can be determined, can be determined, and each necessary spatial point is used as a static target, such as at least 4 different vertices of a cube, at least one pair of points with the largest distance on the surface of a sphere, etc. Then, each static target is traversed, and the coordinate information of each static target of the stationary object in the world coordinate system is determined through the aforementioned modules 510 to 550 of the device, and the size of the stationary object can be determined according to the coordinate information of each static target in the world coordinate system in combination with the shape of the stationary object, for example, the length, width and height of the cube can be determined according to the coordinate information of at least 4 vertices of the cube in the world coordinate system; the diameter of the sphere can be determined according to the coordinate information of a pair of points with the largest distance on the surface of the sphere in the world coordinate system.
[0128] Optionally, the device further comprises:
[0129] The seventh module 570 is used to traverse each static target within the visible range of the monocular fixed-focus gimbal camera, determine the coordinate information of each static target in the world coordinate system; and construct a three-dimensional map of the visible range of the monocular fixed-focus gimbal camera based on the coordinate information of all static targets in the world coordinate system.
[0130] In this optional embodiment, through the seventh module 570 of the device, each locatable spatial point within the visible range of the space where the monocular fixed-focus gimbal camera 200 is located can be taken as a static target, and through the aforementioned modules 510 to 550 of the device, the coordinate information of each static target within the visible range in the world coordinate system is determined, and based on the determined coordinate information of all static targets in the world coordinate system, a three-dimensional map of the visible range of the space where the monocular fixed-focus gimbal camera 200 is located is constructed.
[0131] Optionally, the device further comprises:
[0132] The eighth module 580 is used to determine the distance of the static target relative to the rotation center of the monocular fixed-focus gimbal camera based on the coordinate information of the static target in the world coordinate system.
[0133] In this optional embodiment, through the eighth module 580 of the device, the distance of the static target P relative to the gimbal rotation center O of the monocular fixed-focus gimbal camera 200 can be determined according to the coordinate information (x, y, z) of the static target P in the world coordinate system through formula (6).
[0134] In each embodiment and / or optional embodiment of the above-mentioned device, the unmentioned parts in the method steps performed by each module are the same as those in the aforementioned related method embodiments and / or optional embodiments, and will not be repeated here.
[0135] Figure 6 A system for positioning based on a monocular fixed-focus pan-tilt camera according to another aspect of the present invention is shown, wherein the system of one embodiment includes:
[0136] The calibrated monocular fixed-focus PTZ camera 200 is used to take pictures of static targets within the visible range;
[0137] The host computer 100 is used to obtain the first coordinate information and the first posture information of the camera center of the monocular fixed-focus gimbal camera in the world coordinate system corresponding to the first position, and the second coordinate information and the second posture information in the world coordinate system corresponding to the second position, and respectively obtain the first image and the second image including the static target taken at the first position and the second position; based on the image coordinate system, respectively determine the coordinate information of the static target in the first image and the second image; according to the calibration parameters of the monocular fixed-focus gimbal camera, the first coordinate information and the first posture information, the second coordinate information and the second posture information, the coordinate information of the static target in the first image and the coordinate information of the static target in the second image, respectively determine the first deflection vector and the second deflection vector from the camera center to the static target in the world coordinate system; according to the first coordinate information, the second coordinate information, the first deflection vector and the second deflection vector, determine the coordinate information of the static target in the world coordinate system.
[0138] In this embodiment, the system includes a calibrated monocular fixed-focus pan-tilt camera 200 and a host computer 100. After the monocular fixed-focus pan-tilt camera 200 is calibrated, the host computer 100 can obtain the calibration parameters of the calibrated monocular fixed-focus pan-tilt camera 200. Under different postures of the calibrated monocular fixed-focus pan-tilt camera 200, the coordinate information of the camera center in the world coordinate system is different. The calibrated monocular fixed-focus pan-tilt camera 200 can take pictures of static targets in different postures, and the host computer 100 correspondingly obtains the first coordinate information and first posture information of the camera center of the calibrated monocular fixed-focus pan-tilt camera 200 in the world coordinate system corresponding to the first position, and the second coordinate information and second posture information in the world coordinate system corresponding to the second position, and obtains the first image and the second image including the static target taken at the first position and the second position, respectively. The host computer 100 also determines the coordinate information of the static target in the first image and the second image based on the image coordinate system. The host computer 100 then determines the first deflection vector and the second deflection vector from the center of the camera to the static target in the world coordinate system according to the calibration parameters of the calibrated monocular fixed-focus gimbal camera 100, the first coordinate information and the first posture information, the second coordinate information and the second posture information, the coordinate information of the static target in the first image, and the coordinate information of the static target in the second image. Then, the host computer 100 determines the coordinate information of the static target in the world coordinate system according to the first coordinate information, the second coordinate information, the determined first deflection vector, and the second deflection vector.
[0139] Through the various embodiments and / or modules of the optional embodiments of the above-mentioned device, or the various components of the above-mentioned system embodiments, some or all of the steps of the method embodiments and / or optional embodiments can be executed, and based on a monocular fixed-focus gimbal camera, the positioning and ranging of static targets (static spatial points) within its spatial visible range can be achieved, as well as the size of stationary objects of a specific shape can be identified, and a three-dimensional map of the visible range can be constructed. Without relying on zoom and / or binocular cameras, the method is simple and efficient to implement, and is particularly suitable for indoor close-up application scenarios.
[0140] According to yet another aspect of the present invention, a computer-readable medium is provided, wherein the computer-readable medium stores computer-readable instructions, and the computer-readable instructions can be executed by a processor to implement part or all of the above method.
[0141] It should be noted that the various method embodiments of the present invention may be partially or fully implemented in software and / or a combination of software and hardware. The software program involved in the present invention may be executed by a processor to implement some or all of the steps or functions of the above-mentioned various embodiments. Similarly, the software program of the present invention (including related data structures) may be stored in a computer-readable recording medium.
[0142] In addition, part or all of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. The program instruction for calling the method of the present invention may be stored in a fixed or removable recording medium, and / or transmitted through a data stream in a broadcast or other signal-bearing medium, and / or stored in a working memory of a computer device that operates according to the program instruction.
[0143] According to another aspect of the present invention, there is provided a device for positioning based on a monocular fixed-focus gimbal camera, the device comprising: a memory for storing computer program instructions and a processor for executing the program instructions, wherein when the computer program instructions are executed by the processor, the device is triggered to execute part or all of the methods and / or technical solutions of the aforementioned embodiments and / or optional embodiments.
[0144] It is obvious to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential features of the present invention. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the present invention is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any figure mark in the claims should not be regarded as limiting the claims involved. In addition, it is obvious that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. The steps in the method claim do not necessarily limit the order of execution / implementation, and the multiple units or devices stated in the device claim can also be implemented by one unit or device through software and / or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.
Claims
1. A positioning method based on a monocular fixed-focus pan-tilt camera, characterized in that: The method comprises: Based on the calibrated monocular fixed-focus gimbal camera, determine first coordinate information and first posture information in a world coordinate system corresponding to a center of the camera at a first position, and acquire a first image including a static target at the first position; Adjust the camera posture, determine the second coordinate information and second posture information in the world coordinate system corresponding to the camera center when the camera center is at the second position, and obtain a second image including the static target at the second position; Based on the image coordinate system, determining coordinate information of the static target in the first image and the second image respectively; Determine, according to the calibration parameters of the monocular fixed-focus gimbal camera, the first coordinate information and the first posture information, the second coordinate information and the second posture information, the coordinate information of the static target in the first image, and the coordinate information of the static target in the second image, respectively, a first deflection vector and a second deflection vector from the center of the camera to the static target in the world coordinate system; The coordinate information of the static target in the world coordinate system is determined according to the first coordinate information, the second coordinate information, the first deflection vector, and the second deflection vector.
2. The method according to claim 1, characterized in that: Determining the deflection vector from the center of the camera to the static target in the world coordinate system includes: According to the calibration parameters of the monocular fixed-focus gimbal camera and the coordinate information of the static target in the image, an imaging model is used to determine the relative deflection vector from the camera center to the static target in the camera coordinate system; The deflection vector from the camera center in the world coordinate system to the static target is determined according to the coordinate information and posture information of the camera center in the world coordinate system and the relative deflection vector.
3. The method according to claim 2, characterized in that The imaging model includes a pinhole imaging model, wherein: The following formula (1) is used to determine the relative deflection vector from the camera center to the static target in the camera coordinate system: Where K is the projection matrix in the pinhole imaging model, (U, V, 1) T is the relative deflection vector from the camera center to the static target in the camera coordinate system, f x 、f y 、c x 、c y is the calibration parameter of the camera, (u,v) is the coordinate information of the static target in the image coordinate system, (u,v,1) T is the homogeneous coordinate expression of (u,v); The following formula (2) is used to determine the deflection vector from the camera center to the static target in the world coordinate system: Among them, P is the static target in the world coordinate system, C is the coordinate information of the camera center in the world coordinate system, and R is the rotation matrix of the camera coordinate system relative to the world coordinate system.
4. The method according to claim 1, characterized in that: The method further comprises: Determine a number of static targets corresponding to a stationary object within the visual range of the monocular fixed-focus gimbal camera; Each static target is traversed to determine the coordinate information of each static target in the world coordinate system, and the size of the static object is determined according to the coordinate information of each static target in the world coordinate system.
5. The method according to claim 1, characterized in that The method further comprises: Traversing each static target within the visual range of the monocular fixed-focus gimbal camera, and determining the coordinate information of each static target in the world coordinate system; A three-dimensional map of the visible range of the monocular fixed-focus gimbal camera is constructed according to the coordinate information of all static targets in the world coordinate system.
6. The method according to claim 1, characterized in that The method further comprises: Based on the coordinate information of the static target in the world coordinate system, a distance of the static target relative to the rotation center of the monocular fixed-focus gimbal camera is determined.
7. A device for positioning based on a monocular fixed-focus pan-tilt camera, characterized in that: The device comprises: The first module is used to determine, based on the calibrated monocular fixed-focus gimbal camera, first coordinate information and first posture information in a world coordinate system corresponding to a camera center at a first position, and to obtain a first image including a static target at its first position; The second module is used to adjust the camera posture, determine the second coordinate information and the second posture information in the world coordinate system corresponding to the camera center when the camera center is at the second position, and obtain a second image including the static target at its second position; A third module is used to determine the coordinate information of the static target in the first image and the second image respectively based on the image coordinate system; A fourth module is used to determine a first deflection vector and a second deflection vector from the camera center to the static target in a world coordinate system according to the calibration parameters of the monocular fixed-focus gimbal camera, the first coordinate information and the first posture information, the second coordinate information and the second posture information, the coordinate information of the static target in the first image, and the coordinate information of the static target in the second image; The fifth module is used to determine the coordinate information of the static target in the world coordinate system according to the first coordinate information, the second coordinate information, the first deflection vector and the second deflection vector.
8. The device according to claim 7, characterized in that The device also includes: The sixth module is used to determine a number of static targets corresponding to a stationary object within the visible range of the monocular fixed-focus gimbal camera; and traverse each static target, determine the coordinate information of each static target in the world coordinate system, and determine the size of the stationary object based on the coordinate information of each static target in the world coordinate system.
9. The device according to claim 7, characterized in that The device also includes: The seventh module is used to traverse each static target within the visible range of the monocular fixed-focus gimbal camera, determine the coordinate information of each static target in the world coordinate system; and construct a three-dimensional map of the visible range of the monocular fixed-focus gimbal camera based on the coordinate information of all static targets in the world coordinate system.
10. A distance measurement system, characterized in that: The system comprises: The calibrated monocular fixed-focus gimbal camera is used to take pictures of static targets within the visible range; A host computer is used to obtain first coordinate information and first posture information of the camera center of the monocular fixed-focus gimbal camera in a world coordinate system corresponding to the first position, and second coordinate information and second posture information in the world coordinate system corresponding to the second position, and respectively obtain a first image and a second image including the static target taken at the first position and the second position; based on the image coordinate system, respectively determine the coordinate information of the static target in the first image and the second image; according to the calibration parameters of the monocular fixed-focus gimbal camera, the first coordinate information and the first posture information, the second coordinate information and the second posture information, the coordinate information of the static target in the first image and the coordinate information of the static target in the second image, respectively determine a first deflection vector and a second deflection vector from the camera center to the static target in the world coordinate system; according to the first coordinate information, the second coordinate information, the first deflection vector and the second deflection vector, determine the coordinate information of the static target in the world coordinate system.
11. A computer readable medium, characterized in that Computer-readable instructions are stored thereon, and the computer-readable instructions are executed by a processor to implement part or all of the method according to any one of claims 1 to 6.
12. A device for transmitting file data, characterized in that: The device comprises: one or more processors; and A memory storing computer-readable instructions, wherein when the computer-readable instructions are executed, the processor is caused to perform part or all of the operations of the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Monocular-camera-based method for measuring depth, depth field and sizes of objects
CN102168954A
Target positioning method and system
CN112985398A
Three-dimensional space information measuring and calculating method and device
CN113240750A
White balance adjusting method and device, equipment and medium
CN116033284A