Method and apparatus for positioning target object, electronic device and storage medium

CN123020976APending Publication Date: 2026-10-30中国卫通集团股份有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611222885.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-12
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

围绕单目测距,现有技术存在地形适配能力弱的缺陷,如基于地面平面假设的逆透视映射(Inverse Perspective Mapping,IPM)测距法仅适用于纯平地,对于山地、斜坡、丘陵等非平坦地形几何假设失效,定位误差极大且无法使用,不能区分平地/山地两套计算逻辑

Benefits of technology

[0008]从上面所述可以看出,本申请提供的对目标对象进行定位的方法、装置、电子设备及存储介质,所述方法包括获取采集设备对应的设备参数和采集图像,响应于确定所述采集图像中存在目标对象,生成包含第一检测结果的目标采集图像,其中,所述第一检测结果包括包围所述目标对象的边界框对应的框坐标,能够准确且直观的呈现目标对象在图像内的像素位置。获取所述采集图像对应的地形类型,像素焦距和图像主点,基于所述设备参数,所述框坐标,所述像素焦距和所述图像主点,确定所述采集设备对应的水平夹角和视线总俯仰角,将目标对象在采集图像上的二维像素偏移量转化为可量化的空间角度数值,精准量化拍摄镜头相对目标的水平偏转程度与上下俯仰程度,实现图像像素位置到实际视线角度的精准量化表征。响应于确定所述地形类型为山地类型,基于所述框坐标,对所述目标对象进行关键点提取,得到至少一个关键点坐标,能够精准锁定目标对象上可用于测距的关键点位。基于所述设备参数,所述视线总俯仰角和所述至少一个关键点坐标,确定所述目标对象相对于所述采集设备的第一定位基准距离,确保了第一定位基准距离的精准性,以及,基于所述第一定位基准距离,确定所述目标对象到所述采集设备的第一距离区间,使得第一距离区间具有合理性。基于所述设备参数,所述框坐标,所述水平夹角,所述第一定位基准距离和所述第一距离区间,确定所述目标对象对应的第一定位信息,有效提升了在山地起伏复杂地形场景下定位结果的可靠性与精准度。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123020976A_ABST
    Figure CN123020976A_ABST
Patent Text Reader

Abstract

The application provides a method and device for positioning a target object, electronic equipment and a storage medium. The method comprises: in response to determining that a target object exists in an image, determining a horizontal angle and a total line-of-sight pitch angle corresponding to a collection device based on device parameters, frame coordinates, pixel focal length and image principal point; in response to determining that the terrain type is a mountain type, extracting key points of the target object based on the frame coordinates to obtain key point coordinates; determining a first positioning reference distance based on the device parameters, the total line-of-sight pitch angle and the key point coordinates, and determining a first distance interval of the target object to the collection device based on the first positioning reference distance; and determining first positioning information of the target object based on the device parameters, the frame coordinates, the horizontal angle, the first positioning reference distance and the first distance interval, thereby solving the technical problem that the positioning of the target object in the collection image by the collection device is not accurate in the prior art, and improving the positioning accuracy of the target object.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a method, apparatus, electronic device, and storage medium for locating a target object. Background Technology

[0002] With the rapid development of applications such as security monitoring, border patrol, and smart parks, video surveillance systems have evolved from simple image recording to intelligent perception and positioning. In practical deployments, a large number of surveillance cameras need to accurately geolocate pedestrians in the monitored images to support needs such as border control, park security, and emergency rescue. The core of pedestrian geolocation is "distance measurement," which involves estimating the horizontal distance of a pedestrian relative to the camera from a single image and then combining this with the camera's global positioning information to calculate the pedestrian's latitude and longitude. Regarding monocular distance measurement, existing technologies suffer from weak terrain adaptability. For example, the inverse perspective mapping (IPM) distance measurement method based on the ground plane assumption is only applicable to flat terrain. For non-flat terrains such as mountains, slopes, and hills, the geometric assumptions fail, resulting in extremely large positioning errors and rendering the method unusable. It also cannot distinguish between the two sets of calculation logics for flat and mountainous terrain. Summary of the Invention

[0003] In view of this, the purpose of this application is to provide a method, apparatus, electronic device and storage medium for locating a target object, so as to overcome all or part of the deficiencies in the prior art.

[0004] To achieve the above objectives, this application provides a method for locating a target object, comprising: acquiring device parameters and an acquired image corresponding to a data acquisition device; in response to determining that a target object exists in the acquired image, generating a target acquired image containing a first detection result, wherein the first detection result includes the coordinates of a bounding box surrounding the target object; acquiring the terrain type, pixel focal length, and image principal point corresponding to the acquired image; determining the horizontal angle and total line-of-sight pitch angle corresponding to the data acquisition device based on the device parameters, the bounding box coordinates, the pixel focal length, and the image principal point; in response to determining that the terrain type is mountainous, extracting key points from the target object based on the bounding box coordinates to obtain at least one key point coordinate; determining a first positioning reference distance of the target object relative to the data acquisition device based on the device parameters, the total line-of-sight pitch angle, and the at least one key point coordinate; and determining a first distance interval from the target object to the data acquisition device based on the first positioning reference distance; and determining first positioning information corresponding to the target object based on the device parameters, the bounding box coordinates, the horizontal angle, the first positioning reference distance, and the first distance interval.

[0005] Based on the same inventive concept, this application also provides an apparatus for locating a target object, comprising: a generation module configured to acquire device parameters and acquired images corresponding to an acquisition device, and in response to determining that a target object exists in the acquired image, generating a target acquired image containing a first detection result, wherein the first detection result includes the coordinates of a bounding box corresponding to the bounding box surrounding the target object; a first determination module configured to acquire terrain type, pixel focal length, and image principal point corresponding to the acquired image, and determine the horizontal angle and total pitch angle of the line of sight corresponding to the acquisition device based on the device parameters, the bounding box coordinates, the pixel focal length, and the image principal point; and an extraction module configured to... In response to determining that the terrain type is mountainous, the target object is subjected to key point extraction based on the bounding box coordinates to obtain at least one key point coordinate; the second determining module is configured to determine a first positioning reference distance of the target object relative to the acquisition device based on the device parameters, the total line-of-sight pitch angle and the at least one key point coordinate, and to determine a first distance interval from the target object to the acquisition device based on the first positioning reference distance; the third determining module is configured to determine first positioning information corresponding to the target object based on the device parameters, the bounding box coordinates, the horizontal angle, the first positioning reference distance and the first distance interval.

[0006] Based on the same inventive concept, this application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable by the processor, wherein the processor implements the method described above when executing the computer program.

[0007] Based on the same inventive concept, this application also provides a non-transitory computer-readable storage medium that stores computer instructions for causing a computer to perform the method described above.

[0008] As can be seen from the above description, the method, apparatus, electronic device, and storage medium for locating a target object provided in this application include: The method involves acquiring device parameters and acquired images corresponding to an acquisition device; in response to determining that a target object exists in the acquired image, generating a target acquisition image containing a first detection result, wherein the first detection result includes the coordinates of the bounding box surrounding the target object, which can accurately and intuitively present the pixel position of the target object within the image; acquiring the terrain type, pixel focal length, and image principal point corresponding to the acquired image; and, based on the device parameters, the bounding box coordinates, the pixel focal length, and the image principal point, determining the horizontal angle and total pitch angle corresponding to the acquisition device; converting the two-dimensional pixel offset of the target object in the acquired image into a quantifiable spatial angle value; accurately quantifying the horizontal deflection and vertical pitch of the shooting lens relative to the target; and achieving accurate quantitative representation of the image pixel position to the actual viewing angle; and, in response to determining that the terrain type is mountainous, extracting key points from the target object based on the bounding box coordinates to obtain at least one key point coordinate, which can accurately locate key points on the target object that can be used for distance measurement. Based on the device parameters, the total line-of-sight pitch angle, and the coordinates of at least one key point, a first positioning reference distance of the target object relative to the acquisition device is determined, ensuring the accuracy of the first positioning reference distance. Furthermore, based on the first positioning reference distance, a first distance interval from the target object to the acquisition device is determined, making the first distance interval reasonable. Based on the device parameters, the frame coordinates, the horizontal angle, the first positioning reference distance, and the first distance interval, first positioning information corresponding to the target object is determined, effectively improving the reliability and accuracy of positioning results in complex, undulating terrain scenarios. Attached Figure Description

[0009] To more clearly illustrate the technical solutions in this application or related technologies, the drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0010] Figure 1 This is a flowchart illustrating a method for locating a target object according to an embodiment of this application. Figure 2 This is a flowchart illustrating a method for locating a target object according to another embodiment of this application; Figure 3 This is a schematic diagram of the structure of a device for locating a target object according to an embodiment of this application; Figure 4 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of this application. Detailed Implementation

[0011] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with specific embodiments and the accompanying drawings.

[0012] It should be noted that, unless otherwise defined, the technical or scientific terms used in the embodiments of this application should have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. The terms "first," "second," and similar terms used in the embodiments of this application do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed after the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are only used to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0013] As described in the background section, with the rapid development of applications such as security monitoring, border patrol, and smart parks, video surveillance systems have evolved from simple image recording to intelligent sensing and positioning. In practical deployments, a large number of surveillance cameras need to accurately geolocate pedestrians in the monitored images to support needs such as border control (real-time location of people crossing the border and calculation of their distance from the fence), park security (tracking the movement of people in complex terrain), and emergency rescue (rapidly locating trapped people in complex environments such as mountains). The core element of pedestrian geolocation is "distance measurement," which involves estimating the horizontal distance of a pedestrian relative to the camera from a single image and then combining this with the camera's global positioning information to calculate the pedestrian's latitude and longitude.

[0014] Several representative solutions have been developed for monocular ranging in existing technologies.

[0015] Existing technology 1: Inverse perspective mapping ranging method based on ground plane assumption: This method assumes that there is a horizontal ground below the camera and projects the image coordinate system onto the ground plane through inverse perspective mapping, thereby directly mapping the pixel position to the ground coordinate. This method has the following defects: (1) Poor terrain adaptability, only supports flat ground scenes. In complex terrains such as mountains, hills, and slopes, the change in ground height causes the geometric assumption that "the ground is a horizontal plane" to completely fail, and the positioning error can reach tens of meters or even become completely unusable. (2) It can only output two-dimensional latitude and longitude, and cannot output the target altitude. In mountain scenes, the altitude difference between the camera and the target is an important geometric constraint. Existing technology fails to use the absolute altitude information of the camera to perform three-dimensional ray projection, and cannot output the altitude estimate of the target.

[0016] Existing technology 2: Optical similar triangle ranging method based on bounding box height: This method assumes the pedestrian is standing upright, with a constant actual height of approximately 1.7 meters. It utilizes the similar triangle relationship of pinhole imaging to infer the distance from the pixel height of the pedestrian's bounding box. Its ranging formula is expressed as follows: Where f is the camera's pixel focal length, and H is the assumed actual height of the pedestrian. The bounding box pixel height is used. This method is widely used, but it has the following drawbacks: (1) It only uses the bounding box height, resulting in low information utilization. When pedestrians stand sideways (the bounding box width is compressed, the height remains the same but the height assumption is not valid), sit or squat (the bounding box height is less than the standing height), or their limbs are obscured (the bounding box is incomplete), the ranging accuracy drops sharply. (2) It is highly dependent on the accuracy of the camera's intrinsic parameters. In actual deployments, the focal length parameter often uses the manufacturer's nominal value, which has an error of ±5%~15%; the lens has distortion, and the equivalent focal length changes in the edge area; if the image is cropped or scaled, the focal length will be invalid, which will eventually lead to the ranging result deviating from the true value by more than 50%. (3) It only outputs the single-point positioning result and cannot provide the confidence interval or error distribution of the result. In security-sensitive application scenarios (such as border crossing warning), the reliability of the positioning result cannot be evaluated, which may lead to false alarms or missed alarms.

[0017] Existing technology 3: Monocular depth estimation method based on deep learning: This method uses a neural network to directly regress the depth value of each pixel in an image. Its drawbacks are: it requires a large amount of depth-annotated data for training, and its generalization ability is limited by the training domain; the output is a relative depth, which is difficult to directly convert into absolute geographic coordinates; and it does not provide interpretable ranging data related to human posture and anatomical features.

[0018] In summary, existing technologies suffer from common defects such as poor terrain adaptability, sensitivity to intrinsic parameters, sensitivity to human posture, lack of error range estimation, and inability to perform 3D positioning in mountainous scenes. These defects lead to inaccurate positioning of target objects in acquired images using acquisition devices.

[0019] In view of this, embodiments of this application propose a method for locating a target object, referring to... Figure 1 This includes the following steps: Step 101: Obtain the device parameters and acquired image corresponding to the acquisition device; in response to determining that a target object exists in the acquired image, generate a target acquired image containing a first detection result, wherein the first detection result includes the bounding box coordinates corresponding to the bounding box surrounding the target object.

[0020] In this step, the device parameters and acquired images corresponding to the acquisition device are obtained. The acquired images are captured by the acquisition device, for example, a monocular camera acquisition device. Device parameters can include extrinsic and intrinsic parameters. Extrinsic parameters include: device latitude and longitude (e.g., latitude lng, longitude lng, and altitude alt), device height above ground (height_above_ground, H_cam), and device pose angles (e.g., pitch, yaw, and roll). Intrinsic parameters include: physical focal length (focal_length_mm, f_mm), sensor width (sensor_width_mm), image resolution, and distortion coefficients (optional). Device parameters may also include a terrain type label, with values ​​of flat (flat land) or mountain (mountainous land).

[0021] It should be noted that before acquiring images, the device parameters can be checked for integrity. If the device parameters fail the integrity check, the positioning operation for the acquired images is terminated. Integrity checks can include one or more of the following: validating the physical dimensions of the acquisition device's image sensor, validating the latitude and longitude data, validating the range of attitude angle values ​​such as pitch and yaw angles, and verifying that focal length-related parameters are not zero. For example, if the sensor width is not greater than zero, the intrinsic parameters are considered abnormal, and the positioning process for that target object is terminated. By performing integrity checks on the device parameters, calculation anomalies caused by illegal parameters can be avoided, and subsequent high-computing-power invalid calculations can be prevented, ensuring the stability and reliability of the positioning process.

[0022] Since the localization is based on the target object, the first step is to detect whether the target object exists in the acquired image. Before determining the presence of the target object, the acquired image can be preprocessed. For example, the acquired image can be decoded and formatted, converted into a three-channel array with a unified color space, and the height (img_h) and width (img_w) of the acquired image can be obtained, effectively improving the data quality of the acquired image. Upon determining the presence of the target object, a target acquired image containing the first detection result is generated, which accurately and intuitively presents the pixel position of the target object within the image. Here, the target object is the pixel region to be located, for example, the pixel region corresponding to a person, which corresponds to a person entity in real space. The target object is merely the image carrier for the algorithm to identify; the final localization solution is the location information of the person entity corresponding to the target object in real space. The first detection result can be overlaid and rendered on the acquired image to form the target acquired image.

[0023] For example, the acquired image is input into a pre-trained object detection model. The object detection model detects whether a target object exists in the acquired image. In response to determining that a target object exists in the acquired image, the object detection model determines and outputs the target acquired image containing the first detection result. Using a pre-trained deep learning object detection model for target recognition, target pixel regions within an image can be automatically and accurately identified. The first detection result includes the coordinates of the bounding box corresponding to the bounding box surrounding the target object, and may also include the detection confidence score of the target object, checking that the confidence score is greater than a predetermined detection confidence score (e.g., 0.2). The bounding box coordinates are the pixel coordinates of the four corners of the bounding box, composed of the coordinates of the top-left, top-right, bottom-right, and bottom-left corners. For example, the bounding box coordinates are [x1, y1, x2, y2], where (x1, y1) is the pixel coordinate of the top-left corner of the bounding box, and (x2, y2) is the pixel coordinate of the bottom-right corner.

[0024] Step 102: Obtain the terrain type, pixel focal length, and image principal point corresponding to the acquired image. Based on the device parameters, the frame coordinates, the pixel focal length, and the image principal point, determine the horizontal angle and total pitch angle of the acquisition device.

[0025] In this step, since the distance measurement and coordinate calculation model under the flat land type will produce a large calculation deviation when directly applied to the mountain type, the geometric projection relationship and the height difference decomposition logic of the two are completely different. It is necessary to first obtain the terrain type corresponding to the acquired image, and then match the corresponding positioning algorithm to perform the solution. Among them, the terrain type is the terrain type of the real surface of the acquired image. Since the two-dimensional image pixels cannot directly correspond to the real three-dimensional spatial position, it is necessary to obtain the pixel focal length and the image principal point and establish the mapping relationship between the pixel and the spatial light. Before obtaining the terrain type, pixel focal length and image principal point corresponding to the acquired image, the pixel focal length and image principal point are calculated and solved based on the device parameters and the acquired image. This application uses the "physical parameter stream" in the device parameters to calculate the pixel focal length, that is, the pixel focal length is obtained by converting the lens physical focal length and the sensor size. Among them, the pixel focal length includes the horizontal pixel focal length and the vertical pixel focal length, as shown in formula (1): f_x=f_mm×(img_w / sensor_w_mm), (1), Where f_x is the horizontal pixel focal length, f_mm is the physical focal length (millimeters), img_w is the image width (pixels) corresponding to the acquired image, and sensor_w_mm is the sensor width (millimeters). Assuming the pixel is square, let f_y = f_x, where f_y is the vertical pixel focal length. The principal point of the image is taken as the geometric center of the image, as shown in formulas (2) and (3): c_x=img_w / 2,(2) c_y=img_h / 2,(3) Where c_x is the x-coordinate of the principal point of the image, c_y is the y-coordinate of the principal point of the image, and img_h is the image height (in pixels) corresponding to the acquired image. The pixel focal length is calculated through hardware parameters, and the intrinsic parameter matrix of the ideal imaging model of the acquisition device is quickly constructed using the geometric center of the image as the principal point coordinates.

[0026] Since the target object can only be represented in a two-dimensional plane in the acquired image, the spatial angular relationship between the acquisition device and the target object cannot be directly calculated. Therefore, based on device parameters, frame coordinates, pixel focal length, and image principal point, the horizontal angle and total line-of-sight pitch angle corresponding to the acquisition device are determined. The horizontal angle is the deflection angle formed between the projection of the acquisition device's lens optical axis onto the horizontal plane and the horizontal line of sight pointing from the acquisition device to the target object; the total line-of-sight pitch angle is the vertical tilt angle formed between the acquisition device's horizontal baseline and the line of sight looking from the acquisition device to the target object. By calculating the horizontal angle and total line-of-sight pitch angle using device parameters, target frame coordinates, pixel focal length, and image principal point, the two-dimensional pixel offset of the target object in the acquired image can be converted into quantifiable spatial angular values. This allows for precise quantification of the horizontal deflection and vertical tilt of the shooting lens relative to the target, achieving accurate quantitative representation of the image pixel position from the actual line-of-sight angle.

[0027] Step 103: In response to determining that the terrain type is mountainous, key points are extracted from the target object based on the bounding box coordinates to obtain at least one key point coordinate.

[0028] In this step, if the acquired image corresponds to a mountainous terrain, the target object is located using a positioning method specific to that terrain type. A mountainous terrain is defined as an undulating slope with an absolute slope angle greater than a first predetermined threshold and less than or equal to a second predetermined threshold (e.g., 3° ​​< |φ| ≤ 30°). In mountainous terrain scenarios, the "height of the acquisition device above the ground" becomes meaningless. This application employs an attitude-assisted intelligent reference segment line-of-sight ranging and 3D positioning method, with the following specific logic: Hard constraint switching: The absolute altitude of the data acquisition device is used as the hard constraint.

[0029] Posture Assistance: Introducing target object posture estimation, intelligently selecting the most reliable one from multiple anatomical reference segments for distance measurement.

[0030] Key point extraction: Based on bounding box coordinates, key points are extracted from the target object to obtain at least one key point coordinate. The key point coordinates are two-dimensional pixel coordinates, which can accurately locate key points on the target object that can be used for distance measurement.

[0031] Subsequently, the above method also includes three-dimensional positioning output: latitude, longitude and altitude are output simultaneously via three-dimensional ray projection.

[0032] Step 104: Based on the device parameters, the total pitch angle of the line of sight, and the coordinates of at least one key point, determine the first positioning reference distance of the target object relative to the acquisition device, and based on the first positioning reference distance, determine the first distance interval from the target object to the acquisition device.

[0033] In this step, to address the issue that spatial depth cannot be directly obtained from monocular 2D images, the specific processing logic is as follows: Line-of-sight ranging: Keypoints in a single acquired image only provide planar pixel positions, which cannot be directly converted into the actual spatial length between the target object and the acquisition device. Therefore, based on device parameters, the total line-of-sight pitch angle, and the coordinates of at least one keypoint, a first positioning reference distance relative to the acquisition device is determined. This transforms the planar pixel positions of the image into a quantifiable theoretical slant distance between the device and the target, solving the problem of not being able to directly obtain spatial depth from monocular two-dimensional images. Furthermore, distance calculation based on keypoints can accurately anchor the effective measurement points of the target object, making the geometric derivation of the first positioning reference distance more closely match the actual imaging point position of the target object, thus ensuring the accuracy of the first positioning reference distance. The first positioning reference distance is the theoretical straight-line reference slant distance between the target object and the acquisition device.

[0034] Determining the first distance interval: Based on the first reference distance, a reasonable first distance interval is further defined to objectively accommodate the unavoidable system errors and calculation deviations in monocular vision imaging and angle measurement, while avoiding the overly absolute nature of a single fixed distance value, thus making the first distance interval reasonable. Specifically, the first distance interval is the range of values ​​between the target object and the acquisition device, centered on the first positioning reference distance and considering the inherent error fluctuation range of imaging calculations. The reference distance is the optimal estimate of the algorithm, and it has inherent errors due to factors such as pose occlusion, focal length deviation, and assumptions about human height. Therefore, the optimal estimate is used as the midpoint to expand the fluctuation range above and below, representing the range within which the true distance is likely to fall, thus quantifying the uncertainty of distance measurement.

[0035] Step 105: Based on the device parameters, the frame coordinates, the horizontal angle, the first positioning reference distance, and the first distance interval, determine the first positioning information corresponding to the target object.

[0036] In this step, based on device parameters, frame coordinates, horizontal angle, first positioning reference distance, and first distance interval, the first positioning information corresponding to the target object is determined. This first positioning information includes the latitude, longitude, and altitude information of the target object. The first positioning reference distance is used as the core theoretical slant distance for 3D ray projection to complete the basic spatial coordinate calculation. The first distance interval is then used to accommodate the calculation deviation inherent in monocular visual ranging. Simultaneously, device parameters ensure the rigor of the projection conversion model, and the horizontal angle is used to correct the target's lateral azimuth offset, avoiding the dimensional loss problem caused by relying solely on a single parameter for positioning. This ensures that the final output first positioning information fully conforms to the physical rules of imaging, while also being compatible with measurement error fluctuations during the ranging process, effectively improving the reliability and accuracy of positioning results in complex, undulating terrain scenarios.

[0037] The above scheme acquires the device parameters and acquired images corresponding to the acquisition device. In response to determining the presence of a target object in the acquired image, a target acquisition image containing a first detection result is generated. This first detection result includes the bounding box coordinates of the bounding box surrounding the target object, accurately and intuitively presenting the pixel position of the target object within the image. The terrain type, pixel focal length, and image principal point corresponding to the acquired image are acquired. Based on the device parameters, the bounding box coordinates, the pixel focal length, and the image principal point, the horizontal angle and total viewing angle corresponding to the acquisition device are determined. The two-dimensional pixel offset of the target object in the acquired image is converted into a quantifiable spatial angle value, accurately quantifying the horizontal deflection and vertical pitch of the shooting lens relative to the target, achieving precise quantitative representation of the image pixel position to the actual viewing angle. In response to determining that the terrain type is mountainous, key points are extracted from the target object based on the bounding box coordinates, obtaining at least one key point coordinate, which can accurately locate key points on the target object that can be used for distance measurement. Based on the device parameters, the total line-of-sight pitch angle, and the coordinates of at least one key point, a first positioning reference distance of the target object relative to the acquisition device is determined, ensuring the accuracy of the first positioning reference distance. Furthermore, based on the first positioning reference distance, a first distance interval from the target object to the acquisition device is determined, making the first distance interval reasonable. Based on the device parameters, the frame coordinates, the horizontal angle, the first positioning reference distance, and the first distance interval, first positioning information corresponding to the target object is determined, effectively improving the reliability and accuracy of positioning results in complex, undulating terrain scenarios.

[0038] In some embodiments, extracting key points from the target object based on the bounding box coordinates to obtain at least one key point coordinate includes: expanding and cropping the bounding box in the target acquisition image according to a predetermined ratio to obtain a cropped image containing the target object; extracting pose points from the cropped image using a pre-built pose estimation model to obtain the detection confidence and local coordinates corresponding to each pose point; translating and converting the local coordinates corresponding to each pose point into global coordinates on the target acquisition image according to the predetermined ratio; and performing multiple rounds of key point filtering operations based on the bounding box coordinates, and the detection confidence and global coordinates corresponding to each pose point to obtain the at least one key point coordinate.

[0039] In this embodiment, due to the excessive number of redundant pixels in the target acquisition image, directly using the target acquisition image for key point extraction would reduce the extraction accuracy. Therefore, it is necessary to crop the target acquisition image. To avoid truncating the edge key points of the target object when using the original bounding box for cropping, the bounding box in the target acquisition image is expanded outward by a predetermined ratio (e.g., 0.25) before cropping, resulting in a cropped image containing the target object. The cropped image is input into a pre-trained pose estimation model, which extracts pose points from the cropped image, determines and outputs the detection confidence and local coordinates corresponding to each pose point. For example, 17 human pose points in COCO format (Contextual General Target Dataset Format) are obtained, each pose point is represented as [x, y, conf], where x is the abscissa of the pose point in the image pixel coordinate system, y is the ordinate of the pose point in the image pixel coordinate system, and conf is the detection confidence.

[0040] The coordinate system reference used in the attitude estimation model during inference is inconsistent with the coordinate system reference of the acquired image. The attitude estimation model outputs the local coordinates of attitude points by using the origin of the coordinate system of the cropped image itself. However, subsequent geometric calculations rely on the origin of the coordinate system of the original target acquired image. The non-coincidence of the two reference origins will introduce a fixed coordinate offset. Therefore, according to a predetermined ratio, the local coordinates corresponding to each attitude point are translated and converted into global coordinates on the target acquired image to eliminate the coordinate offset error caused by the cropping operation and ensure that the position of the point in the target acquired image is accurate and reliable.

[0041] Based on the bounding box coordinates, as well as the detection confidence score and global coordinates corresponding to each pose point, multiple rounds of keypoint filtering operations are performed to obtain at least one keypoint coordinate. Through multiple rounds of keypoint filtering operations, high-confidence and reliable positioning points can be selected as high-quality and effective positioning points.

[0042] In some embodiments, the step of performing multiple rounds of keypoint filtering operations based on the frame coordinates, and the detection confidence and global coordinates corresponding to each pose point to obtain the coordinates of at least one keypoint includes: classifying all pose points according to their categories to obtain multiple types of pose point combinations; sorting the multiple types of pose point combinations from high to low according to a preset importance to obtain a set containing multiple pose point combinations; taking the first pose point combination in the set as the combination to be detected, and performing the following operations in each round of keypoint filtering: in response to determining that there are no pose points in the combination to be detected with a detection confidence less than or equal to a predetermined confidence, determining a first Euclidean distance corresponding to the combination to be detected based on the type corresponding to the combination to be detected; in response to determining that the first Euclidean distance is less than or equal to a predetermined Euclidean distance, or in response to determining If there are attitude points in the combination to be detected with a detection confidence level less than or equal to the predetermined confidence level, determine whether there is an adjacent next attitude point combination in the set, wherein the predetermined Euclidean distance is determined according to the type corresponding to the combination to be detected; in response to determining that there is an adjacent next attitude point combination, use the adjacent next attitude point combination as the combination to be detected in the next round of key point filtering operation, and execute the next round of key point filtering operation; in response to determining that the first Euclidean distance is greater than the predetermined Euclidean distance, use the global coordinates corresponding to each attitude point in the combination to be detected as the coordinates of the at least one key point, and exit at least one round of key point filtering operation; in response to determining that there is no adjacent next attitude point combination, use the bounding box coordinates as the coordinates of the at least one key point, and exit at least one round of key point filtering operation.

[0043] In this embodiment, all posture points are classified according to their categories, resulting in various types of posture point combinations. These categories include bilateral torso type, left torso type, right torso type, shoulder width type, left thigh type, right thigh type, left upper arm type, and right upper arm type. Based on the category of the posture key points, classification and aggregation are completed according to preset attribution rules, achieving the goal of orderly categorizing all posture points. Different types of posture point combinations have different accuracies in determining the first distance interval; therefore, the various types of posture point combinations are first sorted from high to low according to preset importance, resulting in a set containing multiple posture point combinations. The preset attribution rules and preset importance are determined based on their respective historical experience. Sorting the various types of posture point combinations from high to low according to preset importance forms an ordered set, clarifying the hierarchical order of different posture point combinations, facilitating subsequent rapid retrieval and orderly traversal. For example, the set is represented as {bilateral torso type posture point combination, left torso type posture point combination, right torso type posture point combination, shoulder width type posture point combination, left thigh type posture point combination, right thigh type posture point combination, left upper arm type posture point combination, right upper arm type}.

[0044] The pre-defined order of importance from highest to lowest is as follows: bilateral trunk type, left trunk type, right trunk type, shoulder width type, left thigh type, right thigh type, left upper arm type, and right upper arm type. This is because the posture point combination for bilateral trunk types uses anatomical points of the entire bilateral trunk for calculation. During normal activities, the trunk rarely bends or deforms, and is least affected by the direction of the body. Therefore, the distance range calculated based on this combination has the best reference value. Next are the posture point combinations for left and right trunk types. The skeletal structure of a single trunk is relatively rigid, and the calculation error caused by changes in limb posture is relatively controllable. The posture point combination for shoulder width type relies on fixed points of the left and right acromions for measurement. The physiological length is constant and not easily deformed, so its reference value is slightly lower than that of the posture point combination for single trunk types. The posture point combinations for left and right thigh types will bend during walking and knee bending, so their reference value is lower than that of the posture point combination for shoulder width type. The posture point combinations for left and right upper arm types are easily affected by movements such as raising the arm, bending the elbow, and turning to the side, changing the straight-line distance between the two points, so their reference value is lower than that of the posture point combination for left and right thigh types.

[0045] The first pose point combination in the set is taken as the test combination. Each round of keypoint screening is performed as follows: If there are no pose points in the test combination with a detection confidence level less than or equal to a predetermined confidence level, it indicates that the detection results of the pose points in the test combination have all met the preset reliability standard. Based on the type of the test combination, the first Euclidean distance corresponding to the test combination is determined. The predetermined confidence level can be determined according to the type of the test combination. Different human body parts have different occlusion probabilities and detection stability. The predetermined confidence level is set differently according to the type of the test combination, which can ensure the data reliability of the core ranging points while reasonably relaxing the admission conditions of auxiliary points, thus improving the scientific nature of keypoint screening. The first Euclidean distance is calculated according to the category to which the test point combination belongs, and solved according to the preset exclusive point selection rules for each type of point combination, ensuring that the calculated first Euclidean distance conforms to the geometric characteristics of the corresponding human body part.

[0046] For example, the pose point index can be defined as: 5 left shoulder, 6 right shoulder, 7 left elbow, 8 right elbow, 11 left hip, 12 right hip, 13 left knee, 14 right knee, 3 left ear, and 4 right ear. In the case where the pose point combination to be detected is a bilateral torso type (Torso_Full), if conf[5]>c_h and conf[6]>c_h and conf

[11] >c_h and conf

[12] >c_h, then the pixel Euclidean distance between the shoulder center ((kp5+kp6) / 2) and the hip center ((kp11+kp12) / 2) is determined as the first Euclidean distance l_pix, where conf[i] represents the detection confidence of the pose point with index number i, and c_h is the first predetermined confidence, which is determined according to historical experience, such as 0.6. When the pose point combination to be detected is of the left torso type (Torso_Left), if conf[5]>c_h and conf

[11] >c_h, then the pixel Euclidean distance between the left shoulder pose point and the left hip pose point is determined to be the first Euclidean distance, expressed as l_pix=dist(5,11). When the pose point combination to be detected is of the right torso type (Torso_Right), if conf[6]>c_h and conf

[12] >c_h, then the pixel Euclidean distance between the right shoulder pose point and the right hip pose point is determined to be the first Euclidean distance, expressed as l_pix=dist(6,12).

[0047] When the pose point combination to be detected is a shoulder width type (Torso_Left), if conf[5]>c_n and conf[6]>c_n and conf[7]>c_l and conf[8]>c_l and conf[3]>c_l and conf[4]>c_l, then the pixel Euclidean distance between the left shoulder pose point and the right shoulder pose point is determined as the first Euclidean distance, expressed as l_pix=dist(5,6), where c_n is the second predetermined confidence level and c_l is the third predetermined confidence level, determined according to historical experience, such as c_n being 0.7 and c_l being 0.5. When the pose point combination to be detected is a left thigh type, if conf

[11] >c_l and conf

[13] >c_l, then the pixel Euclidean distance between the left hip pose point and the left knee pose point is determined as the first Euclidean distance, expressed as l_pix=dist(11,13). When the combination to be detected is a right thigh type of posture point combination, if conf

[12] >c_l and conf

[14] >c_l, then the pixel Euclidean distance between the right hip posture point and the right knee posture point is determined as the first Euclidean distance, expressed as l_pix=dist(12,14). When the combination to be detected is a left upper arm type of posture point combination, if conf[5]>c_l and conf[7]>c_l, then the pixel Euclidean distance between the left shoulder posture point and the left elbow posture point is determined as the first Euclidean distance, expressed as l_pix=dist(5,7). When the combination to be detected is a right upper arm type of posture point combination, if conf[6]>c_l and conf[8]>c_l, then the pixel Euclidean distance between the right shoulder posture point and the right elbow posture point is determined as the first Euclidean distance, expressed as l_pix=dist(6,8).

[0048] If the first Euclidean distance is less than or equal to the predetermined Euclidean distance, it indicates that the limb pixel scale calculated by the combination to be detected deviates too much from the standard physiological length of the human body. This may be due to perspective compression, long-distance imaging, or key point occlusion, leading to distortion of the limb projection length, making it unsuitable as a ranging benchmark. If it is determined that there are posture points in the combination to be detected with a detection confidence level less than or equal to the predetermined confidence level, it indicates that the detection quality of the combination to be detected is insufficient, and the data is unreliable. If any of the above conditions are met, it is determined that the current combination of posture points to be detected does not meet the usage conditions and cannot be used as a valid scale benchmark for ranging calculation. The predetermined Euclidean distance is determined according to the type corresponding to the combination to be detected. For example, it relies on the fixed physiological dimensions of an adult human body as the benchmark parameter for converting pixel scale to real distance. For instance, the predetermined Euclidean distance for the torso type is 0.53m, the predetermined Euclidean distance for the shoulder width type is 0.40m, the predetermined Euclidean distance for the leg type is 0.45m, and the predetermined Euclidean distance for the arm type is 0.30m.

[0049] Therefore, it is determined whether the combination to be detected has an adjacent next pose point combination in the set. For example, if the combination to be detected is a bilateral torso type pose point combination, the next pose point combination in the set is a left torso type pose point combination; if the combination to be detected is a right upper arm type pose point combination, there is no next pose point combination in the set. If an adjacent next pose point combination exists, the adjacent next pose point combination is used as the combination to be detected in the next round of keypoint filtering. In the example above, the left torso type pose point combination is the combination to be detected in the next round of keypoint filtering, and the next round of keypoint filtering is performed.

[0050] If the first Euclidean distance is greater than the predetermined Euclidean distance, it indicates that the limb length calculated from the current pose point combination exceeds the preset standard physiological length of the human body part. Therefore, the scale detection of the point combination under test is deemed normal, with no obvious perspective compression or imaging distortion issues. The global coordinates corresponding to each pose point in the test combination are used as at least one keypoint coordinate, and at least one round of keypoint filtering is performed. All points in the test combination have passed confidence and scale reasonableness checks, and the filtered keypoint coordinates are reliable.

[0051] It should be noted that before using the global coordinates corresponding to each attitude point in the combination to be tested as at least one key point coordinate, a composite verification can be performed on the combination to be tested based on the type of the combination to be tested. In response to the determination that the composite verification is passed, the subsequent calculation process is entered, and the global coordinates corresponding to each attitude point in the combination to be tested are used as at least one key point coordinate. In response to the determination that the composite verification is not passed, the process jumps to determine whether there is an adjacent next attitude point combination in the set of the combination to be tested, and continues to traverse the candidate references step by step.

[0052] For example, in response to determining that the type corresponding to the combination to be detected is bilateral torso type, left torso type, or right torso type, the composite verification is skipped. In response to determining that the type corresponding to the combination to be detected is shoulder width type, the combination to be detected is subjected to shoulder width pixel minimum threshold verification, left upper arm ratio verification, right upper arm ratio verification, and ear spacing ratio verification. In response to determining that each verification meets its corresponding admission condition, the combination to be detected is determined to pass the composite verification; in response to determining that any verification does not meet its corresponding admission condition, the combination to be detected is determined to fail the composite verification. Here, the admission condition is the criterion used to determine whether the combination to be detected passes the corresponding verification. Meeting the admission condition means that the corresponding verification is passed. When pedestrians are in a side-facing posture, the shoulder is prone to perspective projection compression, which makes the shoulder width pixel distance smaller. If this distortion value is directly used for conversion, it may cause the final distance measurement result to be larger. Therefore, this application sets a multi-layer composite verification mechanism for shoulder width type, and eliminates perspective distortion samples through multi-dimensional constraints. The minimum pixel threshold for shoulder width is checked by comparing a first Euclidean distance with a predetermined minimum pixel value. For example, the admission condition is dist(5, 6) ≥ 15 pixels. This filters out invalid minimum pixel values ​​caused by excessively small imaging size of distant targets, avoiding interference from imaging noise on the scale reference. The left upper arm proportion check includes determining whether the left arm's posture meets a first predetermined proportion. First, it determines whether the left arm meets a predetermined vertical posture using the following formula: is_vertical(i, j, τ) ≡ |y_i y_j| / dist(i, j)>τ, (4), where is_vertical(i, j, τ) is a Boolean decision function, i and j represent the index number of the posture point, y_i is the vertical pixel coordinate of the posture point with index number i in the image pixel coordinate system, y_j is the vertical pixel coordinate of the posture point with index number j in the image pixel coordinate system, and τ is the preset vertical decision threshold. The Boolean decision function for the left upper arm proportion verification is expressed as: is_vertical(5, 7, 0.5) is used to verify whether the upper arm limb from the left shoulder 5 to the left elbow 7 is in an approximately vertical state, and 0.5 is the preset vertical decision threshold. Secondly, in response to determining that the left arm meets the predetermined vertical posture, the first Euclidean distance corresponding to the shoulder width type is compared with a predetermined multiple (e.g., 0.9) of the first Euclidean distance corresponding to the left upper arm type, and the admission condition is dist(5, 6)≥dist(5, 7)×0.9. The verification is based on the physiological characteristics that the standard length of an adult's shoulder width is 0.40m, which is greater than the standard length of the upper arm of 0.30m. If the proportion does not meet the standard, it is determined that the pedestrian's side profile causes the shoulder width to be compressed in perspective, and the shoulder width benchmark is invalid.

[0053] The right upper arm proportion verification includes determining whether the right arm posture meets the predetermined vertical posture. First, it is determined whether the right arm meets the predetermined vertical posture. The posture is determined by the above formula (4). The Boolean judgment function for the right upper arm proportion verification is: is_vertical(6, 8, 0.5) is used to verify whether the upper arm limb from the right shoulder 6 to the right elbow 8 is in an approximately vertical state. Second, in response to determining that the right arm meets the predetermined vertical posture, the first Euclidean distance corresponding to the shoulder width type is compared with a predetermined multiple (e.g., 0.9) of the first Euclidean distance corresponding to the right upper arm type. The admission condition is dist(5, 6) ≥ dist(6, 8) × 0.9. The interauricular distance proportion verification is to determine whether the first Euclidean distance corresponding to the shoulder width type is greater than the predetermined ear distance relationship distance. The admission condition is dist(5, 6) ≥ dist(3, 4) × 2.0. This verification is based on human physiological dimensions. The standard length of the interauricular distance for adults is about 0.15m, and the standard length of the shoulder width is about 0.40m. The actual ratio between the two is about 2.7. If the shoulder width pixel length in the image is less than twice the ear distance pixel length, the target's side profile is deemed too large, resulting in severe shoulder perspective compression and rendering the shoulder width baseline invalid. If the confidence level of any ear key point is below the standard, this verification step is skipped.

[0054] In response to determining that the type corresponding to the combination to be tested is the left thigh type, a left thigh proportion verification is performed on the combination to be tested. If the left thigh proportion verification meets its corresponding admission criteria, the combination to be tested passes the composite verification; if the left thigh proportion verification does not meet its corresponding admission criteria, the combination to be tested fails the composite verification. The Boolean decision function for the left thigh proportion verification is: is_vertical(11, 13, 0.5), used to verify whether the thigh limb from the left hip 11 to the left knee 13 is in an approximately vertical state. The allowable angle deviation value τ=0.5 is used to exclude cases where the thigh is extended forward (nearly orthogonal to the acquisition device) while seated, resulting in a severely shortened perspective projection. In response to determining that the type corresponding to the combination to be tested is the right thigh type, a right thigh proportion verification is performed on the combination to be tested. If the right thigh proportion verification meets its corresponding admission criteria, the combination to be tested passes the composite verification; if the right thigh proportion verification does not meet its corresponding admission criteria, the combination to be tested fails the composite verification. The Boolean function for verifying the proportion of the right thigh is: is_vertical(12, 14, 0.5), which is used to verify whether the thigh limb from the right hip 12 to the right knee 14 is in an approximately vertical state.

[0055] In response to determining that the type corresponding to the combination to be tested is the left upper arm type, a left upper arm type ratio check is performed on the combination to be tested. If the left upper arm type ratio check meets its corresponding admission criteria, the combination to be tested passes the composite check; if the left upper arm type ratio check does not meet its corresponding admission criteria, the combination to be tested fails the composite check. The Boolean decision function for the left upper arm type ratio check is: is_vertical(5, 7, 0.85), used to check whether the left upper arm limb formed by the left shoulder (5) to the left elbow (7) is in an approximately vertical state, where 0.85 is a preset verticality threshold. Similarly, in response to determining that the type corresponding to the combination to be tested is the right upper arm type, a right upper arm type ratio check is performed on the combination to be tested. If the right upper arm type ratio check meets its corresponding admission criteria, the combination to be tested passes the composite check; if the right upper arm type ratio check does not meet its corresponding admission criteria, the combination to be tested fails the composite check. The Boolean function for the right upper arm type ratio check is: is_vertical(6, 8, 0.85) is used to check whether the right upper arm limb formed by the right shoulder 6 to the right elbow 8 is in an approximately vertical state.

[0056] If no adjacent next pose point combination exists, the bounding box coordinates are used as at least one keypoint coordinate, and the keypoint filtering operation is exited for at least one round. When no adjacent next pose point combination exists in the set, the bounding box coordinates are directly used as the equivalent keypoint coordinates, and the current keypoint filtering process is terminated. In a fallback scenario where all limb scale benchmarks fail to verify and there are no available human keypoints to choose from, the algorithm avoids getting stuck in an infinite loop, ensuring that the program flow is closed and exitable. At the same time, relying on the object detection bounding box to provide approximate object position information, basic usable data is retained for subsequent ranging calculations, improving the overall fault tolerance of the algorithm.

[0057] This application establishes a multi-part hierarchical ranging strategy based on human posture key point information. It replaces the target's overall bounding box, which is easily affected by posture interference, with more stable and effective key points such as the shoulder, hip, torso, and limb segments. This significantly improves the robustness of the ranging algorithm under non-standard postures such as pedestrian sideways movement, half-body truncation, and partial limb occlusion. Even under complex conditions where the upright assumption is not valid, it can still output stable and reliable ranging results. This optimization method is a pure algorithm-level improvement, requiring no additional hardware. It can also self-correct systematic errors in ranging caused by calibration deviations of the acquisition equipment's intrinsic parameters, greatly reducing the dependence and sensitivity of the ranging results to intrinsic parameters of the acquisition equipment such as physical focal length. To further enhance posture adaptability, the overall algorithm employs a multi-tiered cascaded intelligent reference segment selection logic based on keypoint confidence. It prioritizes the torso, which is least affected by side-view compression, as the ranging benchmark segment. This is complemented by a single-sided torso degradation and fallback mechanism, a five-fold composite orientation verification rule for shoulder width (covering high-confidence judgment of both shoulder keypoints, lower limit constraint of shoulder width pixel length, verification of left and right upper arm ratios, and verification of ear spacing ratios), and multi-layered verification constraints such as limb verticality verification. This reduces the ranging error from over 50% in large-angle side-view scenarios to less than 20%. In scenarios where the ranging benchmark fails, such as half-body truncation or partial limb occlusion, the system can automatically downgrade to an available alternative reference segment to complete the distance calculation, while simultaneously outputting a corresponding ranging mode marker to facilitate subsequent quality traceability and reliability assessment of the ranging results.

[0058] In some embodiments, determining a first positioning reference distance of the target object relative to the acquisition device based on the device parameters, the total line-of-sight pitch angle, and the coordinates of at least one key point, and determining a first distance interval from the target object to the acquisition device based on the first positioning reference distance, includes: in response to determining that the coordinates of the at least one key point are global coordinates corresponding to each attitude point in the detection combination, determining a first predetermined local length of the target object based on the type corresponding to the detection combination; determining the first positioning reference distance based on the device parameters, a first Euclidean distance, the first predetermined local length, and a predetermined compensation factor; in response to determining that the coordinates of the at least one key point are the frame coordinates, determining a second Euclidean distance based on the frame coordinates, and obtaining a second predetermined local length of the target object; determining the first positioning reference distance based on the device parameters, the second Euclidean distance, the second predetermined local length, and the predetermined compensation factor; and determining the first distance interval based on the first positioning reference distance and a predetermined height interval of the target object.

[0059] In this embodiment, when at least one key point coordinate is the global coordinate corresponding to each posture point in the detection combination, a first predetermined local length of the target object is determined based on the type corresponding to the detection combination. This first predetermined local length is determined based on historical experience. For example, it can be pre-calibrated based on prior historical experience of adult human physiological dimensions and can be set for different limb parts as follows: torso 0.53 meters, shoulder width 0.40 meters, thigh 0.45 meters, and upper arm 0.30 meters. Based on device parameters, a first Euclidean distance, a first predetermined local length, and a predetermined compensation factor, a first positioning reference distance is determined to ensure ranging accuracy under normal posture. The first positioning reference distance (Stadiametric Ranging) is determined using the following formula: D_slant=(f_y×l_phy×cos(φ_m)) / l_pix, (5), Where f_y is the vertical pixel focal length (unit: pixel) of the image in the device parameters, which is an inherent intrinsic parameter calibrated by the acquisition device at the factory and is a known fixed value; l_phy is the first Euclidean distance; l_pix is ​​the first predetermined local length; cos(φ_m) is a predetermined compensation factor, such as a projection compensation factor, which compensates for the effect of perspective compression of the reference segment on the imaging plane caused by the oblique gaze of the acquisition device; and D_slant is the first positioning reference distance, that is, the slant distance (straight-line distance) from the acquisition device to the target object.

[0060] When at least one keypoint coordinate is a bounding box coordinate, a second Euclidean distance is determined based on the bounding box coordinate, and a second predetermined local length of the target object is obtained. When the detection box coordinates are ultimately used as the fallback keypoint coordinates, the second Euclidean distance is calculated based on the pixel width and height of the target detection box, and the average height of an adult is used as the second predetermined local length for distance measurement. Based on device parameters, the second Euclidean distance, the second predetermined local length, and a predetermined compensation factor, a first positioning reference distance is determined. The same set of device parameters and predetermined compensation factors are reused to calculate the first positioning reference distance, improving the robustness of system operation.

[0061] Based on the first positioning reference distance and the predetermined height range of the target object, a first distance range is determined. For example, the first positioning reference distance is decomposed into a horizontal component, as shown in formula (6): D_h=D_slant×cos(φ_m), (6), Where D_h is the horizontal projection distance (used for latitude and longitude calculation).

[0062] Based on the horizontal projection distance and the predetermined height range, a first distance range is determined. The predetermined height range is determined based on historical experience, for example, the average height range of adults. This quantifies the measurement uncertainty caused by individual height differences and assigns a reliable error range to the distance measurement results. In mountainous terrain, the distance depends entirely on the physical length assumption of the reference segment. Its uncertainty is determined by the proportion of the height statistical range [1.6, 1.8] meters, as shown in formulas (7) and (8). D_min=D_h×(1.6 / 1.7), (7), D_max=D_h×(1.8 / 1.7), (8), The first distance interval is formed by the minimum reliable distance measurement value D_min and the maximum reliable distance measurement value D_max.

[0063] In some embodiments, the device parameters include the ground clearance of the acquisition device; the method further includes: in response to determining that the terrain type is flat, determining a second positioning reference distance based on the total line-of-sight pitch angle and the ground clearance; determining a second distance interval based on the second positioning reference distance and a predetermined height interval of the target object; and determining second positioning information corresponding to the target object based on the device parameters, the frame coordinates, the horizontal angle, the second positioning reference distance, and the second distance interval.

[0064] In this embodiment, the terrain type refers to the actual terrain type of the land surface at the acquisition site of the captured images. Therefore, the terrain type can also be a flat land type. The flat land type is a flat terrain where the absolute value of the slope angle is within a first predetermined threshold (e.g., ≤3°). The surface of the flat land type has no significant undulations, and the pitch angle of the acquisition device is approximately 0, eliminating the need for vertical drop compensation and elevation calculation. A geometric anchoring correction mechanism is introduced for the flat land type, the specific process of which is as follows: Hard constraint establishment (geometric anchoring distance calculation): With "the height of the acquisition device above the ground is accurately known" as the hard constraint, a highly reliable geometric anchoring distance is calculated using geometric projection as the positioning center, and the distance range is generated by scaling the human height statistical interval. The focal length intrinsic parameter deviation only affects the result in a weak nonlinear way through the vertical angle of the line of sight. Based on the total pitch angle of the line of sight and the height above the ground, the second positioning reference distance is determined. The horizontal effective distance is directly solved by relying on the pitch angle and the height above the ground, so that the positioning reference value in the flat ground scene fits the actual surface space relationship, and ensures that the distance measurement result fits the real space distance on the flat ground. Using the height of the acquisition device above the ground H_cam and the total pitch angle φ, the horizontal distance D_geo from the bottom of the target to the acquisition device (i.e. the second positioning reference distance) is obtained by the trigonometric relationship, as shown in formula (9): D_geo=H_cam / tan(φ), (9), Since H_cam is derived from installation information (such as watchtower height) and can be accurately measured, D_geo no longer linearly depends on the focal length intrinsic parameter (the focal length is only determined by α_v=arctan((v...). c_y) / f_y) affects the total pitch angle φ in a weakly nonlinear way. Compared with direct optical ranging, its sensitivity to focal length is significantly reduced, and it has high reliability as the distance center for flat-ground positioning.

[0065] Determination of the second distance interval: Based on the second positioning reference distance and the predetermined height interval of the target object, the second distance interval is determined to attach a reasonable and reliable fluctuation range to the distance measurement results in the flat ground mode, and to quantify the normal measurement fluctuation caused by individual height differences. The uncertainty of D_geo mainly comes from the foot pixel positioning error, the pitch angle sensor error and the measurement error of the height of the acquisition device above the ground. Its relative magnitude can be characterized by the relative scale represented by the human height statistical interval. Based on the human height statistical interval [H_min, H_max] (1.6 meters to 1.8 meters in this embodiment, covering about 95% of adults) and the reference height H_ref (1.7 meters in this embodiment), the predetermined height interval of the target object is determined, and the geometric anchoring distance is scaled proportionally to obtain the upper and lower bounds of the distance uncertainty range, as shown in formulas (10) and (11): D_min=D_geo×(H_min / H_ref), (10), D_max=D_geo×(H_max / H_ref), (11), Centered on a highly reliable D_geo, this range retains approximately ±6% of the relative uncertainty scale, upgrading "single-point distance" to "distance interval". This mechanism is implemented entirely at the algorithm level, with zero hardware cost.

[0066] After the above processing, the positioning center output by the flat terrain process is the geometric anchoring distance D_geo, and the second distance interval is [D_min, D_max]. The corresponding output distance field is set to D_geo, and the elevation field is set to zero.

[0067] Based on device parameters, frame coordinates, horizontal angle, second positioning reference distance, and second distance interval, the second positioning information corresponding to the target object is determined. This second positioning information includes the latitude and longitude information of the target object. The solution method for the second positioning information is consistent with the overall calculation logic of the first positioning information, except that the altitude information is no longer calculated; only the latitude and longitude information is output. This ensures accurate determination of latitude and longitude information while also enabling the reuse of the underlying positioning algorithm framework.

[0068] This application introduces a geometric anchoring correction mechanism. In flat terrain scenarios, the final ranging result uses a highly reliable second positioning reference distance as the anchoring reference. Systematic deviations caused by the focal length intrinsic parameters of the acquisition device will only be corrected through the vertical angle α_v = arctan((v c_y) / f_y) has a slight, weakly nonlinear effect on the total pitch angle φ, and does not directly and linearly affect the final measured distance. This significantly improves the algorithm's tolerance to intrinsic parameter calibration errors of the acquisition equipment, and significantly reduces the dependence and sensitivity of the ground-based distance measurement results on the accuracy of the intrinsic parameters. It reduces the distance measurement error caused by a ±10% deviation in the intrinsic parameters from approximately ±10% in optical methods to approximately ±5% (the specific value varies depending on the pitch angle of the acquisition equipment and the target's position in the image), reduces sensitivity by approximately 40%, and requires zero hardware cost.

[0069] In some embodiments, the device parameters further include the device yaw angle, device latitude and longitude, and Earth radius; determining the first positioning information corresponding to the target object based on the device parameters, the frame coordinates, the horizontal angle, the first positioning reference distance, and the first distance interval includes: determining the absolute azimuth of the target object relative to true north based on the horizontal angle and the device yaw angle; determining the latitude and longitude of the target object based on the first positioning reference distance, the absolute azimuth angle, the device latitude and longitude, and the Earth radius; determining the azimuth half-width based on the frame coordinates and the device yaw angle; constructing a polygon based on the device latitude and longitude, the absolute azimuth angle, the azimuth half-width, and the first distance interval, and determining multiple latitude and longitude coordinates corresponding to the polygon; performing vertical decomposition on the first positioning reference distance to obtain a vertical drop, and determining the absolute altitude corresponding to the target object based on the vertical drop; and using the multiple latitude and longitude coordinates and the absolute altitude as the first positioning information.

[0070] In this embodiment, the absolute azimuth angle is determined: based on the horizontal angle and the device yaw angle, the absolute azimuth angle of the target object relative to true north is determined. The absolute azimuth angle of the target object relative to true north refers to the horizontal angle calculated by rotating clockwise from the geographic true north direction as the starting zero-degree reference to the line connecting the data acquisition device and the target. Calculating this absolute azimuth angle allows for accurate conversion of the latitude and longitude offset of the target object relative to the data acquisition device, combined with the first positioning reference distance. The horizontal angle α_h is converted to an angle and then superimposed with the data acquisition device yaw angle to obtain the absolute azimuth angle of the target object relative to true north, as shown in formula (12): B=(yaw+α_h_deg)mod360, (12), Among them, α_h_deg=α_h×(180 / π).

[0071] Calculate the target latitude and longitude: Based on the first positioning reference distance, absolute azimuth, equipment latitude and longitude, and Earth radius, determine the latitude and longitude of the target object. Starting from the positioning coordinates of the data acquisition equipment, calculate the target latitude and longitude along azimuth B. This invention uses the great circle route (spherical) formula to calculate the geographic coordinates, as shown in formulas (13) to (15): lat_t=arcsin(sin(lat_c)·cos(d)+cos(lat_c)·sin(d)·cos(B)), (13), lng_t=lng_c+arctan2(sin(B)·sin(d)·cos(lat_c),cos(d) sin(lat_c)·sin(lat_t)), (14), d=D / R,(15) Where lat_c and lng_c are the latitude and longitude (in radians) of the data acquisition device, D is the horizontal distance used for calculation (D_geo for flat terrain and D_h for mountainous terrain), R is the Earth's radius (6,371,000 meters), d is the angular distance, B is the absolute azimuth, and lat_t and lng_t are the latitude and longitude of the target object. In the flat terrain workflow, the distance field output is D_geo, and in the mountainous terrain workflow, the distance field output is D_h.

[0072] Based on the frame coordinates and the device yaw angle, the azimuth half-width is determined. The azimuth half-width w is derived from the uncertainty σ_yaw of the yaw angle sensor of the acquisition device and the uncertainty δu of the horizontal pixel positioning at the foot, so that the angular interval of near targets is automatically narrowed and the angular interval of far targets is reasonably expanded, as shown in formula (16): w=k·sqrt(σ_yaw²+((δu / f_x)·(180 / π))²), (16), Where σ_yaw is the standard deviation of the yaw angle sensor (degrees), δu is the uncertainty of the horizontal pixel positioning at the foot (pixels), f_x is the pixel focal length, and k is the coverage coefficient (in this embodiment, k≈2, corresponding to approximately 95% coverage; σ_yaw≈1°, δu≈3 pixels).

[0073] Generate a geographic error polygon: Based on the device's latitude and longitude, absolute azimuth, azimuth half-width, and first distance interval, construct a polygon. The four vertices of the polygon are determined by formulas (17) to (20): P1=Dest(origin, D_min, (B w)mod360), (17), P2=Dest(origin, D_min, (B+w)mod360), (18), P3=Dest(origin,D_max,(B+w)mod360), (19), P4 = Dest(origin, D_max, (B w)mod360), (20), Where D_min represents the minimum value of the first distance interval, D_max represents the maximum value of the first distance interval, origin is the geodetic latitude and longitude coordinates (location origin) of the data acquisition device, and Dest(origin, distance, bearing) represents the geographic coordinates of the point after calculating a specified distance from origin along a given azimuth angle. The vertices are arranged in the order of "near left - near right - far right - far left" to form a closed loop. This polygon upgrades "single-point positioning" to "confidence area", which can be overlaid on the map and supports hierarchical warnings (such as entering the outer ring warning, entering the inner ring alarm).

[0074] Multiple latitude and longitude coordinates corresponding to the polygon are determined and used as the positioning information of the target object. Using the observation point of the acquisition device as a reference, the latitude and longitude coordinates of each vertex of the target's circumscribed polygon in the geodetic coordinate system are calculated using the target's absolute azimuth and horizontal distance. Instead of using a single point to represent the pedestrian, the pedestrian's outer contour is enclosed as a closed polygon, and the latitude and longitude values ​​corresponding to each corner point of this polygon are calculated. This accurately reconstructs the actual area occupied by the pedestrian on the geographic plane, unlike the coarse mode of single-point positioning which only marks the center point, precisely depicting the target's actual contour, orientation, and spatial coverage on the ground plane. This application constructs a terrain-adaptive positioning mechanism, enabling the same algorithm system to be compatible with both flat and mountainous operating scenarios and to perform elevation constraint calculations differently: in flat terrain, the height of the acquisition device above the ground is used as a hard constraint for geometric conversion to solve the positioning problem; in mountainous terrain, the absolute altitude of the acquisition device is used as a hard constraint for elevation reference. Different elevation references are switched by determining the terrain type to achieve adaptive positioning output under a unified framework for both scenarios.

[0075] Altitude prediction: The distance to the first positioning reference is decomposed into vertical drop, as shown in formula (21): Δh=D_slant×sin(φ_m), (21), Where D_h is the horizontal projection distance (used for latitude and longitude calculation), and Δh is the vertical drop.

[0076] Based on the vertical drop, the absolute altitude of the target object is determined. The absolute altitude is obtained by subtracting the vertical drop from the absolute altitude of the data acquisition device, as shown in formula (22): alt_target=alt_cam–Δh, (22), Here, alt_cam represents the absolute altitude of the acquisition device. Therefore, this application simultaneously outputs the latitude, longitude, and altitude of the target in mountainous scenarios, achieving 3D geolocation. By solving for the vertical drop and then calculating the absolute altitude of the target pedestrian, and by performing a difference calculation based on the known absolute altitude of the acquisition device itself, the target altitude value can be obtained. This overcomes the limitation of only being able to obtain planar 2D latitude and longitude positioning in mountainous terrain, and fully calculates the 3D geographic coordinates of the target object.

[0077] It should be noted that the first positioning information can be further encapsulated into a standardized geographic coordinate data structure under the world coordinate system. The required fields may include: ① target unique identifier target_id; ② target three-dimensional geographic coordinates suspect_geo_location, which embeds three sub-parameters: latitude lat, longitude lng, and altitude alt. In flat terrain, the altitude field is not output or is set to 0. In mountainous terrain, the absolute altitude of the target is filled in by formula (22); ③ target detection confidence; ④ geographic error polygon suspect_region_polygon, used to characterize the actual geographic area occupied by the target; ⑤ calculation process details computation. The `ion_details` parameter contains the calculated distance (`calculated_depth`, which is `D_geo` for flat terrain and `D_h` for mountainous terrain), the straight-line slant distance from the device to the target (`straight_distance`), the target's absolute azimuth angle relative to true north (`bearing_angle`), and the ranging mode (`range_mode`, with optional enumerated values ​​including `Torso_Full` for the torso, `Torso_Left / Torso_Right` for one side of the torso, `Shoulders` for both shoulders, `Leg_Left / Leg_Right` for the legs, `Arm_Left / Arm_Right` for one side of the arm, and `BBox` for the detection box). As an expandable and optional feature, this positioning data package can also be overlaid with visual illustrations of target detection boxes, human keypoint skeletons, and overhead radar projections, combining quantitative positioning data results with intuitive image evidence.

[0078] This application can, on the one hand, quantify and output a reliable positioning error range and convert the error range into a polygonal data structure that can be directly called by a geographic information system (GIS); on the other hand, it can perform three-dimensional ray projection calculations based on the absolute altitude and pitch angle of the acquisition device in non-flat scenes such as mountains, and simultaneously calculate and output the latitude, longitude and altitude information of the target.

[0079] Upgrade of three-dimensional world coordinates: The overall solution only uses images acquired by a monocular camera and the inherent parameters of the acquisition device as input. For each pedestrian in the image, the latitude and longitude results in the world coordinate system are output in the flat scene. In the mountain scene, the calculated slant distance is decomposed into horizontal projection components and vertical height difference through three-dimensional ray projection. Combined with the absolute altitude of the acquisition device, the absolute altitude of the target and the geographical error area are additionally attached, thus upgrading the traditional two-dimensional positioning to three-dimensional world coordinate positioning. In the mountain case, the calculated slant distance is decomposed into horizontal projection components and vertical height difference through three-dimensional ray projection. Combined with the absolute altitude of the acquisition device, the target elevation is solved according to formula (22), so as to realize the synchronous output of three-dimensional geographic information of latitude, longitude and altitude, and get rid of the rigid dependence of the existing positioning scheme on the ground level.

[0080] GIS Confidence Area Polygon Positioning: Regardless of whether the calculation process is in flat or mountainous terrain, a unified geographic error polygon can be generated. This optimizes the coarse single-point positioning into confidence area polygon positioning that can be directly integrated with the GIS system, greatly improving the scene adaptability and result integrity of target positioning in complex terrain environments.

[0081] In some embodiments, the device parameters further include the device body pitch angle, the pixel focal length includes a horizontal pixel focal length and a vertical pixel focal length, and the image principal point includes an abscissa and a ordinate; determining the horizontal angle and the total line-of-sight pitch angle corresponding to the acquisition device based on the device parameters, the frame coordinates, the pixel focal length, and the image principal point includes: determining the bottom horizontal coordinate and bottom vertical coordinate of the target object based on the frame coordinates; determining the horizontal angle based on the horizontal pixel focal length, the bottom horizontal coordinate, and the abscissa of the image principal point; determining the vertical angle based on the vertical pixel focal length, the bottom vertical coordinate, and the ordinate of the image principal point; and determining the total line-of-sight pitch angle based on the device body pitch angle and the vertical angle.

[0082] In this embodiment, the bottom pixel coordinates are determined: based on the bounding box coordinates, the bottom horizontal and bottom vertical coordinates of the target object are determined, and the pixel position of the midpoint of the bottom edge of the target detection box approximates the actual ground landing point of the pedestrian's foot. For example, the bottom horizontal coordinate of the target object is obtained by adding half the width of the box to the horizontal coordinate of the top left corner of the detection box; the bottom vertical coordinate of the target object is obtained by adding the height of the box to the vertical coordinate of the top left corner of the detection box.

[0083] Determine the horizontal and vertical angles: Based on the horizontal pixel focal length, the bottom horizontal coordinates, and the x-coordinate of the image's principal point, determine the horizontal angle. The horizontal angle is determined using the following formula: α_h = arctan((u c_x) / f_x), (23), where u is the bottom horizontal coordinate, c_x is the horizontal coordinate of the principal point of the image, and f_x is the horizontal pixel focal length.

[0084] The vertical angle is determined based on the vertical pixel focal length, the bottom vertical coordinate, and the ordinate of the image principal point. The vertical angle is determined using the following formula: α_v = arctan((v c_y) / f_y), (24), where v is the bottom vertical coordinate, c_y is the ordinate of the principal point of the image, and f_y is the vertical pixel focal length.

[0085] Based on the pinhole imaging model and calibration parameters of the acquisition device, the two-dimensional pixel offset of the image is calculated into the spatial horizontal and vertical deflection angles of the target object relative to the optical axis of the acquisition device, thus completing the mapping from the pixel coordinate system to the three-dimensional line-of-sight angle of the acquisition device.

[0086] Determine the total line-of-sight pitch angle: Based on the device's pitch angle and vertical angle, determine the total line-of-sight pitch angle. Compensate for the pitch angle of the fixed hardware of the acquisition device with the vertical angle of the target object relative to the optical axis to obtain the true total line-of-sight pitch angle pointing from the acquisition device to the ground landing point of the target object, eliminating angular system errors caused by the device's installation posture. The total line-of-sight pitch angle is determined using the following formula: φ = pitch+α_v, (25), where pitch is the device's pitch angle. It should be noted that, in response to determining that the terrain type is mountainous, or in response to determining that the terrain type is flat, the positioning process of the target is terminated in response to determining that the total pitch angle of the line of sight is less than or equal to a predetermined radian. For example, when φ≤0.01 radians, it indicates that the line of sight is approximately horizontal or upward, and cannot intersect with the ground plane to solve the horizontal distance, thus terminating the positioning process of the target.

[0087] In another embodiment, this application significantly improves the system's terrain adaptability through a terrain-adaptive dual-branch architecture. The same algorithm is compatible with various working conditions, including flat land, mountains, and slopes. In flat land scenarios, the height of the acquisition device above the ground is used as a hard constraint for positioning, while in mountainous scenarios, the absolute altitude of the acquisition device is used as a hard constraint. This maintains effective positioning accuracy within a certain slope angle range, extending the original application boundary, which was only applicable to flat land, to all terrain environments, including flat land, mountains, and slopes. The entire process takes a single monitoring image as input, first completing the detection and recognition of pedestrian targets within the image, then adaptively scheduling the corresponding ranging and positioning logic according to the terrain type, and finally calculating the real geographic spatial coordinates of each pedestrian in the image. For flat land, latitude and longitude information is output, while for mountainous land, the absolute altitude of the target is additionally included, and a reliable positioning error range is output simultaneously. The overall process can be found in the appendix. Figure 2The execution process is as follows: In flat terrain, the positioning process relies on the hard constraint of the data acquisition device's height above the ground to solve for the geometric anchoring distance as the positioning reference center. This is then combined with scaling the statistical interval of human height to obtain the distance fluctuation range. Systematic deviations caused by the data acquisition device's focal length intrinsic parameters can only cause minor disturbances to the final result through a weakly nonlinear path via the vertical angle of the line of sight, effectively reducing the algorithm's sensitivity to the accuracy of intrinsic parameter calibration. In mountainous terrain, the positioning process first performs human posture estimation on the target pedestrian. It employs a multi-tiered cascaded screening strategy based on key point confidence, automatically selecting the measurement reference segment with the highest confidence from the effective segments of the torso (both sides / one side), the composite-verified shoulder width, thigh, upper arm, and the overall target detection boundary box to complete the line-of-sight calculation. Then, a three-dimensional ray casting algorithm is used to simultaneously output the target's latitude, longitude, and absolute altitude in the world coordinate system.

[0088] Furthermore, based on the ranging range and considering the measurement uncertainty of the yaw angle sensor and the pixel positioning uncertainty, this application adaptively derives the azimuth half-width parameter, further generating a geographic error polygon confidence region that can be directly integrated with a GIS system. In summary, this terrain-adaptive dual-branch design not only reduces equipment deployment costs and dependence on the intrinsic parameters of the data acquisition equipment, and enhances the robustness of attitude calculation under conditions of human occlusion and partial truncation, but also achieves full coverage expansion of positioning scenarios from single plains to complex undulating terrains such as mountains.

[0089] In another embodiment, such as Figure 2 As shown, Figure 2 This is a flowchart illustrating a method for locating a target object according to another embodiment of this application. This flowchart shows the complete execution flow of a method for geolocation of pedestrians in complex terrain based on monocular vision. In this embodiment, the acquisition device is a camera, and the overall input conditions are a surveillance image, camera installation information, and the on-site terrain. The specific execution steps are as follows: First, target detection is performed on the input surveillance image to identify all pedestrians in the scene and generate a detection bounding box for each pedestrian. Branching is then performed based on the pre-labeled terrain type, resulting in two adaptive parallel processing links: flat ground ranging and mountain ranging, compatible with flat ground, mountainous terrain, and slopes within ±30 degrees.

[0090] I. Flat terrain processing branch Ground-based distance measurement uses the camera's height above the ground as a known hard constraint for calculation. By combining the camera's line of sight to the pedestrian's feet with the height above the ground, a highly reliable geometric anchoring distance can be obtained.

[0091] The optical distance is then obtained by combining the camera's focal length with the standard human height. The optical distance is then corrected using geometric anchoring distance to offset the measurement error caused by the focal length parameter deviation. At the same time, a reasonable range of distance fluctuation is obtained by scaling based on the statistical range of adult height.

[0092] This branch ultimately outputs the horizontal distance between the pedestrian and the camera, as well as the corresponding reliable distance range.

[0093] II. Mountainous Terrain Processing Branch Mountain range finding uses the camera's actual altitude as a known hard constraint. It first estimates the human posture of pedestrians and extracts key points of the human skeleton such as shoulders, hips, knees, and elbows.

[0094] Based on the confidence and clarity of each key point, the system automatically selects the most stable and reliable human body segments in the image as the ranging basis according to the priority hierarchy of torso, shoulder width, thigh, and upper arm. If all skeletal segments do not meet the conditions, the overall bounding box of the pedestrian is used as a fallback.

[0095] Based on the actual physical length of the selected reference segment and the pixel length of the image, the slant distance from the camera to the pedestrian is calculated by combining the camera's pitch angle. The slant distance is then broken down into horizontal distance and vertical height difference. The horizontal distance is used to calculate latitude and longitude, and the vertical height difference is used to convert the target's altitude.

[0096] This branch ultimately outputs the pedestrian's horizontal distance relative to the camera, the target's altitude, and the corresponding reliable distance range.

[0097] III. Universal Post-Calculation Steps for All Terrain After outputting the horizontal distances for both flat and mountainous terrain, the straight-line horizontal distances are converted into true north azimuth angles by combining the camera's own orientation information.

[0098] Starting from the known latitude and longitude coordinates of the camera, the latitude and longitude coordinates of the traveler in the real geographical space are calculated along the calculated azimuth angle.

[0099] The azimuth angle floating half-width is adaptively determined by considering the deviation of the upper and lower limits of the distance, the error of the azimuth sensor, and the pixel positioning error. A trapezoidal error area is drawn on the map to represent the credible range of the most likely geographical location of the pedestrian.

[0100] IV. Final Result Output The system ultimately outputs the following positioning results: the geographic latitude and longitude of the pedestrian, with additional target elevation values ​​for mountainous scenes. It also outputs a trapezoidal reliable region representing location uncertainty and marks the flatland or mountainous ranging mode used for this positioning. The entire solution significantly improves terrain adaptability through a terrain-adaptive dual-branch design, reduces equipment deployment costs and camera intrinsic parameter dependence, and enhances measurement stability in scenarios with partial human occlusion and image truncation.

[0101] It should be noted that the method in this embodiment can be executed by a single device, such as a computer or server. The method can also be applied in a distributed scenario, where multiple devices cooperate to complete the task. In such a distributed scenario, one of these devices may execute only one or more steps of the method in this embodiment, and the multiple devices will interact with each other to complete the method described.

[0102] It should be noted that some embodiments of this application have been described above. In some cases, the actions or steps described in the above embodiments can be performed in a different order than that shown in the above embodiments and the desired result can still be achieved. In addition, the processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0103] Based on the same inventive concept, corresponding to any of the above embodiments, this application also provides a device for locating a target object.

[0104] refer to Figure 3 The device for locating the target object includes: The generation module 10 is configured to acquire device parameters and acquired images corresponding to the acquisition device, and in response to determining that a target object exists in the acquired image, generate a target acquired image containing a first detection result, wherein the first detection result includes the coordinates of the bounding box corresponding to the bounding box surrounding the target object.

[0105] The first determining module 20 is configured to acquire the terrain type, pixel focal length and image principal point corresponding to the acquired image, and determine the horizontal angle and total line-of-sight pitch angle corresponding to the acquisition device based on the device parameters, the frame coordinates, the pixel focal length and the image principal point.

[0106] Extraction module 30 is configured to extract key points from the target object based on the bounding box coordinates in response to determining that the terrain type is mountainous, thereby obtaining at least one key point coordinate.

[0107] The second determining module 40 is configured to determine a first positioning reference distance of the target object relative to the acquisition device based on the device parameters, the total pitch angle of the line of sight and the coordinates of the at least one key point, and to determine a first distance interval from the target object to the acquisition device based on the first positioning reference distance.

[0108] The third determining module 50 is configured to determine the first positioning information corresponding to the target object based on the device parameters, the frame coordinates, the horizontal angle, the first positioning reference distance, and the first distance interval.

[0109] Using the aforementioned device, the device parameters and acquired images corresponding to the acquisition device are obtained. In response to determining the presence of a target object in the acquired image, a target acquisition image containing a first detection result is generated. This first detection result includes the coordinates of the bounding box surrounding the target object, accurately and intuitively presenting the pixel position of the target object within the image. The terrain type, pixel focal length, and image principal point corresponding to the acquired image are obtained. Based on the device parameters, the bounding box coordinates, the pixel focal length, and the image principal point, the horizontal angle and total viewing angle corresponding to the acquisition device are determined. The two-dimensional pixel offset of the target object in the acquired image is converted into a quantifiable spatial angle value, accurately quantifying the horizontal deflection and vertical pitch of the shooting lens relative to the target, achieving precise quantitative representation of the image pixel position to the actual viewing angle. In response to determining that the terrain type is mountainous, key points are extracted from the target object based on the bounding box coordinates, obtaining at least one key point coordinate, which can accurately locate key points on the target object that can be used for distance measurement. Based on the device parameters, the total line-of-sight pitch angle, and the coordinates of at least one key point, a first positioning reference distance of the target object relative to the acquisition device is determined, ensuring the accuracy of the first positioning reference distance. Furthermore, based on the first positioning reference distance, a first distance interval from the target object to the acquisition device is determined, making the first distance interval reasonable. Based on the device parameters, the frame coordinates, the horizontal angle, the first positioning reference distance, and the first distance interval, first positioning information corresponding to the target object is determined, effectively improving the reliability and accuracy of positioning results in complex, undulating terrain scenarios.

[0110] In some embodiments, the extraction module 30 is further configured to: expand and crop the bounding box in the target acquisition image according to a predetermined ratio to obtain a cropped image containing the target object; extract pose points from the cropped image using a pre-built pose estimation model to obtain the detection confidence and local coordinates corresponding to each pose point; translate and convert the local coordinates corresponding to each pose point into global coordinates on the target acquisition image according to the predetermined ratio; and perform multiple rounds of key point filtering operations based on the bounding box coordinates, as well as the detection confidence and global coordinates corresponding to each pose point to obtain the coordinates of the at least one key point.

[0111] In some embodiments, the extraction module 30 is further configured to classify all attitude points according to their respective categories to obtain multiple types of attitude point combinations; sort the multiple types of attitude point combinations from high to low according to a preset importance level to obtain a set containing multiple attitude point combinations; take the first attitude point combination in the set as the combination to be detected, and perform the following key point screening operation in each round: in response to determining that there are no attitude points in the combination to be detected with a detection confidence level less than or equal to a predetermined confidence level, determine the first Euclidean distance corresponding to the combination to be detected based on the type corresponding to the combination to be detected; in response to determining that the first Euclidean distance is less than or equal to a predetermined Euclidean distance, or, in response to determining that there is an attitude point in the combination to be detected with a detection confidence level less than or equal to the predetermined Euclidean distance, the first Euclidean distance corresponding to the combination to be detected is determined; in response to determining that there is an attitude point in the combination to be detected with a detection confidence level less than or equal to the predetermined Euclidean distance, the first Euclidean distance is determined; in response to determining that there is an attitude point in the combination to be detected with a detection confidence level less than or equal to the predetermined Euclidean distance, the first Euclidean distance is determined; and ... The confidence level of the attitude points determines whether the combination to be detected has an adjacent next attitude point combination in the set, wherein the predetermined Euclidean distance is determined according to the type corresponding to the combination to be detected; in response to determining that the adjacent next attitude point combination exists, the adjacent next attitude point combination is used as the combination to be detected in the next round of key point filtering operation, and the next round of key point filtering operation is executed; in response to determining that the first Euclidean distance is greater than the predetermined Euclidean distance, the global coordinates corresponding to each attitude point in the combination to be detected are used as the coordinates of the at least one key point, and at least one round of key point filtering operation is exited; in response to determining that the adjacent next attitude point combination does not exist, the bounding box coordinates are used as the coordinates of the at least one key point, and at least one round of key point filtering operation is exited.

[0112] In some embodiments, the second determining module 40 is further configured to, in response to determining that the coordinates of the at least one key point are global coordinates corresponding to each attitude point in the detection combination, determine a first predetermined local length of the target object based on the type corresponding to the detection combination; determine a first positioning reference distance based on the device parameters, a first Euclidean distance, the first predetermined local length, and a predetermined compensation factor; in response to determining that the coordinates of the at least one key point are the bounding box coordinates, determine a second Euclidean distance based on the bounding box coordinates, and obtain a second predetermined local length of the target object; determine the first positioning reference distance based on the device parameters, the second Euclidean distance, the second predetermined local length, and the predetermined compensation factor; and determine a first distance interval based on the first positioning reference distance and a predetermined height interval of the target object.

[0113] In some embodiments, the device parameters include the ground clearance of the acquisition device; the device further includes a fourth determining module, the fourth determining module being configured to, in response to determining that the terrain type is flat, determine a second positioning reference distance based on the total line-of-sight pitch angle and the ground clearance; determine a second distance interval based on the second positioning reference distance and a predetermined height interval of the target object; and determine second positioning information corresponding to the target object based on the device parameters, the frame coordinates, the horizontal angle, the second positioning reference distance, and the second distance interval.

[0114] In some embodiments, the device parameters further include the device yaw angle, device latitude and longitude, and Earth radius; the third determining module 50 is further configured to: determine the absolute azimuth of the target object relative to true north based on the horizontal angle and the device yaw angle; determine the latitude and longitude of the target object based on the first positioning reference distance, the absolute azimuth angle, the device latitude and longitude, and the Earth radius; determine the azimuth half-width based on the frame coordinates and the device yaw angle; construct a polygon based on the device latitude and longitude, the absolute azimuth angle, the azimuth half-width, and the first distance interval; and determine multiple latitude and longitude coordinates corresponding to the polygon; perform vertical decomposition on the first positioning reference distance to obtain a vertical drop, and determine the absolute altitude corresponding to the target object based on the vertical drop; and use the multiple latitude and longitude coordinates and the absolute altitude as the first positioning information.

[0115] In some embodiments, the device parameters further include the device body pitch angle, the pixel focal length includes a horizontal pixel focal length and a vertical pixel focal length, and the image principal point includes an abscissa and a ordinate; the first determining module 20 is further configured to determine the bottom horizontal coordinate and bottom vertical coordinate corresponding to the target object based on the frame coordinates; determine the horizontal angle based on the horizontal pixel focal length, the bottom horizontal coordinate and the abscissa of the image principal point, and determine the vertical angle based on the vertical pixel focal length, the bottom vertical coordinate and the ordinate of the image principal point; and determine the total line-of-sight pitch angle based on the device body pitch angle and the vertical angle.

[0116] For ease of description, the above devices are described in terms of function, divided into various modules. Of course, in implementing this application, the functions of each module can be implemented in one or more software and / or hardware.

[0117] The apparatus of the above embodiments is used to implement the corresponding method for locating the target object in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0118] Based on the same inventive concept, corresponding to the methods of any of the above embodiments, this application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method for locating a target object as described in any of the above embodiments.

[0119] Figure 4 This embodiment illustrates a more specific hardware structure of an electronic device. The device may include a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, memory 1020, input / output interface 1030, and communication interface 1040 are interconnected internally via the bus 1050.

[0120] The processor 1010 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0121] The memory 1020 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program code is stored in the memory 1020 and is called and executed by the processor 1010.

[0122] The input / output interface 1030 is used to connect input / output modules to realize information input and output. The input / output modules can be configured as components in the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touch screens, microphones, various sensors, etc., and output devices may include displays, speakers, vibrators, indicator lights, etc.

[0123] The communication interface 1040 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0124] Bus 1050 includes a pathway for transmitting information between various components of the device, such as processor 1010, memory 1020, input / output interface 1030, and communication interface 1040.

[0125] It should be noted that although the above-described device only shows the processor 1010, memory 1020, input / output interface 1030, communication interface 1040, and bus 1050, in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the embodiments of this specification, and not necessarily all the components shown in the figures.

[0126] The electronic devices described above are used to implement the corresponding methods for locating target objects in any of the foregoing embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0127] Based on the same inventive concept, corresponding to the methods of any of the above embodiments, this application also provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the method for locating a target object as described in any of the above embodiments.

[0128] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by 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 memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical 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.

[0129] The computer instructions stored in the storage medium of the above embodiments are used to cause the computer to execute the method for locating the target object as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0130] Based on the same concept, corresponding to the methods of any of the above embodiments, this application also provides a computer program product, including computer program instructions, which, when run on a computer, cause the computer to perform the method for locating a target object as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0131] It is understood that before using the technical solutions of the various embodiments in this disclosure, users will be informed of the type, scope of use, and usage scenarios of the personal information involved in an appropriate manner, and user authorization will be obtained.

[0132] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose, based on the prompt message, whether to provide personal information to the software or hardware such as electronic devices, applications, servers, or storage media performing the operations of this disclosed technical solution.

[0133] As an optional but not limited implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0134] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.

[0135] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of this application is limited to these examples; under the concept of this application, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of the embodiments of this application as described above, which are not provided in detail for the sake of brevity.

[0136] Additionally, to simplify the description and discussion, and to avoid obscuring the embodiments of this application, the well-known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided drawings. Furthermore, the apparatus may be shown in block diagram form to avoid obscuring the embodiments of this application, and this also takes into account the fact that the details of the implementation of these block diagram apparatuses are highly dependent on the platform on which the embodiments of this application will be implemented (i.e., these details should be fully understood by those skilled in the art). While specific details (e.g., circuits) have been set forth to describe exemplary embodiments of this application, it will be apparent to those skilled in the art that the embodiments of this application can be implemented without these specific details or with variations thereof. Therefore, these descriptions should be considered illustrative rather than restrictive.

[0137] Although this application has been described in conjunction with specific embodiments thereof, many substitutions, modifications, and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may be used with the embodiments discussed.

[0138] The embodiments of this application are intended to cover all such substitutions, modifications, and variations that fall within the broad scope of this application. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the embodiments of this application should be included within the protection scope of this application.

Claims

1. A method for locating a target object, characterized in that, include: The device parameters and acquired images corresponding to the acquisition device are obtained. In response to determining that a target object exists in the acquired image, a target acquisition image containing a first detection result is generated, wherein the first detection result includes the bounding box coordinates corresponding to the bounding box surrounding the target object. Obtain the terrain type, pixel focal length, and image principal point corresponding to the acquired image. Based on the device parameters, the frame coordinates, the pixel focal length, and the image principal point, determine the horizontal angle and total line-of-sight pitch angle corresponding to the acquisition device. In response to determining that the terrain type is mountainous, key points are extracted from the target object based on the bounding box coordinates to obtain at least one key point coordinate; Based on the device parameters, the total pitch angle of the line of sight, and the coordinates of at least one key point, a first positioning reference distance of the target object relative to the acquisition device is determined, and based on the first positioning reference distance, a first distance interval from the target object to the acquisition device is determined; Based on the device parameters, the frame coordinates, the horizontal angle, the first positioning reference distance, and the first distance interval, the first positioning information corresponding to the target object is determined.

2. The method according to claim 1, characterized in that, The step of extracting key points from the target object based on the bounding box coordinates to obtain at least one key point coordinate includes: The bounding box in the target acquired image is expanded outward according to a predetermined ratio and then cropped to obtain a cropped image containing the target object; Using a pre-built pose estimation model, pose points are extracted from the cropped image to obtain the detection confidence and local coordinates corresponding to each pose point; According to the predetermined ratio, the local coordinates corresponding to each attitude point are translated and converted into global coordinates on the target acquired image; Based on the frame coordinates, as well as the detection confidence and global coordinates corresponding to each pose point, multiple rounds of key point filtering operations are performed to obtain the coordinates of at least one key point.

3. The method according to claim 2, characterized in that, The process of performing multiple rounds of keypoint filtering based on the bounding box coordinates, the detection confidence score and global coordinates corresponding to each pose point, to obtain the coordinates of at least one keypoint includes: All attitude points are classified according to their categories, resulting in various types of attitude point combinations; The various types of attitude point combinations are sorted from high to low according to a preset importance order to obtain a set containing multiple attitude point combinations; The first pose point combination in the set is taken as the combination to be detected, and the key point filtering operation is performed as follows in each round: In response to determining that there are no attitude points in the combination to be detected with a detection confidence level less than or equal to a predetermined confidence level, a first Euclidean distance corresponding to the combination to be detected is determined based on the type corresponding to the combination to be detected. In response to determining that the first Euclidean distance is less than or equal to a predetermined Euclidean distance, or in response to determining that there is an attitude point in the combination to be detected with a detection confidence level less than or equal to the predetermined confidence level, it is determined whether there is an adjacent next attitude point combination in the set for the combination to be detected, wherein the predetermined Euclidean distance is determined according to the type corresponding to the combination to be detected. In response to determining the existence of the adjacent next attitude point combination, the adjacent next attitude point combination is used as the combination to be detected in the next round of key point screening operation, and the next round of key point screening operation is executed. In response to determining that the first Euclidean distance is greater than the predetermined Euclidean distance, the global coordinates corresponding to each attitude point in the combination to be detected are used as the coordinates of the at least one key point, and at least one round of key point filtering operation is exited. In response to determining that there is no adjacent next pose point combination, the frame coordinates are used as the coordinates of the at least one key point, and at least one round of key point filtering operation is exited.

4. The method according to claim 3, characterized in that, The process of determining a first positioning reference distance of the target object relative to the acquisition device based on the device parameters, the total line-of-sight pitch angle, and the coordinates of at least one key point, and determining a first distance interval from the target object to the acquisition device based on the first positioning reference distance, includes: In response to determining that the coordinates of the at least one key point are the global coordinates corresponding to each pose point in the combination to be detected, a first predetermined local length of the target object is determined based on the type corresponding to the combination to be detected. Based on the device parameters, the first Euclidean distance, the first predetermined local length, and the predetermined compensation factor, the first positioning reference distance is determined. In response to determining the coordinates of the at least one key point as the bounding box coordinates, a second Euclidean distance is determined based on the bounding box coordinates, and a second predetermined local length of the target object is obtained; Based on the device parameters, the second Euclidean distance, the second predetermined local length, and the predetermined compensation factor, the first positioning reference distance is determined; The first distance range is determined based on the first positioning reference distance and the predetermined height range of the target object.

5. The method according to claim 1, characterized in that, The device parameters include the ground clearance of the data acquisition device; the method further includes: In response to determining that the terrain type is flat, a second positioning reference distance is determined based on the total line-of-sight pitch angle and the height above the ground; Based on the second positioning reference distance and the predetermined height range of the target object, a second distance range is determined; Based on the device parameters, the frame coordinates, the horizontal angle, the second positioning reference distance, and the second distance interval, the second positioning information corresponding to the target object is determined.

6. The method according to claim 1, characterized in that, The equipment parameters also include the equipment yaw angle, equipment latitude and longitude, and Earth radius; The step of determining the first positioning information corresponding to the target object based on the device parameters, the frame coordinates, the horizontal angle, the first positioning reference distance, and the first distance interval includes: Based on the horizontal angle and the equipment yaw angle, determine the absolute azimuth of the target object relative to true north; Based on the first positioning reference distance, the absolute azimuth angle, the device latitude and longitude, and the Earth's radius, the latitude and longitude of the target object are determined. Based on the frame coordinates and the device yaw angle, determine the azimuth half-width; Based on the device's latitude and longitude, the absolute azimuth, the azimuth half-width, and the first distance interval, a polygon is constructed, and multiple latitude and longitude coordinates corresponding to the polygon are determined; The first positioning reference distance is vertically decomposed to obtain the vertical drop, and the absolute altitude corresponding to the target object is determined based on the vertical drop. The multiple latitude and longitude coordinates and the absolute altitude are used as the first positioning information.

7. The method according to claim 1, characterized in that, The device parameters also include the device body pitch angle, the pixel focal length includes the horizontal pixel focal length and the vertical pixel focal length, and the image principal point includes the horizontal coordinate and the vertical coordinate; The determination of the horizontal angle and total line-of-sight pitch angle corresponding to the acquisition device based on the device parameters, the frame coordinates, the pixel focal length, and the image principal point includes: Based on the frame coordinates, determine the bottom horizontal coordinates and bottom vertical coordinates of the target object; Based on the horizontal pixel focal length, the bottom horizontal coordinate and the abscissa of the image principal point, the horizontal angle is determined; and based on the vertical pixel focal length, the bottom vertical coordinate and the ordinate of the image principal point, the vertical angle is determined. The total line-of-sight pitch angle is determined based on the device body pitch angle and the vertical angle.

8. A device for locating a target object, characterized in that, include: The generation module is configured to acquire device parameters and acquired images corresponding to the acquisition device, and in response to determining that a target object exists in the acquired image, generate a target acquired image containing a first detection result, wherein the first detection result includes the bounding box coordinates corresponding to the bounding box surrounding the target object; The first determining module is configured to acquire the terrain type, pixel focal length and image principal point corresponding to the acquired image, and determine the horizontal angle and total line-of-sight pitch angle corresponding to the acquisition device based on the device parameters, the frame coordinates, the pixel focal length and the image principal point; The extraction module is configured to extract key points from the target object based on the bounding box coordinates in response to determining that the terrain type is mountainous, thereby obtaining at least one key point coordinate. The second determining module is configured to determine a first positioning reference distance of the target object relative to the acquisition device based on the device parameters, the total pitch angle of the line of sight and the coordinates of the at least one key point, and to determine a first distance interval from the target object to the acquisition device based on the first positioning reference distance. The third determining module is configured to determine the first positioning information corresponding to the target object based on the device parameters, the frame coordinates, the horizontal angle, the first positioning reference distance, and the first distance interval.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the method described in any one of claims 1 to 7.