Target positioning method and device, electronic equipment and storage medium

Through the collaborative work of multiple cameras and the use of weighted calculation and distance correction technology, the problem of low target positioning robustness in the existing technology is solved, and accurate target positioning under multiple viewing angles and occlusions is achieved.

CN118799387APending Publication Date: 2024-10-18CHINA MOBILEHANGZHOUINFORMATION TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410219718.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-02-28
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

The target positioning methods in the existing technology have low robustness, especially when the field of view of a single camera is limited or there is occlusion, it is difficult to accurately track and locate the target object.

Method used

By obtaining the horizontal distance, shooting duration and external parameters of the target object at multiple camera angles, a weighted calculation is performed to determine the spatial position of the target object, and the multi-view joint detection and distance measurement prediction model is used to correct the straight-line distance and improve the robustness of positioning. sex and accuracy.

Benefits of technology

The target object can still be tracked and positioned even when the field of view of a single camera is limited or blocked, which improves the robustness of the target positioning method and enhances the accuracy of positioning through multi-view fusion and shooting duration weight calculation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118799387A_ABST
    Figure CN118799387A_ABST
Patent Text Reader

Abstract

The invention relates to the field of computer vision, and provides a target positioning method and device, electronic equipment and a storage medium. The method comprises the steps that horizontal distances of a target object at angles of multiple cameras, shooting durations corresponding to the cameras and external parameters of the cameras are acquired, the horizontal distances are distances between the target object and the cameras, and the horizontal distances corresponding to the cameras are determined based on images shot by the cameras respectively; the shooting duration is the duration of continuously tracking and shooting the target object by the camera; and based on each horizontal distance, each shooting duration and each external parameter, carrying out weighted calculation to obtain the spatial position of the target object. According to the target positioning method, the target object under multiple visual angles is detected in a combined mode, when the visual field of a single camera is limited, if shielding exists, tracking and positioning can still be conducted based on other cameras, the robustness of the target positioning method is improved, the target object is positioned based on the positions of the target object in the multiple cameras, and the accuracy of monitoring and positioning is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer vision technology, and in particular to a target positioning method, device, electronic device and storage medium. Background Art

[0002] With the development of social economy and the acceleration of urbanization, the three-dimensional spatial positioning technology of personnel, vehicles and facilities based on surveillance cameras has a wide range of application needs in various aspects, such as public safety, traffic management, smart parking, smart logistics, smart buildings, emergency rescue, etc. This technology can realize the accurate identification, positioning, tracking and management of personnel, vehicles, facilities and other targets in the monitoring area, provide effective technical support for smart security and smart cities, improve monitoring efficiency and effectiveness, reduce operating costs and risks, and improve urban management level and service quality.

[0003] At present, computer vision methods are usually used to calculate the position, direction, posture and size of the target object in three-dimensional space by analyzing the image information collected by the camera. However, using only a single camera to estimate the three-dimensional space position coordinates has a limited single-view field of view, which will cause tracking and positioning errors when there is occlusion.

[0004] Therefore, how to improve the robustness of target positioning methods has become a technical problem that needs to be solved urgently. Summary of the invention

[0005] The present invention provides a target positioning method, device, electronic equipment and storage medium, which are used to solve the technical problem of low robustness of the target positioning method in the prior art.

[0006] The present invention provides a target positioning method, comprising:

[0007] Acquire the horizontal distance of the target object at the angles of multiple cameras, the shooting duration corresponding to each camera, and the external parameter parameters of each camera, wherein the horizontal distance is the distance between the target object and the camera, the horizontal distance corresponding to each camera is determined based on the images captured by each camera, and the shooting duration is the duration for the camera to continuously track and capture the target object;

[0008] Based on the horizontal distances, the shooting durations and the external parameters, a weighted calculation is performed to obtain the spatial position of the target object.

[0009] According to a target positioning method provided by the present invention, the spatial position of the target object is obtained by performing weighted calculation based on the horizontal distances, the shooting durations and the external parameters, including:

[0010] Based on the position prediction step, respectively determining the predicted position corresponding to each of the cameras;

[0011] Performing weighted calculation based on each predicted position and each shooting duration to obtain the spatial position of the target object;

[0012] The position prediction step comprises:

[0013] The predicted position corresponding to the camera is determined based on the horizontal distance, the extrinsic parameters, and the angle of the camera, wherein the angle is the angle between the target object and the camera.

[0014] According to a target positioning method provided by the present invention, when the number of the cameras is two, the predicted position corresponding to each of the cameras is calculated based on the following formula:

[0015]

[0016]

[0017] in, represents the predicted position corresponding to the first camera, (x cam1 ,y cam1 ) represents the coordinates of the installation position of the first camera, distance cam1 represents the horizontal distance of the first camera, represents the angle of the first camera, α cam1 represents the horizontal rotation angle of the first camera, represents the predicted position corresponding to the second camera, (x cam2 ,y cam ) represents the coordinates of the installation position of the second camera, distance cam2 represents the horizontal distance of the second camera, represents the angle of the second camera, α cam Indicates the horizontal rotation angle of the second camera.

[0018] According to a target positioning method provided by the present invention, the weight of the predicted position corresponding to the camera is determined based on the following steps:

[0019] Determining a weight of a predicted position corresponding to the camera based on a ratio of the shooting time of the camera to the total shooting time;

[0020] The total shooting duration is the sum of the shooting durations.

[0021] According to a target positioning method provided by the present invention, before obtaining pixel position information, horizontal distance, and shooting time corresponding to each camera of the target object at multiple camera angles, the method further includes:

[0022] Comparing and matching the images captured by the cameras, and identifying the target objects matched as the same target with the same identification information;

[0023] Based on the images captured by each of the cameras, determining the straight-line distance between the target object and each of the cameras;

[0024] The horizontal distance between the cameras is determined based on the linear distances.

[0025] According to a target positioning method provided by the present invention, determining the straight-line distance between the target object and each of the cameras based on the images captured by each of the cameras includes:

[0026] Inputting the images collected by each of the cameras into a distance metric prediction model respectively to obtain a predicted distance outputted by the distance metric prediction model;

[0027] Based on the distance estimation deviation value corresponding to each of the cameras, each of the predicted distances is corrected to obtain each of the straight-line distances.

[0028] The present invention also provides a target positioning device, comprising:

[0029] An acquisition module is used to: acquire the horizontal distance of the target object at the angles of multiple cameras, the shooting duration corresponding to each of the cameras, and the external parameter parameters of each of the cameras, wherein the horizontal distance is the distance between the target object and the camera, the horizontal distance corresponding to each of the cameras is determined based on the images captured by each of the cameras, and the shooting duration is the duration for the camera to continuously track and capture the target object;

[0030] The calculation module is used to perform weighted calculation based on the horizontal distances, the shooting durations and the external parameters to obtain the spatial position of the target object.

[0031] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the target positioning methods described above is implemented.

[0032] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the target positioning method described in any one of the above is implemented.

[0033] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the target positioning methods described above.

[0034] The target positioning method, device, electronic device and storage medium provided by the present invention obtain the horizontal distance of the target object under the angles of multiple cameras, the shooting time corresponding to each of the cameras, and the external parameter parameters of each of the cameras, wherein the horizontal distance is the distance between the target object and the camera, the horizontal distance corresponding to each of the cameras is determined based on the images captured by each of the cameras, and the shooting time is the time for the camera to continuously track and shoot the target object; based on each of the horizontal distances, each of the shooting time and each of the external parameter parameters, weighted calculation is performed to obtain the spatial position of the target object. Target positioning is performed based on the perspectives of multiple cameras, and the target objects under multiple perspectives are jointly detected. On the one hand, when the field of view of a single camera is limited, if there is occlusion, tracking and positioning can still be performed based on other cameras, thereby improving the robustness of the target positioning method. On the other hand, the target object is positioned based on the position of the target object in multiple cameras, thereby improving the accuracy of monitoring positioning. In addition, the longer the shooting time of the camera, the higher its reliability. The spatial position of the target object is calculated according to the shooting time of each camera, thereby further improving the accuracy of the target object positioning. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the technical solutions in the present application or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0036] Figure 1 It is a flow chart of the target positioning method provided by the present invention;

[0037] Figure 2 It is a schematic diagram of the structure of the distance metric prediction model provided by the present invention;

[0038] Figure 3 It is a schematic diagram of the horizontal distance of a target object under a single camera provided by the present invention;

[0039] Figure 4 is a schematic diagram of multi-view joint positioning provided by the present invention;

[0040] Figure 5 It is a structural schematic diagram of the target positioning system provided by the present invention;

[0041] Figure 6 This is a schematic diagram of the structure of the target positioning device provided by the present invention.

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

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

[0044] With the development of social economy and the acceleration of urbanization, the three-dimensional spatial positioning technology of personnel, vehicles and facilities based on surveillance cameras has a wide range of application needs in various aspects, such as public safety, traffic management, smart parking, smart logistics, smart buildings, emergency rescue, etc. This technology can realize the accurate identification, positioning, tracking and management of personnel, vehicles, facilities and other targets in the monitoring area, provide effective technical support for smart security and smart cities, improve monitoring efficiency and effectiveness, reduce operating costs and risks, and improve urban management level and service quality.

[0045] The main principle of the three-dimensional spatial positioning technology for personnel and vehicles based on surveillance cameras is to use computer vision methods to calculate the position, direction, posture and size of the target object in three-dimensional space by analyzing the image information collected by the camera. As the commercial value of three-dimensional spatial positioning technology becomes increasingly apparent, various measurement equipment and services are also emerging to provide users with more diverse and personalized choices. At the same time, countries and regions are actively developing independent monitoring systems and data platforms to improve their national security and international competitiveness. Compared with the measurement and positioning methods based on hardware equipment such as millimeter-wave radar and lidar, the visual positioning solution based on surveillance cameras is more suitable for small-scale scenarios such as communities and parks in terms of cost and ease of deployment.

[0046] The existing technical solutions for spatial position positioning of objects based on surveillance cameras still have some defects. For example, when there is overlap in the camera's field of view, data fusion processing is not performed, which limits the usage scenarios. Moreover, when converting pixel coordinates to physical world coordinates, each camera needs to be calibrated, which is a relatively cumbersome process. In addition, the positioning target objects are mostly applicable to the human body, without considering other common target objects in outdoor scenes in parks and communities.

[0047] In view of the above problems, the present invention provides the following embodiments. Figure 1 Schematic diagram of the target positioning method provided by the present invention. Figure 1 , the present application embodiment provides a target positioning method, which may include:

[0048] S110, obtaining the horizontal distance of the target object at the angles of multiple cameras, the shooting time corresponding to each camera, and the extrinsic parameters of each camera.

[0049] In the embodiment of the present invention, the target positioning method may be executed by a target positioning device, which may include but is not limited to: a server, a desktop computer, a laptop computer, a tablet computer, a mobile phone, etc. The target positioning method may also be executed by a target positioning system, which belongs to the target positioning device.

[0050] Here, the target object may include but is not limited to pedestrians and vehicles.

[0051] Here, the horizontal distance is the distance between the target object and the camera, the horizontal distance corresponding to each camera is determined based on the image captured by each camera, and the shooting duration is the duration for the camera to continuously track and capture the target object.

[0052] Figure 3 is a schematic diagram of the horizontal distance of a target object under a single camera provided by the present invention, such as Figure 3 As shown, distance represents the horizontal distance between the target object and the camera 1. As the target object moves from left to right, the horizontal distance gradually increases.

[0053] It should be understood that the horizontal distance is the horizontal distance between the target object and the camera, which is calculated and determined based on the image captured by the camera; the multiple horizontal distances obtained are the horizontal distances of the target object at the angles of multiple cameras at the same time.

[0054] Here, the extrinsic parameters of the camera are parameters that describe the camera position, direction, and viewing angle, and are used to convert world coordinates into camera coordinates, including, for example, the angle of the camera.

[0055] S120, performing weighted calculation based on each of the horizontal distances, each of the shooting durations, and each of the external parameters to obtain the spatial position of the target object.

[0056] Specifically, since the position coordinates of the camera are fixed, the position of the target object relative to the camera can be determined based on the horizontal distance and extrinsic parameters, and then the position of the target object can be determined; for each camera, the predicted position of the target object is calculated based on the corresponding horizontal distance and extrinsic parameters, and then the predicted position calculated by each camera is weighted according to the shooting time of each camera to finally determine the spatial position of the target object.

[0057] It is understandable that the longer the camera's shooting time is, the higher its reliability is, and it can be considered that the predicted position calculated by it is more accurate. Therefore, the longer the camera's shooting time is, the greater the weight of the predicted position calculated by it is.

[0058] The target positioning method provided in the embodiment of the present application obtains the horizontal distance of the target object under the angles of multiple cameras, the shooting time corresponding to each of the cameras, and the external parameter parameters of each of the cameras, wherein the horizontal distance is the distance between the target object and the camera, the horizontal distance corresponding to each of the cameras is determined based on the images captured by each of the cameras, and the shooting time is the time for the camera to continuously track and shoot the target object; based on each of the horizontal distances, each of the shooting time and each of the external parameter parameters, a weighted calculation is performed to obtain the spatial position of the target object. Target positioning is performed based on the perspectives of multiple cameras, and the target objects under multiple perspectives are jointly detected. On the one hand, when the field of view of a single camera is limited, if there is occlusion, tracking and positioning can still be performed based on other cameras, thereby improving the robustness of the target positioning method. On the other hand, the target object is positioned based on the position of the target object in multiple cameras, thereby improving the accuracy of monitoring positioning. In addition, the longer the shooting time of the camera, the higher its reliability. The spatial position of the target object is calculated based on the shooting time of each camera, thereby further improving the accuracy of the target object positioning.

[0059] In an optional embodiment, performing weighted calculation based on each of the horizontal distances, each of the shooting durations, and each of the external parameters to obtain the spatial position of the target object includes:

[0060] Based on the position prediction step, respectively determining the predicted position corresponding to each of the cameras;

[0061] Performing weighted calculation based on each predicted position and each shooting duration to obtain the spatial position of the target object;

[0062] The position prediction step comprises:

[0063] The predicted position corresponding to the camera is determined based on the horizontal distance, the extrinsic parameters, and the angle of the camera, wherein the angle is the angle between the target object and the camera.

[0064] Specifically, based on the horizontal distance of a camera, external parameters, and the angle between the target object and the camera, the predicted position of the target object from the perspective of the camera can be determined; the predicted position of each camera is weighted according to the shooting time, and finally the spatial position of the target object is determined.

[0065] Here, the predicted position refers to the position information of the target object calculated based on the image captured by the camera; the spatial position refers to the position information of the target object finally determined; both are usually expressed in coordinates.

[0066] The target positioning method provided in the embodiment of the present application performs a weighted joint determination on the spatial position of the same target object at different camera angles in combination with the target object's residence time and the distance from each camera, calculates and corrects the three-dimensional spatial coordinates of the target object, and reduces the jitter of the spatial position coordinates in the case of cross-camera multi-viewing angles.

[0067] Furthermore, when the number of the cameras is two, the predicted position corresponding to each camera is calculated based on the following formula:

[0068]

[0069]

[0070] in, represents the predicted position corresponding to the first camera, (x cam1 ,y cam1 ) represents the coordinates of the installation position of the first camera, distance cam1 represents the horizontal distance of the first camera, represents the angle of the first camera, α cam1 represents the horizontal rotation angle of the first camera, represents the predicted position corresponding to the second camera, (x cam2 ,y cam2 ) represents the coordinates of the installation position of the second camera, distance cam2 represents the horizontal distance of the second camera, represents the angle of the second camera, α cam2 Indicates the horizontal rotation angle of the second camera.

[0071] Understandably,

[0072] Figure 4 is a schematic diagram of multi-view joint positioning provided by the present invention, such as Figure 4 As shown, L cam1 and L cam2 Represents the external parameters of camera 1 and camera 2:

[0073] L cam1 =(x cam1 ,y cam1 , α cam1 ,ω cam1 ,h cam1 );

[0074] L cam2 =(x cam2 ,y cam2 , α cam2 ,ωcam2 ,h cam2 );

[0075] Among them, (x cam1 ,y cam1 ) is the installation position coordinate of camera 1, (x cam2 ,y cam2 ) is the installation position coordinate of camera 2, α cam1 is the horizontal rotation angle of camera 1, that is, the angle between the center line of camera 1 and the horizontal line, α cam2 is the horizontal rotation angle of camera 2, ω cam1 is the vertical pitch angle of camera 1, ω cam2 is the vertical pitch angle of camera 2, h cam1 is the installation height of camera 1, h cam2 is the installation height of camera 2;

[0076] Represents the difference between the horizontal coordinates of the target object and camera 1. Camera 1 is located on the left side of the target object. The upper left corner is taken as the coordinate origin. The horizontal coordinate of the target object is the sum of the horizontal coordinate of camera 1 and the difference between the above horizontal coordinates. represents the difference between the ordinates of the target object and camera 1. Camera 1 is located below the target object, with the upper left corner as the origin of the coordinates. The ordinate of the target object is the difference between the ordinate of camera 1 and the above ordinate difference.

[0077] represents the difference between the horizontal coordinates of the target object and camera 2. Camera 2 is located on the right side of the target object. The upper left corner is taken as the origin of the coordinates. The horizontal coordinate of the target object is the difference between the horizontal coordinate of camera 2 and the above horizontal coordinate difference. It represents the difference between the ordinates of the target object and camera 2. Camera 2 is located below the target object, with the upper left corner as the origin of the coordinates. The ordinate of the target object is the difference between the ordinate of camera 2 and the above ordinate difference.

[0078] Optionally, the angle of camera 1 is calculated based on the following formula:

[0079]

[0080] in, represents the angle of camera 1, x1 represents the pixel-level horizontal coordinate of the target object in camera 1, a represents the pixel resolution value of the longest side of camera 1, and Φ represents the horizontal field of view of camera 1.

[0081] In an optional embodiment, the weight of the predicted position corresponding to the camera is determined based on the following steps:

[0082] Determining a weight of a predicted position corresponding to the camera based on a ratio of the shooting time of the camera to the total shooting time;

[0083] The total shooting duration is the sum of the shooting durations.

[0084] Taking the above two cameras as an example, the weight of the predicted position of camera 1 is The weight of the predicted position of camera 2 Among them, τ1 and τ2 are the shooting durations of camera 1 and camera 2 respectively;

[0085] Substituting into the calculation, we can get the final spatial position of the target object

[0086] The target positioning method provided in the embodiment of the present application calculates and corrects the three-dimensional spatial coordinates of the target object based on the spatial position of the camera, the posture orientation of the target object, the dwell time and the relative position with the camera, thereby reducing the jitter of the spatial position coordinates in the case of cross-camera multi-viewing angles.

[0087] To further improve the accuracy of target positioning, in an optional embodiment, the spatial position of the target object is calculated by the following formula:

[0088]

[0089] in, represents the predicted position of camera 1 at time t, represents the predicted position of camera 2 at time t, represents the predicted position of the target object by the camera closest to the target object at time t-1, Indicates the predicted position of the target object by the camera closest to the target object at time t-2, loc t Represents the final spatial position of the target object at time t.

[0090] Here, time t and time t-1 may be separated by a preset time interval, such as 1 ms, or may be separated by a preset number of image frames, such as 2 frames, and there is no limitation here.

[0091] It can be understood that the above embodiment combines the predicted positions at two moments t-1 and t-2 to determine the spatial position of the target object. In actual application, the predicted positions at more moments can be combined to determine the spatial position of the target object. Taking two cameras as an example, the predicted position at moment t is combined with the predicted positions at n moments, and the final spatial position of the target object is calculated based on the following formula:

[0092]

[0093] In an optional embodiment, before acquiring pixel position information, horizontal distance, and shooting duration corresponding to each camera of the target object at multiple camera angles, the method further includes:

[0094] Step 101, comparing and matching the images captured by the cameras, and identifying the target objects matched as the same target with the same identification information;

[0095] Step 102, determining the straight-line distance between the target object and each of the cameras based on the images captured by each of the cameras;

[0096] Step 103: Determine the horizontal distance between each of the cameras based on each of the straight-line distances.

[0097] Here, the target objects matched as the same target are identified with the same ID for subsequent target tracking and spatial positioning. Within a certain preset time period, the ID of the same target object should remain consistent.

[0098] like Figure 3 As shown, the straight-line distance between the target object and the camera 1 is D′, and the straight-line distance is determined by detecting the image captured by the camera.

[0099] Optionally, the horizontal distance is determined based on the following formula:

[0100] distance=D′·arcsin(ω);

[0101] Among them, distance represents the horizontal distance, D′ represents the straight-line distance, and ω represents the vertical pitch angle of the camera.

[0102] It should be noted that step 101 can be executed before step 102, can also be executed after step 102, and can also be executed simultaneously with step 102; during the execution of step 102 and step 103, it is not limited to executing step 102 first and then executing step 103. That is to say, the straight-line distance of each camera can be determined first, and then the horizontal distance of each camera can be determined. Alternatively, the horizontal distance of each camera can be determined each time the straight-line distance of the camera is determined, without having to wait until the straight-line distances of all cameras are calculated before calculating the horizontal distances.

[0103] Furthermore, determining the straight-line distance between the target object and each of the cameras based on the images captured by each of the cameras includes:

[0104] Inputting the images collected by each of the cameras into a distance metric prediction model respectively to obtain a predicted distance outputted by the distance metric prediction model;

[0105] Based on the distance estimation deviation value corresponding to each of the cameras, each of the predicted distances is corrected to obtain each of the straight-line distances.

[0106] Here, the distance metric prediction model is a model for estimating the straight-line distance between the target object and the camera.

[0107] Optionally, the distance metric prediction model is a model for estimating straight-line distance based on a fusion of a depth map and an object size.

[0108] Specifically, Figure 2 It is a schematic diagram of the structure of the distance metric prediction model provided by the present invention. Figure 2 As shown in the figure, the input is an image of the same size after alignment mapping or proportional scaling. The image size is W×H×C. If the aspect ratio does not meet the required input, the short side is padded with 255 pixels until it meets the requirement. The output includes the predicted depth image I′ of the same size as the input image, the category region segmentation image B′, the pixel-level coordinates (x′, y′) of the center points of N target objects, the pixel-level length, width and height (l′, w′, h′) of the object, and the horizontal deflection angle θ′ of the object. In order to facilitate the preparation of training data annotation, the learning supervision method of the depth image part is to only supervise the prediction error of the area where the target object exists. The category region segmentation image is only output in the training stage, and is not output in the inference test stage.

[0109] Optionally, the distance metric prediction model is trained based on the following steps:

[0110] Collect and annotate the output images of the same camera model in multiple scenes and time periods. The annotated information includes but is not limited to object category C i (i∈{0,1,2,...,n}), object size S (S=(l,w,h)), object center coordinates L (l=(x,y,z)), object horizontal plane deflection angle θ (θ∈[-180°,180°]), actual straight-line distance D from the object to the camera (D=z×m,D∈[0,m]);

[0111] Where n is the number of identifiable categories, l, w, h are the pixel-level length, width, and height of the target object, x, y are the pixel-level horizontal and vertical coordinates of the target object, z is the normalized distance value of the target object, z∈[0,1], and m is set to 15;

[0112] The distance metric prediction model is trained and optimized using the collected and annotated data, so that the optimized model can adapt to the image output by the camera of this parameter model and improve the accuracy of target object positioning.

[0113] The trained and optimized distance metric prediction model is used to predict the straight-line distance of each target object appearing in the image, and the predicted value of the center point of the target object is used as the distance estimate of the target object to obtain the predicted distance of the corresponding output of the model; the predicted distance is multiplied by the corresponding distance coefficient δ (0≤δ≤m) to obtain the distance estimate; since there are certain deviations in images taken by different models of cameras, if the current camera is not a standard camera, the distance estimate is corrected based on the distance estimate deviation of the current camera relative to the standard camera to finally obtain the straight-line distance; if the current camera is a standard camera, the straight-line distance corrected using the corresponding distance estimate deviation is the same as the distance estimate, that is, the distance estimate is the final straight-line distance and no correction is required.

[0114] The target positioning method provided in the embodiment of the present application performs distance correction for cameras of different models, so that the target positioning method is not limited to a specific model of camera and is applicable to cameras of various models; the predicted distance is corrected based on the distance estimation deviation value, and cameras of different models can use the same distance measurement prediction model for distance estimation, without the need to train models separately for cameras of different models, thereby reducing the model training cost.

[0115] In an optional embodiment, the distance estimation deviation value is determined based on the following steps:

[0116] Step 104, aligning the test images captured by each of the cameras with the test images captured by the standard camera;

[0117] Step 105, inputting the aligned test images into the distance metric prediction model respectively to obtain the predicted test distance outputted by the distance metric prediction model;

[0118] Step 106, inputting the test image captured by the standard camera into the distance metric prediction model to obtain the standard prediction distance output by the distance metric prediction model;

[0119] Step 106: Determine the distance estimation deviation value corresponding to each of the cameras based on each of the predicted test distances and the standard predicted distance.

[0120] In step 104, the test images acquired by cameras with different internal parameters are adjusted and mapped to be aligned with the test images acquired by the standard camera.

[0121] It should be noted that the execution order of step 105 and step 106 is not limited, that is, step 105 can be executed first and then step 106, or step 106 can be executed first and then step 105, or step 105 and step 106 can be executed simultaneously.

[0122] In an optional embodiment, respective distance metric prediction models are directly trained for camera images with different internal parameters, and in real-time use, each distance metric prediction model is used in combination with a camera of a corresponding model.

[0123] The target positioning system provided in the embodiment of the present application is described below. The target positioning system described in Xiamen and the target positioning method described above can be referenced to each other.

[0124] Figure 5 It is a schematic diagram of the structure of the target positioning system provided by the present invention. Figure 5 As shown, the target positioning system includes an image acquisition layer, an image matching layer, a positioning prediction layer, and a fusion mapping layer.

[0125] The image acquisition layer includes a camera parameter recording module and a camera parameter alignment module:

[0126] The camera parameter recording module obtains video and / or image data through the camera, and records and saves the camera's internal parameters and external parameters such as installation angle, installation height, and installation position information;

[0127] The camera parameter alignment module adjusts the image mapping or optimizes the parameter model for cameras with different intrinsic reference models, which is used to estimate the distance and volume of the target object.

[0128] Specifically, the camera intrinsic parameters may include, but are not limited to, the camera focal length f, the camera resolution a×b, the sensor size c×d, the horizontal field of view angle φ, and the vertical field of view angle ω. For multiple cameras with different intrinsic parameter models, it is necessary to perform algorithm fitting and calibration for multiple sets of images taken by different models of cameras. The fitting methods include pre-fitting and post-fitting. Pre-fitting is to calculate the distance estimation deviation value between the camera and the standard camera, and use the distance estimation deviation value to correct the distance in the subsequent distance estimation. Post-fitting is to train the distance metric prediction model separately for cameras with different intrinsic parameter parameters.

[0129] It should be noted that when installing the camera, it is necessary to ensure that it can cover all corners of the area where target positioning is required, and record the camera's external parameters including the camera's installation angle, installation height, and installation position information; during use, the camera's image is read in real time, and the images of each camera must be synchronized and acquired in real time.

[0130] The image matching layer includes an object recognition module and an object tracking module, which are used to process and utilize the overlapping information of multiple camera areas, compare and match the same objects in multi-view images, and assist in locating the target object.

[0131] Specifically, based on the external parameter position information of each camera, image analysis is performed on the camera surveillance images of adjacent areas. All objects in the camera images with geographically adjacent locations are analyzed and matched through methods including but not limited to face recognition, pedestrian re-identification, and vehicle recognition. The matched target objects of the same target are identified as the same object ID for subsequent target tracking and spatial positioning. The same object ID should remain consistent within time t.

[0132] The positioning prediction layer includes a distance metric estimation module, which estimates the straight-line distance of the target object from the camera based on the fusion of the depth map and the target size.

[0133] Specifically, after using the distance metric prediction model to predict the distance of each target object appearing in the image, correction is performed to obtain the straight-line distance.

[0134] The fusion mapping layer includes a multi-view fusion module and a spatial coordinate remapping module: the multi-view fusion module jointly judges the target object distance estimated by cameras at multiple angles, so that the target positioning system can stably output the target position coordinates in cross-camera and occlusion situations; the spatial coordinate remapping module combines the estimated object distance information with the three-dimensional spatial coordinate information of the reference point, and finally maps it to the target space domain to complete the positioning result display.

[0135] Specifically, after determining the horizontal distance based on the straight-line distance, a weighted joint judgment is made on the three-dimensional spatial coordinates of the target object by combining the spatial position of the camera, the target object's posture super-item, the dwell time, and the relative position with the camera. After finally obtaining the spatial position of the target object, the spatial position is mapped to the display layer map based on the reference object coordinate information (such as the camera's installation position coordinates), and the target object's posture orientation, trajectory movement direction, attribute category and other information are displayed in real time.

[0136] The target positioning device provided in the embodiment of the present application is described below. The target positioning device described below and the target positioning method described above can be referenced to each other.

[0137] Figure 6 is a schematic diagram of the structure of the target positioning device provided by the present invention, such as Figure 6 As shown, the target positioning device comprises:

[0138] The acquisition module 610 is used to: acquire the horizontal distance of the target object at the angles of multiple cameras, the shooting duration corresponding to each camera, and the external parameter parameters of each camera, wherein the horizontal distance is the distance between the target object and the camera, the horizontal distance corresponding to each camera is determined based on the images captured by each camera, and the shooting duration is the duration for the camera to continuously track and capture the target object;

[0139] The calculation module 620 is used to perform weighted calculation based on the horizontal distances, the shooting durations and the external parameters to obtain the spatial position of the target object.

[0140] Figure 7 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 7 As shown, the electronic device may include: a processor 710, a communication interface 720, a memory 730 and a communication bus 740, wherein the processor 710, the communication interface 720 and the memory 730 communicate with each other through the communication bus 740. The processor 710 may call the computer program in the memory 730 to execute the steps of the XXXX method, for example, including: obtaining the horizontal distance of the target object at the angle of multiple cameras, the shooting time corresponding to each of the cameras, and the external parameter parameters of each of the cameras, wherein the horizontal distance is the distance between the target object and the camera, the horizontal distance corresponding to each of the cameras is determined based on the images captured by each of the cameras, and the shooting time is the time for the camera to continuously track and capture the target object; based on each of the horizontal distances, each of the shooting time and each of the external parameter parameters, weighted calculation is performed to obtain the spatial position of the target object.

[0141] In addition, the logic instructions in the above-mentioned memory 730 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art, and the computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk.

[0142] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the target positioning method provided by the above-mentioned methods, which includes: obtaining the horizontal distance of the target object at the angles of multiple cameras, the shooting time corresponding to each of the cameras, and the extrinsic parameters of each of the cameras, the horizontal distance is the distance between the target object and the camera, the horizontal distance corresponding to each of the cameras is determined based on the images captured by each of the cameras, and the shooting time is the time the camera continuously tracks and captures the target object; based on each of the horizontal distances, each of the shooting times and each of the extrinsic parameters, weighted calculation is performed to obtain the spatial position of the target object.

[0143] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the target positioning method provided by the above-mentioned methods, the method comprising: obtaining the horizontal distance of the target object at the angles of multiple cameras, the shooting time corresponding to each of the cameras, and the extrinsic parameters of each of the cameras, the horizontal distance being the distance between the target object and the camera, the horizontal distance corresponding to each of the cameras being determined based on the images captured by each of the cameras, and the shooting time being the time the camera continuously tracks and captures the target object; performing weighted calculation based on each of the horizontal distances, each of the shooting times and each of the extrinsic parameters to obtain the spatial position of the target object.

[0144] The non-transitory computer-readable storage medium can be any available medium or data storage device that can be accessed by the processor, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as CD, DVD, BD, HVD, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid-state drive (SSD)), etc.

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

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

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

Claims

1. A target positioning method, characterized in that: include: Acquire the horizontal distance of the target object at the angles of multiple cameras, the shooting duration corresponding to each camera, and the external parameter parameters of each camera, wherein the horizontal distance is the distance between the target object and the camera, the horizontal distance corresponding to each camera is determined based on the images captured by each camera, and the shooting duration is the duration for the camera to continuously track and capture the target object; Based on the horizontal distances, the shooting durations and the external parameters, a weighted calculation is performed to obtain the spatial position of the target object.

2. The target positioning method according to claim 1, characterized in that: The step of performing weighted calculation based on the horizontal distances, the shooting durations and the external parameters to obtain the spatial position of the target object includes: Based on the position prediction step, respectively determining the predicted position corresponding to each of the cameras; Performing weighted calculation based on each predicted position and each shooting duration to obtain the spatial position of the target object; The position prediction step comprises: The predicted position corresponding to the camera is determined based on the horizontal distance, the extrinsic parameters, and the angle of the camera, wherein the angle is the angle between the target object and the camera.

3. The target positioning method according to claim 2, characterized in that: When the number of the cameras is two, the predicted position corresponding to each camera is calculated based on the following formula: in, represents the predicted position corresponding to the first camera, (x cam1 ,y cam1 ) represents the coordinates of the installation position of the first camera, distance cam represents the horizontal distance of the first camera, represents the angle of the first camera, α cam represents the horizontal rotation angle of the first camera, represents the predicted position corresponding to the second camera, (x cam2 ,y cam2 ) represents the coordinates of the installation position of the second camera, distance cam2 represents the horizontal distance of the second camera, represents the angle of the second camera, α cam2 Indicates the horizontal rotation angle of the second camera.

4. The target positioning method according to claim 2 or 3, characterized in that: The weight of the predicted position corresponding to the camera is determined based on the following steps: Determining a weight of a predicted position corresponding to the camera based on a ratio of the shooting time of the camera to the total shooting time; The total shooting duration is the sum of the shooting durations.

5. The target positioning method according to claim 1, characterized in that: Before obtaining pixel position information, horizontal distance, and shooting time of each camera of the target object at multiple camera angles, the method further includes: Comparing and matching the images captured by the cameras, and identifying the target objects matched as the same target with the same identification information; Based on the images captured by each of the cameras, determining the straight-line distance between the target object and each of the cameras; The horizontal distance between the cameras is determined based on the linear distances.

6. The target positioning method according to claim 5, characterized in that: The determining the straight-line distance between the target object and each of the cameras based on the images captured by each of the cameras includes: Inputting the images collected by each of the cameras into a distance metric prediction model respectively to obtain a predicted distance outputted by the distance metric prediction model; Based on the distance estimation deviation value corresponding to each of the cameras, each of the predicted distances is corrected to obtain each of the straight-line distances.

7. A target positioning device, characterized in that: include: An acquisition module is used to: acquire the horizontal distance of the target object at the angles of multiple cameras, the shooting duration corresponding to each of the cameras, and the external parameter parameters of each of the cameras, wherein the horizontal distance is the distance between the target object and the camera, the horizontal distance corresponding to each of the cameras is determined based on the images captured by each of the cameras, and the shooting duration is the duration for the camera to continuously track and capture the target object; The calculation module is used to perform weighted calculation based on the horizontal distances, the shooting durations and the external parameters to obtain the spatial position of the target object.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the target positioning method according to any one of claims 1 to 6 is implemented.

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

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the target positioning method according to any one of claims 1 to 6 is implemented.