Method and apparatus for locating an object based on three points and two lines
By combining cameras and laser ranging, and utilizing gridded image processing and laser ranging, the problem of high-precision positioning under the influence of external environmental factors in visual positioning and laser scanning positioning was solved, and high-precision target object positioning was achieved.
Patent Information
- Application Number
- CN202310501353.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-06
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2043-05-06
AI Technical Summary
Existing visual positioning and laser scanning positioning methods are difficult to achieve high-precision positioning under the influence of external environmental factors, and cannot meet the positioning accuracy and real-time requirements of application scenarios such as vehicle networking and drones.
By acquiring video images from cameras at the first and second location points and processing them into a grid, calculating the coordinates of the grid intersections, and combining laser ranging and camera parameters, a combination of visual recognition and laser ranging is achieved to perform multi-directional ranging and high-precision positioning of the target object.
It improves the resistance to interference from external environmental factors, achieves high-precision target object positioning, and meets the positioning needs of application scenarios such as vehicle networking and drones.
Smart Images

Figure CN116755104B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of visual and laser positioning, and particularly to a method and device for locating objects based on three points and two lines. Background Technology
[0002] Applications such as connected vehicles, autonomous driving, intelligent manufacturing, smart logistics, and drones demand high real-time and accuracy in positioning. For example, in connected vehicle scenarios, a positioning accuracy of 30cm is required for active collision avoidance, along with ultra-low latency positioning capabilities supporting high-altitude movement. In drone scenarios, a positioning accuracy of 10-50cm is required. Existing positioning methods mainly include visual positioning and laser scanning positioning. Visual positioning uses a camera to capture images of the target object and then analyzes the images to obtain the target's position information. Laser scanning positioning projects a laser beam onto the target object and determines its position based on the reflection of the laser. Both visual and laser scanning positioning use a single method to locate the target object, and in practice, they are easily affected by external environmental factors, resulting in significant deviations in the positioning results. This fails to meet the requirements of high-precision positioning and makes them unsuitable for various application scenarios. Summary of the Invention
[0003] To address the shortcomings of existing technologies, this invention provides a method and device for object positioning based on three points and two lines. It involves capturing video images of the target object from cameras at a first and second location point, converting these images into a gridded image, and calculating the coordinates of the grid intersections to obtain the true coordinate positions of these intersections relative to the video image, thereby identifying the true coordinate position of the target object. Based on the true coordinate position of the target object, laser ranging is performed to obtain the actual distance between the target object and the first and second location points. Combined with camera calibration parameters, the world coordinates of the target object are obtained. This combination of visual recognition and laser ranging is used to locate the target object. The true coordinates of the target object are obtained through video capture for initial positioning. Laser projection is then applied to the target object to ensure accurate alignment, enabling multi-directional ranging. Finally, combined with camera capture parameters, the world coordinates of the target object are precisely calculated, effectively improving the anti-interference performance against external environmental factors and achieving high-precision positioning.
[0004] This invention provides a method for locating objects based on three points and two lines, comprising:
[0005] Video images of the target object are acquired by cameras at the first and second position points, and the video images are then processed into a grid to obtain a gridded image.
[0006] The coordinates of each grid intersection point in the gridded image are calculated to obtain the true coordinate position of each grid intersection point relative to the video image.
[0007] The true coordinates of the target object are identified. Based on the true coordinates of the target object, laser ranging is performed to obtain the first actual distance between the target object and the first location point, the second actual distance between the target object and the second location point, and the parameters for calibrating the camera.
[0008] Based on the first actual distance, the second actual distance, and the calibrated parameters of the camera, the world coordinates of the target object are obtained.
[0009] Furthermore, before acquiring video images of the target object, the following steps are also included:
[0010] Laser rangefinders are installed at both the first and second location points to obtain the geographic coordinates of the cameras at the first and second location points.
[0011] Further, the video image is subjected to gridding processing to obtain a gridded image, including:
[0012] The video image is divided into frames to obtain several video frames, and the video frames are played on the main interface screen.
[0013] Based on the video frame and the geographic coordinates of the cameras at the first and second locations, the coordinate mapping relationship between the image of the video image and the screen of the main interface screen is obtained.
[0014] The gridded image is displayed based on the coordinate mapping positional relationship.
[0015] Furthermore, based on the actual coordinates of the target object, laser ranging is performed to obtain the first actual distance between the target object and the first location point, the second actual distance between the target object and the second location point, and parameters for calibrating the camera, including:
[0016] Based on the true coordinates of the target object, the laser rangefinders at the first and second positions are adjusted so that the laser emitted by the laser rangefinder at the first and second positions intersects with the target object, thereby forming a light spot on the target object.
[0017] The laser rangefinder is used to measure the laser range of the light spot to obtain the first actual distance between the target object and the first location point, and the second actual distance between the target object and the second location point.
[0018] After adjusting the shooting direction of the camera, the parameters of the camera are calibrated; wherein, the parameters of the camera include the horizontal angle and the pitch angle of the shooting direction of the camera.
[0019] Furthermore, it also includes: performing multiple laser ranging measurements on the light spot using the laser rangefinder to obtain a first actual distance between multiple target objects and the first location point, and a second actual distance between multiple target objects and the second location point; then, based on the multiple first actual distances and the multiple second actual distances, obtaining the final determined first actual distance and second actual distance, the process of which is as follows:
[0020] Step S1: Using the formula (1) below, based on multiple first actual distances and multiple second actual distances, obtain the average and maximum floating errors of the first actual distances, as well as the average and maximum floating errors of the second actual distances.
[0021]
[0022] In the above formula (1), ΔS1 represents the average fluctuation error of the first actual distance. max This represents the maximum fluctuation error of the first actual distance; ΔS2 represents the average fluctuation error of the second actual distance. max S1(a) represents the maximum fluctuation error of the second actual distance; S1(a) represents the a-th first actual distance measured; S1(i) represents the ith first actual distance measured; S2(a) represents the a-th second actual distance measured; S2(i) represents the ith second actual distance measured; n represents the total number of first or second actual distances measured; || represents taking the absolute value. This means that, under the condition that a≠i, the values of a and i are taken from 1 to n respectively and substituted into the parentheses to obtain the maximum value inside the parentheses;
[0023] Step S2: Using the following formula (2), based on the average and maximum fluctuation errors of the first actual distance and the average and maximum fluctuation errors of the second actual distance, obtain the secondary screening values of the first and second actual distances.
[0024]
[0025] In the above formula (2), K1 represents the second screening value of the first actual distance; K2 represents the second screening value of the second actual distance; F() represents the numerical function, which is used to remove the unit from the quantity in parentheses and keep only the numerical value;
[0026] Step S3: Using formula (3) below, perform secondary control iterative filtering on multiple first actual distances and multiple second actual distances obtained from multiple measurements based on the secondary filtering values of the first and second actual distances, to obtain the final determined first and second actual distances.
[0027]
[0028] In the above formula (3), X'1(a) represents the first actual distance that is finally determined; X'2(a) represents the second actual distance that is finally determined; G[] represents the judgment function. If the formula in the parentheses is true, the function value of the judgment function is 1. If the formula in the parentheses is false, the function value of the judgment function is 0.
[0029] Furthermore, based on the first actual distance, the second actual distance, and the calibrated parameters of the camera, the world coordinates of the target object are obtained, including:
[0030] Determine the pixel offset of the light spot relative to the aiming point on the main interface screen; wherein, the aiming point is the vertex of the grid in which the target object is located in the meshed image;
[0031] Based on the pixel offset and the calibrated camera parameters, the horizontal rotation angle and horizontal tilt angle of the camera at the first position point and the second position point when the optical axis is focused on the light spot are obtained;
[0032] The world coordinates of the target object are obtained based on the first actual distance, the second actual distance, the horizontal rotation angle, and the horizontal tilt angle.
[0033] Furthermore, it also includes:
[0034] The target object is located in the real-time transmitted video image to obtain the location of the target object in the camera's shooting area, and the working status information of the camera and the laser rangefinder is determined based on the location of the target object.
[0035] Based on the aforementioned operational status information, the camera and the laser rangefinder are monitored.
[0036] Furthermore, it also includes:
[0037] Based on the replayed video images, the target object is located to obtain the world coordinates of the target object during the historical shooting process; after converting the world coordinates of the target object during the historical shooting process into three-dimensional spherical coordinates, the center coordinates and height of the light spot are calculated accordingly.
[0038] Furthermore, it also includes:
[0039] Adjust the display status of the video image on the main interface screen, and set the shooting parameters of the camera.
[0040] The present invention also provides a device for locating objects based on three points and two lines, the device comprising:
[0041] One or more processors;
[0042] A memory storing computer-readable instructions, which, when executed by the processor, implement the aforementioned method for locating objects based on three points and two lines.
[0043] The present invention also provides a computer-readable storage medium storing computer-readable instructions, which, when executed by a processor, implement the aforementioned method for locating objects based on three points and two lines.
[0044] Compared to existing technologies, this method and device for locating objects based on three points and two lines converts video images of the target object captured by cameras at the first and second position points into a gridded image, calculates the coordinates of the grid intersection points to obtain the true coordinate positions of the grid intersection points relative to the video image, and thus identifies the true coordinate position of the target object. Based on the true coordinate position of the target object, laser ranging is performed to obtain the actual distance between the target object and the first and second position points. Combined with the parameters calibrated by the cameras, the world coordinates of the target object are obtained. The target object is located by combining visual recognition and laser ranging. The true coordinates of the target object are obtained through video capture, providing initial positioning. Laser projection is then applied to the target object to ensure accurate alignment, enabling multi-directional ranging. Finally, combined with camera capture parameters, the world coordinates of the target object are precisely calculated, effectively improving the anti-interference performance against external environmental factors and achieving high-precision positioning.
[0045] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings.
[0046] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0047] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0048] Figure 1 This is a flowchart illustrating the method for locating objects based on three points and two lines provided by the present invention.
[0049] Figure 2 This is a schematic diagram of the positioning layout for the object positioning method based on three points and two lines provided by the present invention.
[0050] Figure 3 This is a schematic diagram illustrating the principle of target object coordinate calculation for the method of locating objects based on three points and two lines provided by the present invention. Detailed Implementation
[0051] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0052] See Figure 1-2 This is a flowchart and a layout diagram of a method for locating objects based on three points and two lines, provided in an embodiment of the present invention. The method for locating objects based on three points and two lines includes:
[0053] Video images of the target object are captured by cameras at the first and second position points. These video images are then processed into a grid, resulting in a gridded image. In practice, cameras are set up at the first position point B and the second position point C, which are different from the target object's position point A. The target object's position points A, B, and C are not collinear. The cameras at B and C capture images of the target object from different shooting directions, forming a three-point, two-line positioning layout. The cameras continuously capture video images of the target object. These images are then gridded by adding a square matrix grid to the entire video frame, resulting in a gridded image. This gridded image is then displayed on the main interface screen (e.g., a monitor screen) to achieve grid-based calibration of the video image. This creates grid-shaped reference lines on the video image, facilitating the calibration of the target object within the video image.
[0054] The coordinates of each grid intersection point in the gridded image are calculated to obtain the true coordinate position of each grid intersection point relative to the video image. Grid lines are laid out across the entire screen area of the gridded image, and each grid intersection point has a fixed position within the screen area of the gridded image. A Cartesian coordinate system is constructed on the screen of the gridded image to determine the true coordinate position of each grid intersection point. At the same time, the target object must be located inside a certain grid in the gridded image, that is, the target object will be surrounded by the four grid intersection points a, b, c, and d of the current grid. Based on the true coordinate positions of the target object being surrounded by the four grid intersection points a, b, c, and d of the current grid, the target object can be initially located on the video image, which facilitates accurate laser projection ranging of the target object in the subsequent process.
[0055] The system identifies the true coordinates of the target object. Based on these coordinates, laser ranging is performed to obtain the first actual distance between the target object and a first location point, the second actual distance between the target object and a second location point, and the parameters for calibrating the camera. Laser rangefinders are also installed at the first location point B and the second location point C. After identifying the true coordinates of the target object, laser projection and ranging are performed on the target object using these coordinates as a reference, ensuring the accuracy of the laser rangefinders. This yields the first actual distance between the target object and the first location point, and the second actual distance between the target object and the second location point, facilitating distance and position calibration of the target object. Simultaneously, the camera's shooting parameters are calibrated, providing reliable data for calculating the world coordinates of the target object.
[0056] Based on the first actual distance, the second actual distance, and the parameters of the calibrated camera, the world coordinates of the target object are obtained. In fact, the first actual distance and the second actual distance are also the actual distances between the camera at the first position point B and the second position point C and the target object, respectively. At this time, combined with the camera's shooting parameters of the target object, the world coordinates of the target object can be calculated.
[0057] The beneficial effects of the above technical solution are as follows: This method for locating objects based on three points and two lines converts video images of the target object captured by cameras at the first and second position points into a gridded image, calculates the coordinates of the grid intersection points to obtain the true coordinate positions of the grid intersection points relative to the video image, and thus identifies the true coordinate position of the target object; based on the true coordinate position of the target object, laser ranging is performed to obtain the actual distance between the target object and the first and second position points, and combined with the parameters calibrated by the cameras, the world coordinates of the target object are obtained. The target object is located by combining visual recognition and laser ranging. The true coordinates of the target object are obtained by video shooting, which is used to initially locate the target object. Then, laser projection is performed on the target object to ensure that the laser is accurately aligned with the target object, thereby performing multi-directional ranging of the target object; combined with the camera shooting parameters, the world coordinates of the target object are accurately calculated, effectively improving the anti-interference performance of external environmental factors and achieving high-precision positioning.
[0058] Preferably, before acquiring video images of the target object, the method further includes:
[0059] Laser rangefinders are set up at both the first and second location points to obtain the geographic coordinates of the cameras at the first and second location points.
[0060] The beneficial effects of the above technical solution are as follows: In practical operation, laser rangefinders are set up at the first location point B and the second location point C, respectively. Each laser rangefinder corresponds to one of the two cameras. After the target object is initially located visually by the cameras, laser ranging is performed to determine the actual distance between the target object and each of the two laser rangefinders, which is also the actual distance between the target object and each of the two cameras, thus achieving relative position calibration between the target object and the cameras. Furthermore, the geographical coordinates of the cameras at the first location point B and the second location point C can be determined using the built-in GPS positioning device of the laser rangefinders, facilitating subsequent transformations between the camera's coordinate system and the world coordinate system.
[0061] Preferably, the video image is subjected to gridding processing to obtain a gridded image, including:
[0062] The video image is divided into frames to obtain several video frames, and the video frames are played on the main interface screen.
[0063] Based on the video frames and the geographic coordinates of the cameras at the first and second locations, the coordinate mapping relationship between the video image and the main interface screen is obtained.
[0064] Display a gridded image based on coordinate mapping and positional relationships.
[0065] The beneficial effects of the above technical solution are as follows: The video images captured by the camera are dynamic images within a certain time range. In order to accurately visually identify and locate the target object, the video images are processed into frames to obtain several video frames. Each video frame corresponds to the visual state of the target object at different shooting times. At the same time, all video frames are transmitted to the display so that the main interface screen of the display plays the video frames. Then, using the video frames undulating on the main interface screen, and the geographical coordinate positions of the camera at the first position point B and the second position point C as a reference, the coordinate mapping positional relationship between the image frame of the video image and the screen frame of the main interface screen is determined. This allows us to obtain the coordinate transformation correspondence between the image frame and the screen frame, thereby ensuring the accuracy of the subsequent display of the gridded image.
[0066] Preferably, laser ranging is performed based on the actual coordinates of the target object to obtain the first actual distance between the target object and the first position point, the second actual distance between the target object and the second position point, and the parameters for calibrating the camera, including:
[0067] Based on the true coordinates of the target object, the laser rangefinders at the first and second positions are adjusted so that the laser emitted by the laser rangefinder at the first position and the laser emitted by the laser rangefinder at the second position intersect at the target object, thereby forming a light spot on the target object.
[0068] The laser rangefinder is used to measure the laser range of the light spot to obtain the first actual distance between the target object and the first position point, and the second actual distance between the target object and the second position point.
[0069] After adjusting the camera's shooting direction, calibrate the camera's parameters, including the horizontal angle and pitch angle of the camera's shooting direction.
[0070] The beneficial effects of the above technical solution are as follows: After obtaining the gridded image, the target object A in the gridded image is identified. The positioning of the main interface screen is calculated using the metadata fingerprint positioning algorithm based on the grid. Combined with the actual coordinates of the target object A, the actual distances between the target object A and the first position point B and the second position point C, i.e., distances AB and AC, are obtained. Simultaneously, shooting parameters such as the horizontal and vertical angles of the camera during the shooting process of the target object A can also be obtained, thereby calibrating the camera's shooting state. Specifically, the metadata fingerprint positioning algorithm uses image processing algorithms to divide the gridded image, recording the coordinates at the intersection of each grid. A circle represents the metadata of a certain positioning position. All grid intersections have corresponding coordinates, and a set of corresponding feature quantities about each metadata can be received at each coordinate. These feature quantities are equivalent to multiple texture features on a fingerprint. Based on the feature quantities, the position of the located grid intersection is determined.
[0071] Preferably, the method further includes: performing multiple laser ranging measurements on the light spot using the laser rangefinder to obtain multiple first actual distances between the target object and the first location point, and multiple second actual distances between the target object and the second location point; then, based on the multiple first actual distances and multiple second actual distances, obtaining the final determined first actual distance and second actual distance, the process of which is as follows:
[0072] Step S1: Using the formula (1) below, based on multiple first actual distances and multiple second actual distances, obtain the average and maximum floating errors of the first actual distances, as well as the average and maximum floating errors of the second actual distances.
[0073]
[0074] In the above formula (1), ΔS1 represents the average fluctuation error of the first actual distance. max This represents the maximum fluctuation error of the first actual distance; ΔS2 represents the average fluctuation error of the second actual distance. max S1(a) represents the maximum fluctuation error of the second actual distance; S1(a) represents the a-th first actual distance measured; S1(i) represents the ith first actual distance measured; S2(a) represents the a-th second actual distance measured; S2(i) represents the ith second actual distance measured; n represents the total number of first or second actual distances measured; || represents taking the absolute value. This means that, under the condition that a≠i, the values of a and i are taken from 1 to n respectively and substituted into the parentheses to obtain the maximum value inside the parentheses;
[0075] Step S2: Using the following formula (2), based on the average and maximum fluctuation errors of the first actual distance and the average and maximum fluctuation errors of the second actual distance, obtain the secondary screening values of the first and second actual distances.
[0076]
[0077] In the above formula (2), K1 represents the second screening value of the first actual distance; K2 represents the second screening value of the second actual distance; F() represents the numerical function, which is used to remove the unit from the quantity in parentheses and keep only the numerical value;
[0078] Step S3: Using formula (3) below, perform secondary control iterative filtering on multiple first actual distances and multiple second actual distances obtained from multiple measurements based on the secondary filtering values of the first and second actual distances, to obtain the final determined first and second actual distances.
[0079]
[0080] In the above formula (3), X'1(a) represents the first actual distance that is finally determined; X'2(a) represents the second actual distance that is finally determined; G[] represents the judgment function. If the formula in the parentheses is true, the function value of the judgment function is 1. If the formula in the parentheses is false, the function value of the judgment function is 0.
[0081] The beneficial effects of the above technical solution are as follows: Using the above formula (1), based on multiple first actual distances and multiple second actual distances, the average and maximum floating errors of the first actual distances, as well as the average and maximum floating errors of the second actual distances, are obtained, thereby knowing the specific fluctuation details in the measurement process, thus providing a basis for subsequent optimization; then using the above formula (2), based on the average and maximum floating errors of the first actual distances and the average and maximum floating errors of the second actual distances, the secondary screening values of the first and second actual distances are obtained, thereby controlling the reliability of subsequent distance value screening; finally using the above formula (3), based on the secondary screening values of the first and second actual distances, the multiple first actual distances and multiple second actual distances obtained from multiple measurements are subjected to secondary control iterative screening to obtain the final determined first and second actual distances, thereby ensuring that the obtained distance value error is more accurate and ensuring the accuracy of the system.
[0082] Preferably, the world coordinates of the target object are obtained based on the first actual distance, the second actual distance, and the parameters of the calibrated camera, including:
[0083] Determine the pixel offset of the light spot relative to the aiming point on the main interface screen; where the aiming point is the vertex of the grid where the target object is located in the meshed image;
[0084] Based on the pixel offset and the calibrated camera parameters, the horizontal rotation angle and horizontal tilt angle of the camera at the first and second position points when the optical axis is focused on the light spot are obtained;
[0085] The world coordinates of the target object are obtained based on the first actual distance, the second actual distance, the horizontal rotation angle, and the horizontal tilt angle.
[0086] The beneficial effects of the above technical solution are as follows: When the laser rangefinder at the first position point B and the second position point C projects a laser beam onto the target object A and forms a light spot, the corresponding light spot will also appear in the video image captured by the camera. When the main interface screen plays video frames, the main interface screen will also display the corresponding light spot. At this time, determining the pixel offset of the light spot relative to the aiming point on the main interface screen allows for visual calibration of the laser rangefinder's laser ranging of the target object A. Based on the pixel offset and the calibrated camera parameters, the horizontal rotation angle and horizontal tilt angle of the camera at the first and second position points when the optical axis is focused on the light spot are obtained, thereby determining the camera's shooting state information for the light spot. At this time, the world coordinates of the target object can be obtained by triangulating the first actual distance, the second actual distance, the horizontal rotation angle, and the horizontal tilt angle. For details, please refer to [link to relevant documentation]. Figure 3 This diagram illustrates the principle of calculating the target object coordinates using the three-point, two-line object positioning method provided by this invention. Taking ABC as an example of objects on the same horizontal plane, points D and E are known to be cameras. DC = EB = H, representing the camera's height. AE = AD = I, representing the actual distance measured by infrared laser ranging. DE = BC, representing the distance between cameras. ∠ACD and ∠ABE are right angles on the camera poles. ∠ADE = ∠ACB and ∠AED = ∠ABC are the camera's horizontal angles. ∠ADC and ∠AEB are the camera's pitch angles. Since AC = I * cos(90 - ∠ADC), AO = AC * cos(90 - ∠ACB), thus calculating the world coordinates of the target object A. Furthermore, camera calibration includes the calibration of both external and internal camera parameters. The camera coordinate system has a one-to-one relationship with the world coordinate system, which can be converted using the camera's external parameters. The camera coordinate system has a many-to-one relationship with the image coordinate system, and the image coordinate system has a one-to-one relationship with the pixel coordinate system, which can also be converted using the camera's internal parameters. The camera coordinate system is derived from the installation position relationship between the laser rangefinder and the camera, as well as the laser rangefinder's planar coordinate system. The world coordinate system describes the position of any object in the actual environment. The camera coordinate system has its origin at the camera's optical center, with the z-axis coinciding with the optical axis, and the positive directions of the x and y axes parallel to the object coordinate system. The image coordinate system uses physical units to represent the pixel position, with its origin at the intersection of the camera's optical axis and the image's physical coordinate system. The pixel coordinate system uses pixels as its unit, with its origin at the upper left corner.
[0087] Preferably, the method for locating objects based on three points and two lines further includes:
[0088] The system locates the target object in the real-time video images, obtains the location of the target object in the camera's shooting area, and determines the working status information of the camera and laser rangefinder based on the location of the target object.
[0089] Based on operational status information, the cameras and laser rangefinders are monitored.
[0090] The beneficial effects of the above technical solution are as follows: real-time video images are used to locate the target object, so that when the target object is in motion, the target object can be tracked in real time. This ensures that when the position of the target object changes, the shooting direction of the camera and the laser projection direction of the laser rangefinder can be adjusted in time to accurately track and locate the target object.
[0091] Preferably, the method for locating objects based on three points and two lines further includes:
[0092] Based on the replayed video images, the target object is located to obtain the world coordinates of the target object during the historical shooting process; after converting the world coordinates of the target object during the historical shooting process into three-dimensional spherical coordinates, the center coordinates and height of the light spot are calculated.
[0093] The beneficial effects of the above technical solution are as follows: In practical applications, based on the played-out video images, AI algorithms can be used to analyze and calculate the video images played back to obtain the world coordinates of the target object during the historical shooting process; after converting the world coordinates of the target object during the historical shooting process into three-dimensional spherical coordinates, the center coordinates and height of the light spot can be calculated, which is convenient to meet the needs of tracking the height position information of the target object in special scenarios.
[0094] Preferably, the method for locating objects based on three points and two lines further includes:
[0095] Adjust the display status of the video image on the main interface screen, and set the camera's shooting parameters.
[0096] The beneficial effects of the above technical solution are: in practical applications, the display status of video images on the main interface screen can be adjusted, and the shooting parameters of the camera can be set to ensure adaptive adjustment for different positioning scenarios.
[0097] In another embodiment of this application, a device for locating objects based on three points and two lines is also provided, comprising:
[0098] One or more processors;
[0099] A memory storing computer-readable instructions, which, when executed by the processor, implement the aforementioned method for locating objects based on three points and two lines.
[0100] The working process and effect of the above-mentioned device are the same as those of the aforementioned method for locating objects based on three points and two lines, and will not be repeated here.
[0101] In another embodiment of this application, a computer-readable storage medium is also provided, which stores computer-readable instructions that, when executed by a processor, implement the aforementioned method for locating objects based on three points and two lines.
[0102] In a typical configuration of this application, the terminal, the device of the service network, and the trusted party all include one or more processors (e.g., a central processing unit (CPU)), input / output interfaces, network interfaces, and memory.
[0103] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0104] Computer-readable media, including both permanent and non-permanent, removable and non-removable media, can store information using any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change RAM (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 technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device. As defined in this article, computer-readable media do not include non-transitory computer-readable media, such as modulated data signals and carrier waves.
[0105] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A method for locating objects based on three points and two lines, characterized in that, include: Video images of the target object are acquired by cameras at the first and second position points, and the video images are then processed into a grid to obtain a gridded image. The coordinates of each grid intersection point in the gridded image are calculated to obtain the true coordinate position of each grid intersection point relative to the video image. The true coordinates of the target object are identified. Based on the true coordinates of the target object, laser ranging is performed to obtain the first actual distance between the target object and the first location point, the second actual distance between the target object and the second location point, and the parameters for calibrating the camera. Based on the first actual distance, the second actual distance, and the calibrated parameters of the camera, the world coordinates of the target object are obtained.
2. The method for locating objects based on three points and two lines as described in claim 1, characterized in that: Before acquiring video images of the target object, the following steps are also included: Laser rangefinders are installed at both the first and second location points to obtain the geographic coordinates of the cameras at the first and second location points.
3. The method for locating objects based on three points and two lines as described in claim 2, characterized in that: The video image is subjected to meshing processing to obtain a meshed image, including: The video image is divided into frames to obtain several video frames, and the video frames are played on the main interface screen. Based on the video frame and the geographic coordinates of the cameras at the first and second locations, the coordinate mapping relationship between the image of the video image and the screen of the main interface screen is obtained. The gridded image is displayed based on the coordinate mapping positional relationship.
4. The method for locating objects based on three points and two lines as described in claim 3, characterized in that: Based on the actual coordinates of the target object, laser ranging is performed to obtain the first actual distance between the target object and the first location point, the second actual distance between the target object and the second location point, and parameters for calibrating the camera, including: Based on the true coordinates of the target object, the laser rangefinders at the first and second positions are adjusted so that the laser emitted by the laser rangefinder at the first and second positions intersects with the target object, thereby forming a light spot on the target object. The laser rangefinder is used to measure the laser range of the light spot to obtain the first actual distance between the target object and the first location point, and the second actual distance between the target object and the second location point. After adjusting the shooting direction of the camera, the parameters of the camera are calibrated; wherein, the parameters of the camera include the horizontal angle and the pitch angle of the shooting direction of the camera.
5. The method for locating an object based on three points and two lines as described in claim 4, characterized in that: It also includes: performing multiple laser ranging measurements on the light spot using the laser rangefinder to obtain the first actual distances between multiple target objects and the first location point, and the second actual distances between multiple target objects and the second location point; then, based on the multiple first actual distances and the multiple second actual distances, obtaining the final determined first actual distance and second actual distance, the process of which is as follows: Step S1: Using the formula (1) below, based on multiple first actual distances and multiple second actual distances, obtain the average and maximum floating errors of the first actual distances, as well as the average and maximum floating errors of the second actual distances. In the above formula (1), ΔS1 represents the average fluctuation error of the first actual distance. max This represents the maximum fluctuation error of the first actual distance; ΔS2 represents the average fluctuation error of the second actual distance. max S1(a) represents the maximum fluctuation error of the second actual distance; S1(a) represents the a-th first actual distance measured; S1(i) represents the ith first actual distance measured; S2(a) represents the a-th second actual distance measured; S2(i) represents the ith second actual distance measured; n represents the total number of first or second actual distances measured; || represents taking the absolute value. This means that, under the condition that a≠i, the values of a and i are taken from 1 to n respectively and substituted into the parentheses to obtain the maximum value inside the parentheses; Step S2: Using the following formula (2), based on the average and maximum fluctuation errors of the first actual distance and the average and maximum fluctuation errors of the second actual distance, obtain the secondary screening values of the first and second actual distances. In the above formula (2), K1 represents the second screening value of the first actual distance; K2 represents the second screening value of the second actual distance; F() represents the numerical function, which is used to remove the unit from the quantity in parentheses and keep only the numerical value; Step S3: Using formula (3) below, perform secondary control iterative filtering on multiple first actual distances and multiple second actual distances obtained from multiple measurements based on the secondary filtering values of the first and second actual distances, to obtain the final determined first and second actual distances. In the above formula (3), X'1(a) represents the first actual distance that is finally determined; X'2(a) represents the second actual distance that is finally determined; G represents the judgment function. If the formula in the parentheses is true, the function value of the judgment function is 1; if the formula in the parentheses is false, the function value of the judgment function is 0.
6. The method for locating an object based on three points and two lines as described in claim 4, characterized in that: Based on the first actual distance, the second actual distance, and the calibrated parameters of the camera, the world coordinates of the target object are obtained, including: Determine the pixel offset of the light spot relative to the aiming point on the main interface screen; wherein, the aiming point is the vertex of the grid in which the target object is located in the meshed image; Based on the pixel offset and the calibrated camera parameters, the horizontal rotation angle and horizontal tilt angle of the camera at the first position point and the second position point when the optical axis is focused on the light spot are obtained; The world coordinates of the target object are obtained based on the first actual distance, the second actual distance, the horizontal rotation angle, and the horizontal tilt angle.
7. The method for locating an object based on three points and two lines as described in claim 4, characterized in that: Also includes: The target object is located in the real-time transmitted video image to obtain the location of the target object in the camera's shooting area, and the working status information of the camera and the laser rangefinder is determined based on the location of the target object. Based on the aforementioned operational status information, the camera and the laser rangefinder are monitored.
8. The method for locating an object based on three points and two lines as described in claim 4, characterized in that: Also includes: Based on the replayed video images, the target object is located to obtain the world coordinates of the target object during the historical shooting process; after converting the world coordinates of the target object during the historical shooting process into three-dimensional spherical coordinates, the center coordinates and height of the light spot are calculated accordingly.
9. The method for locating an object based on three points and two lines as described in claim 1, characterized in that: Also includes: Adjust the display status of the video image on the main interface screen, and set the shooting parameters of the camera.
10. A device for locating objects based on three points and two lines, characterized in that, The device includes: One or more processors; A memory storing computer-readable instructions that, when executed by the processor, implement the method as described in any one of claims 1-8.
Citation Information
Patent Citations
Locating method of central precise grid of vacuum laser facula
CN102072724A
Target tracking method and device
CN110636248A