A size calibration method, a size calibration device and a computer readable storage medium

By acquiring and correcting the pixel size in the multi-frame monitoring image, the problem of inaccurate dimension labeling of moving objects in large scenes in the prior art is solved, and the accurate calibration of object sizes in complex scenes is achieved, which improves the accuracy of labeling and Applicability.

CN114004876BActive Publication Date: 2024-12-06ZHEJIANG DAHUA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111076602.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-14
Publication Date
2024-12-06
Estimated Expiration
2041-09-14

AI Technical Summary

Technical Problem

The prior art is difficult to accurately mark the size of moving objects in large scenarios, especially the need to compare the depth of field information in each frame of the depth map in real time, which limits its application.

Method used

By obtaining multi-frame monitoring images of the same monitoring scene, the historical pixel size and the current pixel size are determined, and these sizes are used to correct them to obtain the corrected actual size, thereby improving the accuracy of the label.

Benefits of technology

This method significantly improves the accuracy of labeling, can be applied to complex scenarios, including the dimension calibration of small objects, and reduces the need for manual labeling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114004876B_ABST
    Figure CN114004876B_ABST
Patent Text Reader

Abstract

The present application discloses a dimension calibration method, a dimension calibration device and a computer-readable storage medium, the method comprising: obtaining multiple surveillance images of the same surveillance scene; determining the historical pixel size and the current pixel size based on the surveillance images, the current pixel size being the pixel size of the mobile target in the current surveillance image, the historical pixel size being the pixel size of the mobile target in the historical surveillance image before the current surveillance image, the mobile target in the current surveillance image being of the same category as the mobile target in the historical surveillance image and being located at the same position; respectively using the historical pixel size and the current pixel size to obtain the historical actual size of the target to be calibrated and the current actual size of the target to be calibrated; correcting the current actual size based on the historical actual size to obtain the corrected actual size. In the above manner, the present application can improve the accuracy of dimensioning and has a wide range of applications.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a dimension calibration method, a dimension calibration device and a computer-readable storage medium. Background Art

[0002] Currently, moving objects can be marked to obtain their position and size in the captured image. For example, a deep learning-based method is used to locate moving objects. However, it is necessary to compare the depth of field information in each frame of the depth map in real time to obtain the area of ​​interest, which is not applicable to large scenes. Summary of the invention

[0003] The present application provides a dimension calibration method, a dimension calibration device and a computer-readable storage medium, which can improve the accuracy of dimension marking and have a wide range of applications.

[0004] In order to solve the above technical problems, the technical solution adopted in the present application is: to provide a size calibration method, the method comprising: obtaining multiple frames of surveillance images of the same surveillance scene; based on the surveillance images, determining the historical pixel size and the current pixel size, the current pixel size being the pixel size of the mobile target in the current frame surveillance image, the historical pixel size being the pixel size of the mobile target in the historical frame surveillance image before the current frame surveillance image, the mobile target in the current frame surveillance image and the mobile target in the historical frame surveillance image being of the same category and both being located at the same position; using the historical pixel size and the current pixel size respectively, obtaining the historical actual size of the target to be calibrated and the current actual size of the target to be calibrated; and correcting the current actual size based on the historical actual size to obtain the corrected actual size.

[0005] In order to solve the above technical problems, another technical solution adopted in the present application is: to provide a dimension calibration device, which includes a memory and a processor connected to each other, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, it is used to implement the dimension calibration method in the above technical solution.

[0006] In order to solve the above technical problems, another technical solution adopted in the present application is: providing a computer-readable storage medium, which is used to store a computer program. When the computer program is executed by a processor, it is used to implement the dimension calibration method in the above technical solution.

[0007] Through the above scheme, the beneficial effect of the present application is: first obtain multiple frames of monitoring images of the same monitoring scene, then screen out the monitoring images with the same category and position of the mobile targets and the targets to be calibrated in all the monitoring images, and obtain the pixel size of the mobile targets in these monitoring images; then obtain the historical actual size corresponding to the historical pixel size and the current actual size corresponding to the current pixel size, and then correct the current actual size by the historical actual size to obtain the corrected actual size; obtain the current pixel size of the mobile target by obtaining the information of the current monitoring scene, and use the current pixel size to obtain the current actual size of the target to be calibrated, and by repeatedly correcting the current actual size, the actual size of the target to be calibrated can be obtained, which can greatly improve the accuracy of the annotation; and the actual size of very small objects in the monitoring scene can be calibrated, which can be applied to various complex scenes. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:

[0009] Figure 1 It is a flow chart of an embodiment of a size calibration method provided by the present application;

[0010] Figure 2 is a schematic diagram of a target to be calibrated provided in this application;

[0011] Figure 3 It is a flow chart of another embodiment of the size calibration method provided by the present application;

[0012] Figure 4 It is a structural schematic diagram of another embodiment of the size calibration device provided by the present application;

[0013] Figure 5 It is a structural schematic diagram of another embodiment of the size calibration device provided by the present application;

[0014] Figure 6 It is a structural schematic diagram of an embodiment of a computer-readable storage medium provided by the present application. DETAILED DESCRIPTION

[0015] The present application is further described in detail below in conjunction with the accompanying drawings and examples. It is particularly noted that the following examples are only used to illustrate the present application, but are not intended to limit the scope of the present application. Similarly, the following examples are only some embodiments of the present application rather than all embodiments, and all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.

[0016] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0017] It should be noted that the terms "first", "second" and "third" in this application are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, the features defined as "first", "second" and "third" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "multiple" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices.

[0018] See also Figure 1 , Figure 1 : is a flow chart of an embodiment of a size calibration method provided by the present application, the method comprising:

[0019] Step 11: Acquire multiple frames of monitoring images of the same monitoring scene.

[0020] A camera device can be used to shoot a scene that needs to be monitored (i.e., a monitoring scene) to generate monitoring video data, which includes multiple frames of monitoring images; or a monitoring image can be obtained from an image database or storage device, which includes a moving target and a target to be calibrated. The moving target is an object that can be moved in the current monitoring scene, such as a person or a car; the target to be calibrated is an object in the current monitoring scene whose actual size needs to be calculated, and the target to be calibrated can also be a target that can be moved, such as a moving target is a person and a target to be calibrated is a car.

[0021] Step 12: Based on the monitoring image, determine the historical pixel size and the current pixel size.

[0022] The surveillance image is processed to obtain the pixel size of the mobile target located at the same position in the surveillance scene. The current pixel size is the pixel size of the mobile target in the current frame surveillance image, and the historical pixel size is the pixel size of the mobile target in the historical frame surveillance image before the current frame surveillance image. The mobile target in the current frame surveillance image is of the same category as the mobile target in the historical frame surveillance image and is located at the same position, for example: both are located at a set position, which can be a position set in advance based on experience or the position of the mobile target that first appears in the vicinity to be calibrated. The set position is not limited to a coordinate point, but can also be a small area.

[0023] Furthermore, after acquiring the surveillance image, preprocessing may be performed first, such as denoising or image enhancement, to improve the quality of the surveillance image and facilitate subsequent processing; then, a deep learning method may be used to perform feature extraction processing on the surveillance image to determine whether there are moving targets and targets to be calibrated in the surveillance image; if there are no targets (including moving targets and targets to be calibrated) in the current surveillance scene, the size calibration of the target to be calibrated cannot be achieved, for example, in a certain frame of surveillance image, there is only a traffic light in the lower right corner, and the image background is black; if there are at least one moving target and at least one target to be calibrated in the current surveillance scene, the position of the moving target may be obtained, and then the number of pixels occupied by the moving target in the horizontal direction (i.e., the width in the pixel size) and the number of pixels occupied in the vertical direction (i.e., the height in the pixel size) may be calculated, so as to use the pixel size of the moving target to calibrate the actual size of the target to be calibrated.

[0024] Step 13: Using the historical pixel size and the current pixel size respectively, obtain the historical actual size of the target to be calibrated and the current actual size of the target to be calibrated.

[0025] For each frame of surveillance image, it is possible to first determine whether there is a moving target and a target to be calibrated in the current surveillance image. If there is a moving target and a target to be calibrated in the current surveillance image, the pixel size of the moving target and the pixel size of the target to be calibrated in the current surveillance image can be obtained, and then the pixel size of the moving target, the pixel size of the target to be calibrated and the actual size of the moving target are used to calculate the actual size of the target to be calibrated in the current surveillance image (i.e., the current actual size). By performing the above processing on multiple consecutive frames of surveillance images, the actual size data of the corresponding target to be calibrated (including the historical actual size and the current actual size) can be obtained. The historical actual size is the actual size of the target to be calibrated calculated using the image frame before the current frame.

[0026] Step 14: Correct the current actual size based on the historical actual size to obtain a corrected actual size.

[0027] After obtaining the historical actual size and the current actual size, the historical actual size can be used to correct the current actual size to obtain the final actual size of the target to be calibrated. Specifically, the historical actual size and the current size can be directly weighted summed, or the current actual size and the previous actual size can be weighted averaged, and then the weighted average result is used to update the current actual size; for example, the current frame is the mth (m>1) frame, and the historical frames are: 1st to (m-1) frames, and the actual sizes corresponding to the 1st to mth frames of monitoring images are recorded as L1~L m , then the final actual size L is: (L1+L2+…+L m ) / m; or L' i =(L i +L i-1 ), i>2, L=(L' m-1 +L m ) / 2.

[0028] In other embodiments, the current pixel size may be corrected using the historical pixel size to obtain a corrected pixel size, and then the corrected pixel size may be used to calculate the actual size of the target to be calibrated; specifically, after obtaining the current pixel size, the current pixel size may be corrected using the historical pixel size previously obtained, and the historical pixel size and the current pixel size may be weighted summed to obtain the corrected pixel size, for example: the historical pixel size is the previous pixel size, and the current pixel size and the previous pixel size are weighted summed to obtain the corrected pixel size; or the historical pixel size is the pixel size corresponding to the first n (n≥1) frames of surveillance images before the current frame, and the corrected pixel size is obtained by weighted summing the pixel sizes corresponding to the (n+1) frames of surveillance images.

[0029] By processing multiple consecutive surveillance images using the method of step 12, the pixel size of the moving target at the same position in different surveillance images can be obtained; then the actual size of the target to be calibrated is calculated using the obtained pixel size of the moving target. Specifically, the standard size of the moving target can be obtained, and the pixel size of the moving target in multiple surveillance images can be weighted summed to obtain a corrected pixel size, and then the corrected pixel size, the standard size of the moving target, and the pixel size of the target to be calibrated are used to calculate the actual size of the target to be calibrated.

[0030] For example, Figure 2As shown, taking a moving target as a person as an example, the standard value of the person's height is obtained, for example: the height data of people in a certain area census, in the T1th frame monitoring image, it is found that there is a person G1 (not shown in the figure) at position A, and in the (T1+T2)th frame monitoring image, it is found that there is a person G2 (not shown in the figure) at position A, then the pixel height S1 corresponding to person G1 and the pixel height S2 corresponding to person G2 can be obtained, and then S1 and S2 are averaged to obtain a corrected pixel height, and the corrected pixel height is used as the average pixel height of the person in the current monitoring scene, and the average pixel height and the pixel height of the vehicle at position B are used to calculate the actual size of the vehicle.

[0031] This embodiment provides an automatic calibration method based on deep learning, which first obtains multiple frames of surveillance images of the same surveillance scene, and then determines whether there are moving targets and targets to be calibrated in each frame of the surveillance image. If so, it determines whether the categories and positions of the moving targets in the surveillance images of different frames are the same. If they are the same, the pixel size of the moving targets in these surveillance images is obtained to obtain the historical pixel size and the current pixel size; then the current actual size is corrected by the historical actual size to obtain the corrected actual size; the pixel size of the moving target is obtained by obtaining information of the current surveillance scene, and the current actual size of the target to be calibrated can be obtained by the pixel size; the actual size of the target to be calibrated can be obtained by repeatedly correcting the current actual size, which can greatly improve the accuracy of the annotation; and the actual size of very small objects in the surveillance scene can be calibrated, which can be applied to various complex scenes.

[0032] See also Figure 3 , Figure 3 : is a flow chart of another embodiment of the size calibration method provided by the present application, the method comprising:

[0033] Step 31: Acquire multiple surveillance images of the same surveillance scene.

[0034] Step 31 is the same as step 11 in the above embodiment and will not be described again.

[0035] Step 32: Perform target recognition processing on the monitoring image to obtain target information, and track the moving target to generate tracking information.

[0036] A target recognition algorithm is used to identify the current frame surveillance image to obtain target information. The target recognition algorithm includes Region-Convolutional Neural Networks (R-CNN), YOLO (You Only Look Once) or single shot multibox detector (SSD). The target information includes the pixel size of the moving target, the category of the moving target or the position of the moving target. Then the moving target is tracked to obtain tracking information including its moving trajectory.

[0037] Furthermore, the tracking information includes the characteristics of the mobile target in the surveillance image, the identifier of the mobile target and the timestamp. The identifier is used to ensure the uniqueness of the mobile target to distinguish it from other mobile targets. The characteristics are used to record the information of the mobile target when it is at different positions in the current surveillance scene. The timestamp is the time when the surveillance image is taken.

[0038] Step 33: Determine whether there is any overlap in the movement trajectories of at least two moving objects of the same category based on the tracking information.

[0039] After tracking all mobile targets in the current monitoring scene, the tracking information corresponding to each mobile target can be obtained, and the tracking information of mobile targets of the same category can be compared to determine whether their movement trajectories have overlapping positions, that is, to determine whether they pass through the same position. For example, taking the mobile targets as cars, it is determined whether cars C1 and C2 pass through the same position in the current monitoring scene.

[0040] Step 34: If there is an overlapped position in the movement trajectories of at least two moving objects of the same category, the pixel size of the moving object located at the overlapped position is obtained as the current pixel size.

[0041] If the moving trajectories of at least two moving targets of the same category are detected to have overlapping positions, the overlapping positions are recorded as set positions, and the pixel size of the moving target at the set position in the corresponding monitoring image is obtained, that is, the current pixel size is obtained; for historical frame monitoring images, the historical pixel size is obtained.

[0042] Step 35: Divide the pixel size of the target to be calibrated by the current pixel size of the moving target to obtain the current pixel size ratio; multiply the actual size of the moving target by the current pixel size ratio to obtain the current actual size.

[0043] For the current frame monitoring image, the pixel size of the target to be calibrated in the current frame monitoring image can be divided by the pixel size of the moving target to obtain the current pixel size ratio; then the actual size of the moving target is multiplied by the current pixel size ratio to obtain the current actual size of the target to be calibrated.

[0044] Step 36: Perform weighted summation of the historical actual size and the current actual size to obtain the corrected actual size.

[0045] The actual size of the current target to be calibrated can be obtained by weighted summing the current actual size and the historical actual size. The weighting coefficient can be set according to the specific application needs. For example, the weighting coefficient of the current actual size is the largest, and the image frame closer to the current frame has a larger corresponding weighting coefficient.

[0046] Furthermore, when the same target moves in the monitoring scene, its pixel size in the image may change, but the actual size represented by the target will not change; in view of this feature, the actual size of the target to be calibrated is continuously verified and corrected. For example, the standard height of a person is 170 cm. When person K1 is tracked, it is considered that the height of K1 is 170 cm. K1 in the monitoring scene is used to calibrate the target to be calibrated around K1 to obtain the actual size of the target to be calibrated. When the next person K2 is tracked, it is still considered that the height of K2 is 170 cm, and the target to be calibrated around K2 is calibrated. Since the real heights of K1 and K2 are different, the calibration of the same target to be calibrated at the overlapping position of their moving trajectories is different. The calibration value (i.e., the actual size) calibrated by K1 is recorded as the first calibration value, and the calibration value obtained by K2 is recorded as the second calibration value. The second calibration value is corrected by the first calibration value to obtain a correction result, and the correction result is recorded as the current calibration value of the target to be calibrated. The correction method can be to take the average value. When the number of people is large enough, it can be determined that the calibration is accurate.

[0047] In other embodiments, when the corrected pixel size is used to correct the actual size of the target to be calibrated, the corrected pixel size may be processed based on the pixel size ratio between the moving target and the target to be calibrated to obtain the actual size of the target to be calibrated. Specifically, the pixel size of the target to be calibrated is first divided by the corrected pixel size to obtain the pixel size ratio; then the actual size of the moving target is multiplied by the pixel size ratio to obtain the actual size of the target to be calibrated.

[0048] Step 37: Determine whether the preset correction end condition is met.

[0049] It is determined whether the variance between the current actual size and the historical actual size is less than a preset threshold. If the variance between the current actual size of the target to be calibrated and the historical actual size is less than the preset threshold, it indicates that the actual size of the target to be calibrated currently is basically stable at a value, and it can be determined that the preset correction end condition is met. If the preset correction end condition is not met at present, return to the step of determining the current pixel size, that is, execute step 34 until the preset correction end condition is met.

[0050] In other embodiments, the targets to be calibrated may also be filled into the background image. When the number of targets to be calibrated being tracked is large enough, the targets to be calibrated may cover the entire background image, and it may be determined whether the pixel ratio of the targets to be calibrated in the background image exceeds the preset ratio. If the pixel ratio of all targets to be calibrated exceeds the preset ratio, it indicates that there are many targets that have been marked, and it is determined that the preset correction end condition is met.

[0051] By adopting the above scheme, according to the calibration information of the location of the target to be calibrated and the pixel information of the target to be calibrated, the actual size of the target to be calibrated can be calculated by converting the pixel points and the actual coordinates, and the actual distance between any two points in the monitoring video data can also be obtained.

[0052] In other embodiments, the moving speed of the moving target can be calculated based on the moving distance of the moving target and the moving time of the moving target; it is determined whether the moving speed is greater than the preset speed; if the moving speed is greater than the preset speed, it is determined that an abnormal situation has occurred. It can be understood that the result of speed judgment can also be applied to the judgment of abnormal rapid movement of crowds, speeding violation judgment at traffic checkpoints, or height restriction violation judgment of vehicles, etc.

[0053] The solution adopted in this embodiment obtains the information of the current monitoring scene to obtain a fixed scale (i.e., the ratio of the actual size of the target to be calibrated to the moving target), and repeatedly corrects the initial annotation information through moving targets such as people or cars that appear in the monitoring scene, which can greatly improve the accuracy of the annotation; it can also cover all positions in the monitoring scene by linking the identification of the moving target and the moving trajectory of the moving target, thereby achieving a comprehensive description of the monitoring scene; in addition, the movement information of the moving target can also be obtained, and the behavior analysis of the moving target can be completed in combination with the moving trajectory of the moving target, and a set of intelligent judgment schemes for behavior analysis can be expanded, such as fast movement or speeding; in addition, for large scenes, by tracking the moving target, combined with the actual size of the moving target, the actual size of very small objects in the monitoring scene can be calibrated, which can be applied to various complex scenes.

[0054] See also Figure 4 , Figure 4It is a structural diagram of an embodiment of a size calibration device provided in the present application. The size calibration device 40 includes a memory 41 and a processor 42 connected to each other. The memory 41 is used to store a computer program. When the computer program is executed by the processor 42, it is used to implement the size calibration method in the above embodiment.

[0055] This embodiment uses an algorithm to track moving targets such as people or cars that appear in the monitoring scene, and records the information of the moving targets, and calibrates objects at all positions in the monitoring scene through the movement of the moving targets in the monitoring scene (i.e., from appearance to departure), which has more applications, such as determining the moving speed of the target. In addition, given accurate fixed scale information, calibration through the trajectory of the moving target can reduce manual labeling and greatly improve the accuracy of calibration in deep learning scenarios.

[0056] See also Figure 5 , Figure 5 It is a structural schematic diagram of another embodiment of the size calibration device provided in the present application. The size calibration device 50 includes a target recognition and analysis module 51, a target tracking module 52, a calibration verification module 53, a calibration filling module 54 and an actual size calculation module 55.

[0057] The target recognition and analysis module 51 is used to obtain monitoring video data and perform recognition and analysis on the monitoring video data, for example, extracting and saving information such as the height of a person or the length and width of a small car.

[0058] The target tracking module 52 is connected to the target recognition and analysis module 51, and is used to track moving targets such as people or vehicles in the monitoring scene through a tracking algorithm and generate tracking information.

[0059] The calibration verification module 53 is connected to the target tracking module 52 and is used to correct the actual size of the target to be calibrated.

[0060] The calibration filling module 54 is connected to the calibration verification module 53, and is used to calibrate the targets to be calibrated around the mobile target when the mobile target is at a certain position in the monitoring scene, and fill the targets to be calibrated during calibration into the image background, and record their calibration information. When the calibration value of the target to be calibrated tends to be stable, the calibration verification and correction can be stopped; through this module, all positions in the entire monitoring scene can be calibrated to improve the calibration accuracy.

[0061] The actual size calculation module 55 is connected to the calibration filling module 54 and is used to calculate the actual size of the target to be calibrated by converting pixel points and actual coordinates according to the calibration information of the position of the target to be calibrated and the pixel information of the target to be calibrated.

[0062] Continuing to refer to 5, the size calibration device 50 also includes a speed judgment module 56, which is connected to the actual size calculation module 55, and is used to calculate the actual distance and time corresponding to the trajectory according to the recorded trajectory of the moving target, and obtain the moving speed of the moving target. It can determine whether the moving speed of the moving target is too fast based on the moving speed, and then determine whether the current moving target has any illegal behavior.

[0063] This embodiment achieves the purpose of calibrating the entire monitoring scene by monitoring relatively fixed scale information in the scene and tracking moving targets such as people or cars, and can obtain the actual size of each object to be marked.

[0064] See also Figure 6 , Figure 6 It is a structural diagram of an embodiment of a computer-readable storage medium provided in the present application. The computer-readable storage medium 60 is used to store a computer program 61. When the computer program 61 is executed by a processor, it is used to implement the dimension calibration method in the above embodiment.

[0065] The computer-readable storage medium 60 may be a server, a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc., which may store program codes.

[0066] In the several embodiments provided in this application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only illustrative, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.

[0067] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0068] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0069] The above descriptions are merely embodiments of the present application and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A size calibration method, characterized in that: include: Acquire multiple frames of surveillance images of the same surveillance scene; Based on the monitoring image, determine the historical pixel size and the current pixel size, the current pixel size being the pixel size of the mobile target in the current frame monitoring image, the historical pixel size being the pixel size of the mobile target in the historical frame monitoring image before the current frame monitoring image, the mobile target in the current frame monitoring image and the mobile target in the historical frame monitoring image being of the same category and both being located at the same position; Using the historical pixel size and the current pixel size respectively, obtain the historical actual size of the target to be calibrated and the current actual size of the target to be calibrated; Correcting the current actual size based on the historical actual size to obtain a corrected actual size; Wherein, determining the historical pixel size and the current pixel size based on the monitoring image includes: performing target recognition processing on the monitoring image to obtain target information, wherein the target information includes the pixel size of the mobile target; tracking the mobile target to generate tracking information; determining based on the tracking information whether the moving trajectories of at least two mobile targets of the same category have overlapping positions; if so, obtaining the pixel size of the mobile target located at the overlapping position as the current pixel size; for the historical frame monitoring image, obtaining the historical pixel size.

2. The size calibration method according to claim 1, characterized in that: The step of correcting the current actual size based on the historical actual size to obtain a corrected actual size includes: A weighted sum is performed on the historical actual size and the current actual size to obtain the corrected actual size.

3. The size calibration method according to claim 1, characterized in that: The method further comprises: Dividing the pixel size of the target to be calibrated by the current pixel size of the moving target to obtain a current pixel size ratio; The actual size of the moving object is multiplied by the current pixel size ratio to obtain the current actual size.

4. The size calibration method according to claim 1, characterized in that: The method further comprises: Determine whether the preset correction end condition is met; If not, return to the step of determining the current pixel size until the preset correction end condition is met.

5. The size calibration method according to claim 4, characterized in that: The step of determining whether a preset correction end condition is met includes: Determine whether the variance between the current actual size and the historical actual size is less than a preset threshold; If so, it is determined that the preset correction end condition is met.

6. The size calibration method according to claim 4, characterized in that: The method further comprises: Filling the target to be calibrated into the background image, and determining whether the pixel ratio of the target to be calibrated in the background image exceeds a preset ratio; If so, it is determined that the preset correction end condition is met.

7. The size calibration method according to claim 1, characterized in that: The method further comprises: Calculating the moving speed of the moving target based on the moving distance of the moving target and the moving time of the moving target; Determining whether the moving speed is greater than a preset speed; If so, it is determined that an abnormal situation has occurred.

8. A size calibration device, characterized in that: It comprises a memory and a processor connected to each other, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, it is used to implement the size calibration method described in any one of claims 1 to 7.

9. A computer-readable storage medium for storing a computer program, characterized in that: When the computer program is executed by a processor, it is used to implement the dimension calibration method described in any one of claims 1 to 7.