Ranging method and correlation analysis method and device for target detection frame

CN122617954APending Publication Date: 2026-08-21ROUTON ELECTRONICS CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610622141.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-08
Publication Date
2026-08-21

AI Technical Summary

Technical Problem

[0004]本发明提供一种目标检测框的测距方法和关联关系分析方法及装置,用以解决现有技术中单一维度的度量方案难以在目标位置接近但尺寸差异较大时做出准确判断的缺陷

Benefits of technology

[0015]本发明还提供一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时实现如上述任一种所述目标检测框的测距方法,或所述目标检测框的关联关系分析方法。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122617954A_ABST
    Figure CN122617954A_ABST
Patent Text Reader

Abstract

The application provides a target detection frame ranging method and a correlation analysis method and device, the method comprising: obtaining the center coordinates and the width and height of the target frame, weighting the width and height difference; combining the center position and the weighted difference to calculate the composite distance; using the average scale to normalize it, and outputting the final ranging result. The method provided by the application calculates the center point position difference, the original width difference and the original height difference of two target detection frames to be measured, introduces width weight and height weight for weighting to obtain the composite distance, finally uses the average scale based on the size information to normalize the composite distance to output the ranging result, realizes the deep fusion and adaptive adjustment of the target size and proportional change in the spatial position difference measurement, overcomes the limitation of the traditional single distance measurement, effectively compatible with the matching judgment of large targets and small targets, significantly improves the accuracy and robustness of target correlation and tracking, and has small calculation overhead.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer vision technology, and in particular to a method and apparatus for measuring the distance of a target detection box and for analyzing its correlation. Background Technology

[0002] With the widespread application of target detection and tracking systems in numerous practical scenarios such as autonomous driving, intelligent security, and crowd re-identification, accurately and efficiently measuring the distance between different target detection boxes is fundamental to determining whether multiple detection boxes belong to the same object in multi-target tracking and target association tasks. To ensure the continuity of the tracking trajectory and the robustness of the system, it is necessary to objectively and accurately quantify the degree of association between targets in various dynamic and complex video scenes. In existing target detection and tracking systems, the target association process typically relies on a single-dimensional distance metric for matching judgments, such as the Euclidean distance between target center points or the intersection-union ratio (IUU) between detection boxes.

[0003] However, the aforementioned single-dimensional measurement schemes are difficult to make accurate judgments when the target locations are close but the size differences are large, which often leads to the risk of association failure in complex and ever-changing real-world application scenarios. Summary of the Invention

[0004] This invention provides a method for measuring the distance of a target detection box and a method and apparatus for analyzing correlation relationships, in order to solve the shortcomings of existing single-dimensional measurement schemes that are difficult to make accurate judgments when the target positions are close but the size differences are large.

[0005] This invention provides a method for measuring the distance of a target detection box, comprising: Obtain the size information and center point coordinates of the target detection box to be measured; the size information includes width and height. Obtain the width weight and height weight, and based on the width weight and height weight, weight the original width difference and original height difference between the detection boxes of the target to be measured, respectively, to obtain the weighted width difference and weighted height difference; Based on the positional differences between the center point coordinates of the target detection box to be measured, the composite distance is obtained by combining the weighted width difference and the weighted height difference. Based on the size information of the target detection box to be measured, an average scale is calculated, and the composite distance is normalized based on the average scale to obtain the ranging result of the target detection box to be measured.

[0006] According to a method for measuring the distance of a target detection box provided by the present invention, the step of normalizing the composite distance based on the average scale to obtain the distance measurement result of the target detection box to be measured includes: The width and height of the target detection box to be measured are subjected to scale fusion processing to obtain the average scale; A scale adjustment term is constructed using the average scale and the preset smoothing coefficient; Based on the scale adjustment term, the composite distance is scaled proportionally to obtain the distance measurement result.

[0007] According to a target detection bounding box ranging method provided by the present invention, the composite distance is obtained by comprehensively calculating the composite distance based on the positional difference between the center point coordinates of the target detection bounding box to be ranging, combined with the weighted width difference and the weighted height difference, including: Extract the spatial deviation features of the center point coordinates of the target detection box to be measured along each coordinate axis; The spatial distance is calculated by performing spatial distance measurement on the spatial deviation characteristics, the weighted width difference, and the weighted height difference to obtain the composite distance.

[0008] According to a target detection box ranging method provided by the present invention, the step of obtaining the coordinates of the center point of the target detection box to be ranging includes: Obtain the coordinates of the edge corner points of the target detection box to be measured; The offset of the center point relative to the edge corner point is determined based on the size information; The coordinates of the center point are obtained by spatial mapping using the coordinates of the edge corner points and the offset.

[0009] This invention also provides a method for analyzing the correlation of target detection boxes, comprising: Obtain the bounding box of the target to be analyzed and the preset distance threshold; Based on the above-described target detection box ranging method, the ranging result of the target detection box to be analyzed is obtained; The ranging results are compared with the preset distance threshold to analyze the correlation relationship of the target detection box to be analyzed.

[0010] According to the method for analyzing the correlation of target detection boxes provided by the present invention, the preset distance threshold is preset based on the application scenario of the target detection box to be analyzed.

[0011] The present invention also provides a ranging device for a target detection box, comprising: The first acquisition unit acquires the size information and center point coordinates of the target detection box to be measured; the size information includes width and height. The weighting unit obtains the width weight and the height weight, and based on the width weight and the height weight, weights the original width difference and the original height difference between the detection boxes of the target to be measured, respectively, to obtain the weighted width difference and the weighted height difference. The comprehensive calculation unit performs a comprehensive calculation based on the positional differences between the center point coordinates of the target detection box to be measured, combined with the weighted width difference and the weighted height difference, to obtain the composite distance. The first ranging unit calculates an average scale based on the size information of the target detection box to be measured, and then normalizes the composite distance based on the average scale to obtain the ranging result of the target detection box to be measured.

[0012] The present invention also provides a device for analyzing the correlation of target detection boxes, comprising: The second acquisition unit acquires the target detection box to be analyzed and a preset distance threshold. The second ranging unit obtains the ranging result of the target detection box to be analyzed based on the above-mentioned ranging method of the target detection box; The correlation analysis unit compares the ranging result with the preset distance threshold to analyze and obtain the correlation relationship of the target detection box to be analyzed.

[0013] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements a ranging method for a target detection box as described above, or a correlation analysis method for the target detection box.

[0014] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a ranging method for a target detection box as described above, or a correlation analysis method for the target detection box.

[0015] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements a ranging method for a target detection box as described above, or a correlation analysis method for the target detection box.

[0016] The target detection box ranging method and correlation analysis method and apparatus provided by this invention calculate the difference in center point position, original width difference, and original height difference between two target detection boxes to be measured, and introduce width weight and height weight to obtain a composite distance. Finally, the composite distance is normalized by using the average scale derived from size information to output the ranging result. This achieves deep fusion and adaptive adjustment of target size and scale changes in spatial position difference measurement, overcomes the limitations of traditional single distance measurement, effectively supports matching judgment of large and small targets, significantly improves the accuracy and robustness of target association and tracking, and has low computational overhead. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0018] Figure 1 This is a flowchart illustrating the ranging method for the target detection box provided by the present invention; Figure 2 A flowchart illustrating the correlation analysis method for target detection boxes provided by this invention; Figure 3 This is a schematic diagram of the ranging device for the target detection frame provided by the present invention; Figure 4 This is a schematic diagram of the structure of the target detection box association analysis device provided by the present invention; Figure 5 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0020] Existing target association technologies typically rely on a single distance metric, such as the Euclidean distance between target center points or the intersection-union ratio (IU / I) between bounding boxes. This makes it difficult to make accurate judgments when targets are close in location but differ significantly in size. To address this issue, this invention provides a distance measurement method for target bounding boxes, achieving higher accuracy and more robust distance calculation. This method can be applied to visual scenarios such as multi-target detection, target tracking, face association, and crowd re-identification. Figure 1 This is a flowchart illustrating the ranging method for the target detection box provided by the present invention, as shown below. Figure 1 As shown, the method includes: Step 110: Obtain the size information and center point coordinates of the target detection box to be measured.

[0021] The dimensional information includes width and height.

[0022] Here, the target detection box to be measured refers to the two bounding boxes of targets extracted in the current frame or adjacent frames from which the correlation distance needs to be calculated in computer vision tasks such as target tracking and target association matching. Examples include the first target detection box and the second target detection box. Here, the size information reflects the size range of the target in the image, typically represented by the width and height of the bounding box. Additionally, the center point coordinates are the core reference point used to indicate the spatial position of the target detection box within the two-dimensional image plane.

[0023] Specifically, the parameters of the two target detection boxes to be measured can be directly obtained or derived based on edge corner points using target detection algorithms such as YOLO (You Only Look Once). For example, the widths of the first and second target detection boxes can be obtained respectively. and height Additionally, obtain the center point coordinates of the two target detection boxes to be measured. For example, the center point coordinates of the first target detection box are... The coordinates of the center point of the second target detection box are .

[0024] Step 120: Obtain the width weight and height weight. Based on the width weight and height weight, weight the original width difference and original height difference between the detection boxes of the target to be measured, respectively, to obtain the weighted width difference and weighted height difference.

[0025] Here, the original width difference and original height difference refer to the absolute differences in the width and height dimensions of the two target detection boxes, used to quantify the degree of change in the shape and proportion of the target. Additionally, the width weight and height weight are pre-set or dynamically adjusted control coefficients used to adapt to the sensitivity of different target shape changes, such as variations in the aspect ratio of different face boxes. Therefore, the weighted width difference and weighted height difference here represent the differences after weight adjustment, ensuring that the impact of size changes on the overall distance is within a reasonable range.

[0026] Specifically, the difference in the original width of the two detection boxes is first calculated. Difference from the original height For example, it can be calculated using the following formula, as shown below: ; ; Then, obtain the width weight and height weight, using the width weight... and height weight The original width and height differences between the detection boxes of the targets to be ranged are weighted separately to obtain the weighted width and weighted height differences. For example, the weighted width and weighted height differences can be calculated using the following formulas, as shown below: ; In the formula, Indicates the weighted width difference; This indicates weighted height differences.

[0027] Understandably, the ability to adjust width and height weights independently enhances the distance measurement capabilities. Stability in specific application scenarios such as pedestrian tracking or vehicle tracking.

[0028] Step 130: Based on the positional differences between the center point coordinates of the target detection box to be measured, the composite distance is obtained by combining the weighted width difference and the weighted height difference.

[0029] Here, composite distance refers to a multi-dimensional fusion distance metric feature that not only considers the geometric and physical position deviation of the target in the image space, but also incorporates the width and height differences that reflect the deformation of the target.

[0030] Specifically, the Euclidean spatial positional difference between the center point coordinates can be calculated, and then squared and rooted in the same metric space as the weighted width and weighted height differences calculated in the preceding steps. For example, the composite distance can be calculated using the following formula, as shown below: ; In the formula, Indicates the composite distance.

[0031] It should be noted that this step can effectively overcome the deficiency that relying solely on the distance between the center points cannot reflect the impact of size changes on the same target.

[0032] Step 140: Based on the size information of the target detection box to be measured, calculate the average scale, and normalize the composite distance based on the average scale to obtain the distance measurement result of the target detection box to be measured.

[0033] Here, the average scale refers to a smoothed reference value obtained by comprehensively considering the global size features of multiple target detection boxes, used to eliminate the natural scale differences between targets of different sizes. Furthermore, the ranging result here is the final output value used to determine the correlation between targets after adaptive scale adjustment.

[0034] Specifically, the average scale can be calculated based on the squared mean of the width and height of the two target detection boxes to be measured. Then, this average scale is used as a penalty or compensation term to normalize the composite distance, i.e., to perform scaling, resulting in the final accurate ranging result between the target detection boxes. For example, the ranging structure can be calculated using the following formula, as shown below: ; In the formula, Indicates the distance measurement result; Indicates the average scale.

[0035] The method provided in this invention calculates the difference in center point position, original width difference, and original height difference between two target detection boxes to be measured, and introduces width weight and height weight to obtain a composite distance. Finally, it normalizes the composite distance using the average scale derived from size information and outputs the ranging result. This method achieves deep fusion and adaptive adjustment of target size and scale changes in spatial position difference measurement, overcomes the limitations of traditional single distance measurement, effectively supports matching judgment of large and small targets, significantly improves the accuracy and robustness of target association and tracking, and has low computational overhead.

[0036] Based on any of the above embodiments, in step 140, the composite distance is normalized based on the average scale to obtain the ranging result of the target detection box to be measured, including: The width and height of the target detection box to be measured are subjected to scale fusion processing to obtain the average scale; A scale adjustment term is constructed using the average scale and the preset smoothing coefficient; Based on the scale adjustment term, the composite distance is scaled proportionally to obtain the distance measurement result.

[0037] Specifically, firstly, multi-dimensional scale fusion can be achieved by summing and averaging the squares of the width and height of the first target detection box and the width and height of the second target detection box within the target detection box to be measured, and then performing a square root operation. For example, the average scale can be calculated using the following formula, as shown below: ; In the formula, Indicates the average scale.

[0038] Next, a pre-defined minimum constant, such as 0.01, can be obtained. This constant controls the intensity of the scale normalization adjustment and prevents the denominator from becoming zero or extreme value abrupt changes in the mathematical calculation. Then, the calculated average scale is multiplied by a preset smoothing coefficient and added to a basic constant, such as 1, to construct the scale adjustment term. For example, using... The scaling term is constructed.

[0039] Furthermore, based on the scale adjustment term, the composite distance is scaled proportionally to obtain the ranging result. It can be understood that this scaling process refers to using the scale adjustment term to perform division or multiplication mapping on the composite distance, which originally reflects absolute numerical deviations, transforming it into a relative, scale-independent metric space. Thus, in this way, the absolute impact of spatial deviations on the distance for large-area targets is reduced, while maintaining high sensitivity to deviations in small-faced targets.

[0040] The method provided in this invention obtains an average scale by performing scale fusion processing on the width and height of the detection box of the target to be ranged, and then constructs a scale adjustment term by combining it with a preset smoothing coefficient, and performs proportional scaling processing on the composite distance accordingly. This achieves the organic unity of the target's physical spatial location features and geometric scale features, and can adaptively adjust the distance calculation results according to the different scales of the target itself. It effectively supports the matching judgment of large and small targets, solves the problem of distance measurement failure caused by the scaling of the target as it moves near or away from the camera, and further improves the scientific nature of the ranging and the robustness of target association.

[0041] Based on any of the above embodiments, in order to more accurately integrate spatial positional relationships and geometrical size differences, and to solve the problem in the prior art that it is difficult to balance efficiency and correlation accuracy in real-time systems, step 130 includes: Extract the spatial deviation features of the center point coordinates of the target detection box to be measured along each coordinate axis; The spatial distance is calculated by performing spatial distance measurement on the spatial deviation characteristics, the weighted width difference, and the weighted height difference to obtain the composite distance.

[0042] Specifically, firstly, the differences between the x-coordinate of the center point of the first target detection box and the x-coordinate of the center point of the second target detection box, as well as the differences between the y-coordinate of the center point of the first target detection box and the y-coordinate of the center point of the second target detection box, can be calculated to extract the spatial deviation features of the center point coordinates of the target detection box to be measured along each coordinate axis, i.e., extracting the horizontal axis spatial deviation features and the vertical axis spatial deviation features. Here, the spatial deviation features refer to the absolute positional deviation of the two targets in their respective independent coordinate dimensions.

[0043] Understandably, this dimensional decomposition yields spatial deviation features that characterize the differences in the horizontal and vertical positions of the target.

[0044] Then, the four multidimensional feature components of the target detection box to be ranging can be processed using the logic of square and square root operations. Specifically, the four components, including lateral deviation, longitudinal deviation, weighted width difference, and weighted height difference, are each squared. These four squared terms are then summed, and finally, the square root operation is performed on the sum to obtain the final composite distance. The entire calculation process only involves basic addition, subtraction, multiplication, division, and square and square root operations, without the need for complex matrix derivations.

[0045] The method provided in this invention extracts spatial deviation features along each coordinate axis and incorporates them, along with weighted size differences, as multi-dimensional feature components into spatial distance measurement calculations. This achieves isomorphic fusion of physical location features and geometric shape features within a unified mathematical space. This method organically combines previously isolated location distances and size ratio changes into a single comprehensive evaluation index. The calculation logic is simple and clear, requiring no complex matrix operations. It not only significantly improves the comprehensiveness and accuracy of target distance correlations but also boasts extremely high computational efficiency, making it highly suitable for rapid inference in resource-constrained real-time embedded vision systems.

[0046] Based on any of the above embodiments, the steps for obtaining the coordinates of the center point of the target detection box to be ranged include: Obtain the coordinates of the edge corner points of the target detection box to be measured; The offset of the center point relative to the edge corner point is determined based on the size information; The coordinates of the center point are obtained by spatial mapping using the coordinates of the edge corner points and the offset.

[0047] Here, the edge corner coordinates refer to the reference points used to define the boundaries of the target bounding box, which are usually the pixel position information of the top left, bottom left, top right, or bottom right vertices of the detection box in the image plane.

[0048] Specifically, the basic positioning coordinates of the target detection box, i.e., the coordinates of the edge corners, can be extracted by parsing the raw data structure output by the front-end target detection algorithm. For example, the coordinates of the top-left corner can be used as the edge corner coordinates to obtain the x-coordinate of the top-left vertex of the first target detection box. and ordinate and the x-coordinate of the top-left vertex of the second object detection box. and ordinate .

[0049] Additionally, the previously obtained dimensional information, namely the width and height of the target detection box to be measured, can be used to calculate the horizontal and vertical displacement spans, respectively, by taking half of each. For example, for the first target detection box, the horizontal offset component can be calculated. and the offset component in the vertical dimension This yields the offset of the center point relative to the edge corner points. Here, the offset refers to the spatial distance vector from the edge reference corner point of the detection box to the geometric center point of the bounding box.

[0050] Next, the horizontal offset component is added to the x-coordinates of the edge corner points obtained in the previous step, and the vertical offset component is added to the y-coordinates of the edge corner points to calculate the precise geometric center point. For example, the center point coordinates of the two target detection boxes to be measured are calculated using the following formulas, as shown below: ; .

[0051] The method provided in this invention obtains the coordinates of the edge corner points of the target detection box and derives the offset to the geometric center by combining the size information. Then, it accurately calculates the center point coordinates by using the geometric translation relationship of spatial mapping. It is compatible with the underlying data formats of various target detectors that only output the coordinates of the bounding box corner points. It does not rely on complex external conversion interfaces. It can stably and efficiently extract the core position reference for ranging measurement through basic geometric operations, which enhances the adaptability and robustness of the algorithm under different embedded vision frameworks.

[0052] Based on any of the above embodiments, the present invention also provides a method for analyzing the correlation of target detection boxes, which can be directly deployed on embedded platforms, such as vision processors like RV1109 and RV1126. Figure 2 A flowchart illustrating the association analysis method for target detection boxes provided by this invention is shown below. Figure 2As shown, the method includes: Step 210, obtaining a target detection box to be analyzed and a preset distance threshold.

[0053] Here, the target detection box to be analyzed refers to a set of candidate bounding boxes that need to confirm the identity attribution or matching relationship in consecutive video frames or the same picture. The preset distance threshold is a critical evaluation criterion for determining whether two detection boxes are close enough in the multi-dimensional scale fusion space.

[0054] Specifically, in actual application scenarios such as target tracking, the detection target with the largest area in the current video frame can be selected as the reference target, and other targets in the frame can be extracted as candidate targets. The two together constitute the target detection box to be analyzed. At the same time, the preset distance threshold set for the current task is retrieved or read.

[0055] Step 220, obtaining the ranging result of the target detection box to be analyzed based on the ranging method of the above-mentioned target detection box.

[0056] Specifically, for the selected reference target and a certain candidate target, the ranging logic in the foregoing embodiment can be called to sequentially calculate the spatial deviation and the weighted width and height size difference between the two in the physical coordinate system, and use the fused average scale to scale the composite distance proportionally, and output the final normalized ranging result D that excludes the interference of the absolute size caused solely by the distance of the camera.

[0057] Step 230, comparing the ranging result with the preset distance threshold, and analyzing to obtain the association relationship of the target detection box to be analyzed.

[0058] The association relationship here is used to characterize whether the current multiple target detection boxes to be analyzed correspond to the same physical entity in the real world, such as determining whether they are the same pedestrian or the same face.

[0059] Specifically, the ranging result calculated for a certain candidate target can be compared with the preset distance threshold. If the comparison result is that the ranging result is strictly less than the preset distance threshold, that is, D < T, it is determined that the candidate target and the reference target highly coincide in spatial and scale features and belong to the same target association relationship, thus completing the matching verification of the target; if the ranging result is greater than or equal to the preset distance threshold, it is determined that there is no association between the two and they belong to different physical targets.

[0060] The method provided in this invention compares and analyzes the high-precision ranging results after scale normalization and multi-dimensional feature fusion with a preset distance threshold, thereby achieving efficient and accurate identity matching in target detection and tracking scenarios. Furthermore, it directly quantifies the association probability between targets using an adaptive distance metric, effectively avoiding the shortcomings of traditional methods that rely solely on intersection-union ratio or single center point distance, which are prone to failure when the target is deformed. This significantly improves the accuracy of target association judgment and the overall system robustness in complex scenarios such as multi-target tracking and crowd re-identification.

[0061] Based on any of the above embodiments, the preset distance threshold is preset based on the application scenario of the target detection box to be analyzed.

[0062] The application scenario here refers to the actual business environment or type of object being identified in which the object detection box is specifically deployed, such as whether it is used for pedestrian tracking from a macro perspective or for face association for micro-feature comparison.

[0063] Specifically, before performing target association analysis, the current business operation mode can be identified, and an empirical threshold matching that mode can be retrieved. For example, in pedestrian detection and tracking applications, since pedestrian targets have relatively high tolerance for deformation, occlusion, and displacement in the image, the preset distance threshold can be set to a value between 20 and 30 to ensure motion continuity. In face tracking and association applications, because the face region is relatively small and the matching precision requirements are higher, a more stringent, smaller value can be used for the preset distance threshold to prevent incorrect association of faces from different people.

[0064] The method provided by this invention dynamically sets a preset distance threshold by binding it to the specific application scenario of the target detection box, giving the association algorithm a strong scene adaptability. It allows for the customization of the best matching critical point for the unique spatial and scale variation patterns of different target types, effectively avoiding the one-size-fits-all misjudgment or missed judgment caused by using a single fixed threshold, and significantly improving the recognition accuracy and business flexibility of the target association system when deployed across industries and multiple tasks.

[0065] Based on any of the above embodiments Figure 3 This is a schematic diagram of the ranging device for the target detection frame provided by the present invention, as shown below. Figure 3 As shown, the device includes: The first acquisition unit 310 acquires the size information and center point coordinates of the target detection box to be measured; the size information includes width and height. Weighting unit 320 obtains width weight and height weight, and weights the original width difference and original height difference between the detection boxes of the target to be measured based on the width weight and the height weight, respectively, to obtain weighted width difference and weighted height difference; The comprehensive calculation unit 330 performs a comprehensive calculation based on the positional differences between the center point coordinates of the target detection box to be measured, combined with the weighted width difference and the weighted height difference, to obtain the composite distance. The first ranging unit 340 calculates an average scale based on the size information of the target detection box to be measured, and normalizes the composite distance based on the average scale to obtain the ranging result of the target detection box to be measured.

[0066] The apparatus provided in this invention calculates the difference in center point position, original width difference, and original height difference between two target detection boxes to be measured, and introduces width weight and height weight to obtain a composite distance. Finally, it normalizes the composite distance using an average scale derived from size information and outputs the ranging result. This achieves deep fusion and adaptive adjustment of target size and scale changes in spatial position difference measurement, overcomes the limitations of traditional single distance measurement, effectively supports matching judgments of large and small targets, significantly improves the accuracy and robustness of target association and tracking, and has low computational overhead.

[0067] Based on any of the above embodiments, the first ranging unit is specifically used for: The width and height of the target detection box to be measured are subjected to scale fusion processing to obtain the average scale; A scale adjustment term is constructed using the average scale and the preset smoothing coefficient; Based on the scale adjustment term, the composite distance is scaled proportionally to obtain the distance measurement result.

[0068] Based on any of the above embodiments, the comprehensive calculation unit is specifically used for: Extract the spatial deviation features of the center point coordinates of the target detection box to be measured along each coordinate axis; The spatial distance is calculated by performing spatial distance measurement on the spatial deviation characteristics, the weighted width difference, and the weighted height difference to obtain the composite distance.

[0069] Based on any of the above embodiments, the first acquisition unit is specifically used for: Obtain the coordinates of the edge corner points of the target detection box to be measured; The offset of the center point relative to the edge corner point is determined based on the size information; The coordinates of the center point are obtained by spatial mapping using the coordinates of the edge corner points and the offset.

[0070] Based on any of the above embodiments Figure 4 This is a schematic diagram of the structure of the target detection box association analysis device provided by the present invention, as shown below. Figure 4 As shown, the device includes: The second acquisition unit 410 acquires the target detection box to be analyzed and a preset distance threshold. The second ranging unit 420 obtains the ranging result of the target detection box to be analyzed based on the above-mentioned ranging method of the target detection box; The correlation analysis unit 430 compares the ranging result with the preset distance threshold and analyzes the correlation relationship of the target detection box to be analyzed.

[0071] The device provided in this invention compares and analyzes the high-precision ranging results after scale normalization and multi-dimensional feature fusion with a preset distance threshold, thereby achieving efficient and accurate identity matching in target detection and tracking scenarios. Furthermore, it directly quantifies the association probability between targets using an adaptive distance metric, effectively avoiding the shortcomings of traditional methods that rely solely on intersection-union ratio or single center point distance, which are prone to failure when the target is deformed. This significantly improves the accuracy of target association judgment and the overall system robustness in complex scenarios such as multi-target tracking and crowd re-identification.

[0072] Based on any of the above embodiments, the preset distance threshold is preset based on the application scenario of the target detection box to be analyzed.

[0073] Figure 5 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 5 As shown, the electronic device may include a processor 510, a communication interface 520, a memory 530, and a communication bus 540, wherein the processor 510, the communication interface 520, and the memory 530 communicate with each other through the communication bus 540. The processor 510 can call logical instructions in the memory 530 to execute a ranging method for a target detection box. This method includes: acquiring the size information and center point coordinates of the target detection box to be measured; the size information includes width and height; acquiring width weights and height weights; weighting the original width differences and original height differences between the target detection boxes to be measured based on the width weights and the height weights, respectively, to obtain weighted width differences and weighted height differences; performing a comprehensive calculation based on the positional differences between the center point coordinates of the target detection boxes to be measured, combined with the weighted width differences and the weighted height differences, to obtain a composite distance; calculating an average scale based on the size information of the target detection box to be measured, and normalizing the composite distance based on the average scale to obtain the ranging result of the target detection box to be measured.

[0074] Alternatively, a method for analyzing the correlation of target detection boxes can be performed, the method comprising: obtaining a target detection box to be analyzed and a preset distance threshold; obtaining a ranging result of the target detection box to be analyzed based on the above-mentioned ranging method for target detection boxes; comparing the ranging result with the preset distance threshold, and analyzing to obtain the correlation of the target detection box to be analyzed.

[0075] Furthermore, the logical instructions in the aforementioned memory 530 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0076] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the target detection box ranging method provided by the above methods. The method includes: acquiring the size information and center point coordinates of the target detection box to be measured; the size information includes width and height; acquiring width weight and height weight; weighting the original width difference and original height difference between the target detection boxes to be measured based on the width weight and the height weight, respectively, to obtain weighted width difference and weighted height difference; performing a comprehensive calculation based on the positional difference between the center point coordinates of the target detection boxes to be measured, combined with the weighted width difference and weighted height difference, to obtain a composite distance; calculating an average scale based on the size information of the target detection box to be measured, and normalizing the composite distance based on the average scale to obtain the ranging result of the target detection box to be measured.

[0077] Alternatively, a method for analyzing the correlation of target detection boxes can be performed, the method comprising: obtaining a target detection box to be analyzed and a preset distance threshold; obtaining a ranging result of the target detection box to be analyzed based on the above-mentioned ranging method for target detection boxes; comparing the ranging result with the preset distance threshold, and analyzing to obtain the correlation of the target detection box to be analyzed.

[0078] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements a ranging method for a target detection box provided by the above methods. The method includes: acquiring size information and center point coordinates of a target detection box to be ranging; the size information including width and height; acquiring width weights and height weights; weighting the original width difference and original height difference between the target detection boxes to be ranging based on the width weights and the height weights, respectively, to obtain weighted width difference and weighted height difference; performing a comprehensive calculation based on the positional difference between the center point coordinates of the target detection boxes to be ranging, combined with the weighted width difference and the weighted height difference, to obtain a composite distance; calculating an average scale based on the size information of the target detection boxes to be ranging, and normalizing the composite distance based on the average scale to obtain the ranging result of the target detection box to be ranging.

[0079] Alternatively, a method for analyzing the correlation of target detection boxes can be performed, the method comprising: obtaining a target detection box to be analyzed and a preset distance threshold; obtaining a ranging result of the target detection box to be analyzed based on the above-mentioned ranging method for target detection boxes; comparing the ranging result with the preset distance threshold, and analyzing to obtain the correlation of the target detection box to be analyzed.

[0080] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0081] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0082] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for measuring the distance of a target detection box, characterized in that, include: Obtain the size information and center point coordinates of the target detection box to be measured; the size information includes width and height. Obtain the width weight and height weight, and based on the width weight and height weight, weight the original width difference and original height difference between the detection boxes of the target to be measured, respectively, to obtain the weighted width difference and weighted height difference; Based on the positional differences between the center point coordinates of the target detection box to be measured, the composite distance is obtained by combining the weighted width difference and the weighted height difference. Based on the size information of the target detection box to be measured, an average scale is calculated, and the composite distance is normalized based on the average scale to obtain the ranging result of the target detection box to be measured.

2. The ranging method for the target detection box according to claim 1, characterized in that, The process of normalizing the composite distance based on the average scale to obtain the ranging result of the target detection box includes: The width and height of the target detection box to be measured are subjected to scale fusion processing to obtain the average scale; A scale adjustment term is constructed using the average scale and the preset smoothing coefficient; Based on the scale adjustment term, the composite distance is scaled proportionally to obtain the distance measurement result.

3. The ranging method for the target detection box according to claim 1, characterized in that, The composite distance is obtained by comprehensively calculating the positional differences between the center point coordinates of the target detection box to be measured, combined with the weighted width difference and the weighted height difference, including: Extract the spatial deviation features of the center point coordinates of the target detection box to be measured along each coordinate axis; The spatial distance is calculated by performing spatial distance measurement on the spatial deviation characteristics, the weighted width difference, and the weighted height difference to obtain the composite distance.

4. The ranging method for the target detection box according to any one of claims 1 to 3, characterized in that, The steps for obtaining the coordinates of the center point of the target detection box to be measured include: Obtain the coordinates of the edge corner points of the target detection box to be measured; The offset of the center point relative to the edge corner point is determined based on the size information; The coordinates of the center point are obtained by spatial mapping using the coordinates of the edge corner points and the offset.

5. A method for analyzing the association relationship of target detection boxes, characterized in that, include: Obtain the bounding box of the target to be analyzed and the preset distance threshold; The ranging result of the target detection box to be analyzed is obtained based on the ranging method of the target detection box according to any one of claims 1 to 4. The ranging results are compared with the preset distance threshold to analyze the correlation relationship of the target detection box to be analyzed.

6. The method for analyzing the correlation of target detection boxes according to claim 5, characterized in that, The preset distance threshold is preset based on the application scenario of the target detection box to be analyzed.

7. A ranging device for a target detection box, characterized in that, include: The first acquisition unit acquires the size information and center point coordinates of the target detection box to be measured; the size information includes width and height. The weighting unit obtains the width weight and the height weight, and based on the width weight and the height weight, weights the original width difference and the original height difference between the detection boxes of the target to be measured, respectively, to obtain the weighted width difference and the weighted height difference. The comprehensive calculation unit performs a comprehensive calculation based on the positional differences between the center point coordinates of the target detection box to be measured, combined with the weighted width difference and the weighted height difference, to obtain the composite distance. The first ranging unit calculates an average scale based on the size information of the target detection box to be measured, and then normalizes the composite distance based on the average scale to obtain the ranging result of the target detection box to be measured.

8. A device for analyzing the correlation of target detection boxes, characterized in that, include: The second acquisition unit acquires the target detection box to be analyzed and a preset distance threshold. The second ranging unit obtains the ranging result of the target detection box to be analyzed based on the ranging method of the target detection box according to any one of claims 1 to 4. The correlation analysis unit compares the ranging result with the preset distance threshold to analyze and obtain the correlation relationship of the target detection box to be analyzed.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the ranging method for the target detection box as described in any one of claims 1 to 4, or the correlation analysis method for the target detection box as described in any one of claims 5 to 6.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the ranging method for the target detection box as described in any one of claims 1 to 4, or the correlation analysis method for the target detection box as described in any one of claims 5 to 6.