Calibration method and apparatus for ai-algorithm-based surveillance camera, and storage medium

WO2026200040A1PCT designated stage Publication Date: 2026-10-01E SURFING VISION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/141475
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2025-03-28
Filing Date
2025-12-10
Publication Date
2026-10-01

Smart Images

  • Figure CN2025141475_01102026_PF_FP_ABST
    Figure CN2025141475_01102026_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to a calibration method and apparatus for an AI-algorithm-based surveillance camera, and a storage medium. The method comprises: establishing an algorithm configuration model on the basis of preset weight proportions of calibration indicators and an algorithm installation specification dataset; acquiring scene images captured by a camera and calibration indicator data of the camera, detecting target objects from the scene images, and defining detection regions, so as to obtain a target surveillance AI algorithm type; in combination with the calibration indicator data and the actual size of each target object, calculating the distance between the target object and the camera; acquiring a target installation specification dataset by means of the algorithm configuration model; on the basis of the target installation specification dataset, calculating required adjustment distances and a proportion weight of each target object; and then, calculating weighted average adjustment values, and on the basis of the weighted average adjustment values, calibrating the camera. The problems of the calibration efficiency during AI-based surveillance compliance detection on cameras being low and it being difficult to adapt to updates of algorithm specifications are solved, thereby significantly improving the calibration efficiency during AI-based surveillance compliance detection on cameras, and achieving flexible adaptation to updates and adjustments of algorithm specifications.
Need to check novelty before this filing date? Find Prior Art

Description

Calibration methods, devices, and storage media for AI algorithm-controlled cameras Technical Field

[0001] This application relates to the field of compliance testing for AI-controlled cameras, and in particular to calibration methods, devices, and storage media for AI algorithm-controlled cameras. Background Technology

[0002] With the rapid development of emerging information technologies, AI algorithm deployment technology has been widely applied in various fields such as urban management and security monitoring. By utilizing advanced artificial intelligence video analysis technology, efficient and accurate monitoring and deployment in various complex scenarios have been achieved. Therefore, adopting AI analysis technology in current urban management has become a mainstream trend. The core preliminary work of the smart city management platform lies in accurately adjusting the camera layout, configuring the algorithm, and effectively generating alarms based on the algorithm installation standards.

[0003] However, due to the significant differences in installation requirements for various AI algorithms, encompassing multiple aspects such as basic camera parameter configuration, shooting orientation, lighting conditions, scene selection, and adaptability to the surrounding environment, practical applications necessitate strict, step-by-step adjustments to each camera according to specifications. This process is not only tedious and complex but also requires manual execution by professionals with knowledge of algorithm specifications, resulting in high labor costs and low efficiency. More importantly, as algorithm specifications are continuously updated and adjusted, existing systems often struggle to respond quickly, posing a significant risk of lag.

[0004] Currently, no effective solutions have been proposed for the problems of low calibration efficiency and difficulty in adapting to algorithm specification updates in the compliance detection of camera AI deployment in related technologies. Summary of the Invention

[0005] This application provides a calibration method, apparatus, system, electronic device, and storage medium for AI algorithm-controlled cameras, to at least solve the problems of low calibration efficiency and difficulty in adapting to algorithm specification updates in the compliance detection of AI-controlled cameras in related technologies.

[0006] In a first aspect, embodiments of this application provide a calibration method for AI algorithm-controlled cameras, including:

[0007] An algorithm configuration model is created based on the preset calibration index weight ratios and the preset algorithm installation specification dataset.

[0008] Acquire scene images captured by the camera to be debugged and calibration index data of the camera to be debugged; detect target objects from the scene images and delineate detection areas from the scene images based on the object category corresponding to the target objects; obtain the target deployment AI algorithm type based on the location of the detection area and the object category;

[0009] Based on the calibration index data and the actual size of the target object, the distance between the target object and the camera is calculated; the target deployment AI algorithm type is substituted into the algorithm configuration model to obtain the target installation specification dataset;

[0010] Based on the target installation specification dataset and the distance between the target object and the camera, the distance to be adjusted and the weight of each target object are calculated.

[0011] Based on the distance to be adjusted and the proportion of each of the target objects, the weighted average value to be adjusted is calculated, and the camera to be debugged is calibrated based on the weighted average value to be adjusted.

[0012] In some embodiments, defining the detection region from the scene image includes:

[0013] Based on the calibration index weight ratio and the calibration index data, it is determined whether the camera to be debugged is suitable for deploying AI algorithms.

[0014] If the camera to be debugged is suitable for the deployment AI algorithm, then the target object will continue to be detected from the scene image;

[0015] If the camera to be debugged is not suitable for deploying the AI ​​algorithm, then calibration should be stopped.

[0016] In some embodiments, determining whether the camera to be debugged is suitable for deployment AI algorithms based on the calibration index weight ratio and the calibration index data includes:

[0017] Based on the weight ratio of the calibration indicators and the preset installation specification dataset, the calibration indicator threshold is calculated;

[0018] The calibration index score is calculated based on the calibration index threshold, the calibration index data, and the calibration index weight ratio.

[0019] Based on the comparison results between the calibration index score and the preset requirement score, it is determined whether the camera to be debugged is suitable for deployment AI algorithm.

[0020] In some embodiments, calculating the distance between the target object and the camera based on the calibration index data and the actual size of the target object includes:

[0021] Based on the calibration index data and the actual size of the target object, calculate the ratio of the target object to its actual size.

[0022] Based on the ratio of the target object to its actual size, the distance between the target object and the camera is calculated.

[0023] In some embodiments, the weighted average to be adjusted includes a weighted distance value, a weighted pitch angle value, and a weighted horizontal angle value; the calculation of the weighted average to be adjusted based on the distance to be adjusted and the proportion weight of each of the target objects includes:

[0024] The weighted distance value is calculated based on the distance to be adjusted and the proportion weight of each of the target objects.

[0025] Based on the distance between the target object and the camera, and the installation height of the camera to be tested, the weighted pitch angle value is calculated, and based on the distance between the target object and the camera, the weighted horizontal angle value is calculated.

[0026] In some embodiments, the weighted pitch angle value is calculated based on the distance between the target object and the camera and the installation height of the camera to be tested, including:

[0027] Based on the distance between the target object and the camera and the installation height of the camera to be tested, the elevation angle of each target object is calculated;

[0028] The weighted elevation angle value is calculated based on the elevation angle of each target object and the proportion weight of each target object.

[0029] In some embodiments, calculating the weighted horizontal angle value based on the distance between the target object and the camera includes:

[0030] Based on the horizontal position of the center point of the detection area and the horizontal position of the camera to be debugged, the horizontal distance between the target object and the camera is obtained;

[0031] Based on the horizontal distance and the distance between the target object and the camera, calculate the horizontal offset angle of the target object;

[0032] The weighted horizontal angle value is calculated based on the horizontal offset angle and the proportion weight of each of the target objects.

[0033] In some embodiments, the weighted average value to be adjusted includes a weighted distance value, a weighted elevation angle value, and a weighted horizontal angle value; the calibration of the camera to be debugged based on the weighted average value to be adjusted includes:

[0034] The target height is calculated based on the weighted distance value, the installation height of the camera to be debugged, and the height adjustment weight.

[0035] The target elevation angle is calculated based on the weighted elevation angle value and the elevation angle adjustment weight.

[0036] The target horizontal angle is calculated based on the weighted horizontal angle value and the horizontal angle adjustment weight; wherein the sum of the height adjustment weight, the pitch angle adjustment weight, and the horizontal angle adjustment weight is one.

[0037] The camera to be tested is calibrated based on the target height, the target pitch angle, and the target horizontal angle.

[0038] Secondly, embodiments of this application provide a calibration device for AI algorithm-controlled cameras, comprising:

[0039] The algorithm configuration model module is used to create an algorithm configuration model based on the preset calibration index weight ratio and the entire algorithm installation specification dataset.

[0040] The algorithm type determination module is used to acquire scene images captured by the camera to be debugged and calibration index data of the camera to be debugged; detect target objects from the scene images and delineate detection areas from the scene images based on the object category corresponding to the target objects; and obtain the target deployment AI algorithm type based on the location of the detection area and the object category.

[0041] The algorithm calculation module is used to calculate the distance between the target object and the camera based on the calibration index data and the actual size of the target object; and to obtain the target installation specification dataset based on the target deployment AI algorithm type.

[0042] The algorithm calculation module is also used to calculate the distance to be adjusted and the proportion weight of each target object based on the target installation specification dataset and the distance between the target object and the camera.

[0043] The calibration module is used to calculate the weighted average value to be adjusted based on the distance to be adjusted and the proportion weight of each of the target objects, and to calibrate the camera to be debugged based on the weighted average value to be adjusted.

[0044] Thirdly, embodiments of this application provide a storage medium storing a computer program that, when executed by a processor, implements the AI ​​algorithm-based camera calibration method as described in the first aspect above.

[0045] Compared to related technologies, the AI ​​algorithm-based camera calibration method, device, and storage medium provided in this application, by constructing an algorithm configuration model, determines different algorithm installation specification datasets and weight values ​​corresponding to different indicators, detects target objects and delineates detection areas based on real-time camera images, combines and judges the optimal AI algorithm for camera deployment, calculates the target object's size ratio and distance, and comprehensively determines adjustment parameters (height, horizontal angle, and tilt angle) to achieve adaptive calibration. This solves the problems of low calibration efficiency and difficulty in adapting to algorithm specification updates in related technologies for AI-based camera deployment compliance detection. It achieves precise adaptive adjustment of the camera, significantly improving the calibration efficiency of AI-based camera deployment compliance detection, and flexibly adapting to algorithm specification updates and adjustments, thus reducing labor costs and time consumption.

[0046] Details of one or more embodiments of this application are set forth in the following drawings and description to make other features, objects and advantages of this application more readily apparent. Attached Figure Description

[0047] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0048] Figure 1 is a hardware structure block diagram of the terminal of the AI ​​algorithm-controlled camera calibration method according to an embodiment of the present invention.

[0049] Figure 2 is a flowchart of a calibration method for AI algorithm-controlled cameras according to an embodiment of this application;

[0050] Figure 3 is a schematic diagram of the installation and deployment of the camera to be debugged according to a preferred embodiment of this application;

[0051] Figure 4 is a flowchart of a calibration method for AI algorithm-controlled cameras according to a preferred embodiment of this application;

[0052] Figure 5 is a structural block diagram of a calibration device for an AI algorithm-controlled camera according to an embodiment of this application. Detailed Implementation

[0053] To make the objectives, technical solutions, and advantages of this application clearer, the application is described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the application. All other embodiments obtained by those skilled in the art based on the embodiments provided in this application without inventive effort are within the scope of protection of this application. Furthermore, it is understood that although the efforts made in such a development process may be complex and lengthy, for those skilled in the art related to the content disclosed in this application, modifications to design, manufacturing, or production based on the technical content disclosed in this application are merely conventional technical means and should not be construed as insufficient disclosure of the content of this application.

[0054] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment that is mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments without conflict.

[0055] Unless otherwise defined, the technical or scientific terms used in this application shall have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. The terms “a,” “an,” “an,” “the,” and similar words used in this application do not indicate quantity limitation and may indicate singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof used in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units not listed, or may include other steps or units inherent to these processes, methods, products, or devices. The terms “connected,” “linked,” “coupled,” and similar words used in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. “Multiple” used in this application means two or more. “And / or” describes the relationship between related objects, indicating that three relationships may exist; for example, “A and / or B” can represent: A alone, A and B simultaneously, and B alone. The terms “first,” “second,” “third,” etc., used in this application are merely to distinguish similar objects and do not represent a specific ordering of the objects.

[0056] The method embodiments provided in this example can be executed in a terminal, computer, or similar computing device. Taking the operation on a terminal as an example, FIG1 is a hardware structure block diagram of the terminal of the AI ​​algorithm-controlled camera calibration method according to an embodiment of the present invention. As shown in FIG1, the terminal may include one or more (only one is shown in FIG1) processors 102 (processors 102 may include, but are not limited to, microprocessors MCUs or programmable logic devices FPGAs, etc.) and a memory 104 for storing data. Optionally, the terminal may also include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that the structure shown in FIG1 is only illustrative and does not limit the structure of the terminal. For example, the terminal may also include more or fewer components than shown in FIG1, or have a different configuration than shown in FIG1.

[0057] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the AI ​​algorithm-based camera calibration method in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the aforementioned method. The memory 104 may include high-speed random access memory and non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0058] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the terminal's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.

[0059] This embodiment provides a calibration method for AI algorithm-controlled cameras. Figure 2 is a flowchart of the calibration method for AI algorithm-controlled cameras according to an embodiment of this application. As shown in Figure 2, the process includes the following steps:

[0060] Step S201: Based on the preset calibration index weight ratio and the preset algorithm installation specification dataset, create an algorithm configuration model;

[0061] The pre-defined algorithm installation specification dataset refers to the data set used to determine the installation specifications of different algorithms. This dataset contains the standards and specifications that various algorithms must follow during installation, including but not limited to requirements regarding basic camera parameter configuration, shooting orientation, lighting conditions, scene selection, and adaptability to the surrounding environment. The calibration indicator weight ratios are the weight ratios that staff assign to each calibration indicator (such as resolution, frame rate, lighting, occlusion, focal length, etc.) based on actual conditions. These weight ratios reflect the importance of each indicator in the algorithm configuration.

[0062] A dataset of algorithm installation specifications for different algorithms is collected and organized. Then, the weight ratios of different calibration indicators are determined. Using machine learning or deep learning techniques, the thresholds for each calibration indicator are calculated based on the algorithm installation specification dataset and the weight ratios, thus constructing an algorithm configuration model. This model receives camera scene images as input, calculates calibration indicator data values, and compares them with the corresponding thresholds and weight ratios to determine whether the camera is suitable for deploying the AI ​​algorithm. Simultaneously, the model is also used to determine the target AI algorithm type based on the location and category of the target object within the detection area, and to calculate the optimal camera adjustment scheme.

[0063] This step automates and automates camera configuration by building an algorithm configuration model, improving configuration efficiency. Furthermore, the setting of weight ratios and the collection of algorithm installation specification datasets enable the model to flexibly adjust the configuration scheme according to actual needs, improving the model's adaptability to different algorithms and scenarios.

[0064] Step S202: Obtain scene images captured by the camera to be debugged and calibration index data of the camera to be debugged; detect target objects from the scene images and delineate detection areas from the scene images based on the object category corresponding to the target objects; obtain the target deployment AI algorithm type based on the location of the detection area and the object category.

[0065] This process involves capturing scene images in real-time using a camera and collecting calibration data for the camera under test, obtaining values ​​for resolution, frame rate, lighting, occlusion, and focal length. Target objects are detected from the scene images using an object detection algorithm, and detection areas are defined based on the object's category (e.g., human body, bicycle). A combination judgment is made based on the location of the detection area and the object category, using a pre-defined algorithm mapping relationship to obtain the target deployment AI algorithm type that best matches the target area. The specific judgment formula is as follows: A best =A(R(D(I)),{C(r)|r∈R(D(I))},T)

[0066] In the above formula, I is the input scene image, D(I) is the target object detection result on scene image I, R(D(I)) is the set of detection regions defined based on the target object detection result, C(r) is the center point of the target object r in the detection region, T is the class set, and A best It is the AI ​​algorithm type that best matches the target deployment.

[0067] This step utilizes image recognition and target detection technologies to achieve rapid processing of scene images and accurate detection of target objects. By precisely defining the detection area and intelligently selecting algorithms, it intelligently chooses the most suitable deployment AI algorithm based on different monitoring scenarios and target object categories, thereby improving the accuracy of target object recognition and deployment.

[0068] Step S203: Based on the calibration index data and the actual size of the target object, calculate the distance between the target object and the camera; substitute the target deployment AI algorithm type into the algorithm configuration model to obtain the target installation specification dataset;

[0069] This process involves using known calibration data and the actual size of the target object to calculate the distance between the target object and the camera through geometric calculations or a deep learning model. The target deployment AI algorithm type is then input into the algorithm configuration model. Based on a pre-defined algorithm installation specification dataset, the model outputs an installation specification dataset that matches the target algorithm type. This step, by calculating the distance between the target object and the camera, provides crucial parameters for subsequent camera calibration and obtains an installation specification dataset that matches the target deployment AI algorithm type, providing a basis for precise camera configuration.

[0070] Step S204: Based on the target installation specification dataset and the distance between the target object and the camera, calculate the distance to be adjusted and the weight of each target object.

[0071] This process involves obtaining the ideal distance between the camera and the target object based on the target installation specification dataset. Combining this with the actual distance between the target object and the camera, the required adjustment distance for the camera is calculated. Furthermore, considering factors such as the importance of the target object (e.g., a human body might be more important than a bicycle) and the number of objects, a weighted approach is assigned to each target object. This step, by calculating the required adjustment distance, provides a specific adjustment target for camera calibration. Assigning weighted approaches to each target object allows the camera calibration to focus more on important targets, improving the targeting and effectiveness of the calibration.

[0072] Step S205: Calculate the weighted average value to be adjusted based on the distance to be adjusted and the proportion of each target object, and calibrate the camera to be debugged based on the weighted average value to be adjusted.

[0073] This process involves using a weighted average formula, combining the distance to be adjusted with the relative weight of each target object, to calculate the weighted average value to be adjusted. Based on this weighted average value, parameters such as the camera's height, horizontal angle, and tilt angle are adjusted to achieve precise camera calibration. This step, by calculating the weighted average value, comprehensively considers the importance of each target object and distance factors, making the calibration results more accurate and reliable, and improving the accuracy and efficiency of deployment.

[0074] Through the above steps, an algorithm configuration model is constructed based on the preset calibration index weight ratios and algorithm installation specification dataset. This allows for the precise calculation of thresholds for each detection index, ensuring the accuracy and applicability of subsequent calibration processes and avoiding the errors and inconveniences caused by manual configuration in traditional methods. By acquiring scene images captured by the camera to be debugged and calibration index data, intelligent recognition of target objects is achieved. Based on the category of the target object, a detection area is delineated from the scene image, and the optimal deployment AI algorithm type is obtained based on the location of the detection area and the object category. This not only improves the accuracy and efficiency of deployment but also enables the system to automatically adapt to different monitoring scenarios and algorithm requirements. The distance between the target object and the camera is calculated, and the target installation specification dataset is obtained. By comparing the actual size of the target object with its displayed size in the image, the distance between the target object and the camera can be accurately calculated. The selected deployment AI algorithm type is then substituted into the algorithm configuration model to obtain the corresponding installation specification dataset. The automated processing significantly reduces manual intervention and improves calibration efficiency. Based on the target installation specification dataset and the distance between the target and the camera, the adjustment distance and the weight of each target object are calculated, fully considering the importance and positional relationship of different targets in the camera's field of view, providing a more refined adjustment scheme for subsequent calibration. According to the adjustment distance and the weight of each target object, the weighted average adjustment value is calculated, and the camera to be tested is calibrated based on this value. The calibration results not only include parameters such as the camera's height, horizontal angle, and tilt angle, but also ensure that these parameters match the actual needs of the monitoring scene and the target object. This achieves automated calibration of camera AI deployment compliance detection, successfully solving the problems of low efficiency and poor adaptability in traditional camera calibration methods. It improves the efficiency and accuracy of calibration operations required for AI algorithm deployment, and also reduces labor costs and time consumption, providing strong technical support for the construction of a smart city management platform.

[0075] In some embodiments, defining the detection region from the scene image includes:

[0076] Based on the weight ratio of calibration indicators and calibration indicator data, determine whether the camera to be debugged is suitable for deploying AI algorithms.

[0077] If the camera to be tested is suitable for the deployment of AI algorithms, then continue to detect the target object from the scene image;

[0078] If the camera to be tested is not suitable for deploying the AI ​​algorithm, then calibration should be stopped.

[0079] The calibration process involves comparing the data values ​​and corresponding weights of calibration indicators such as resolution R, frame rate F, light intensity L, occlusion O, and focal length Z. Each indicator's data value is compared to a threshold calculated by the algorithm's configuration model, and combined with the corresponding weight values ​​to obtain a score for each indicator, such as the score for resolution R. The total score for all indicators is calculated and compared to a preset value (depending on application requirements). If the total score meets preset conditions (e.g., exceeding a certain threshold), the camera under test is deemed suitable for the AI ​​algorithm; otherwise, it is not. If suitable for the AI ​​algorithm, target objects are detected from the scene image, and calibration continues. If unsuitable, the calibration process stops to avoid ineffective or inefficient deployment operations when conditions are not met. This embodiment uses an algorithm configuration model to accurately calculate the thresholds of each calibration index, and further combines weight values ​​and index data values ​​to determine whether the camera is suitable for the AI ​​algorithm. After confirming that the camera is suitable for the AI ​​algorithm, further target object detection and optimal algorithm judgment can ensure the accuracy and effectiveness of the deployment. For cameras that are not suitable for the AI ​​algorithm, the calibration process is stopped in time to avoid wasting computing resources and time. This enables a rapid assessment of whether a camera is suitable for the AI ​​algorithm, thereby improving the efficiency and accuracy of deployment.

[0080] In some embodiments, based on the calibration index weight ratio and calibration index data, it is determined whether the camera to be debugged is suitable for deployment of AI algorithms, including:

[0081] Based on the calibration index weight ratio and the preset installation specification dataset, the calibration index threshold is calculated.

[0082] The calibration index score is calculated based on the calibration index threshold, calibration index data, and calibration index weight ratio.

[0083] Based on the comparison results of calibration index scores and preset requirement scores, it is determined whether the camera to be debugged is suitable for deployment of AI algorithms.

[0084] The algorithm configuration model calculates thresholds for each calibration indicator using a pre-set installation specification dataset. These thresholds represent the standard values ​​for each calibration indicator when the camera is suitable for deployment with the AI ​​algorithm in a specific scenario. For each calibration indicator, its ratio to the corresponding threshold is calculated and multiplied by the corresponding weight value to obtain the indicator's score. The scores of all calibration indicators are summed to obtain the total calibration score. This total score is compared with a pre-set requirement score, which is set based on actual application requirements and represents the minimum calibration level required for the camera to be suitable for deployment with the AI ​​algorithm. If the total calibration score is higher than or equal to the pre-set requirement score, the camera is deemed suitable for deployment with the AI ​​algorithm; otherwise, it is deemed unsuitable. The specific formula is as follows:

[0085] Where i represents any calibration metric; M represents the algorithm configuration model, including threshold and weight values; score i V represents the score corresponding to each calibration indicator; i This represents the data value corresponding to each calibration indicator; R: resolution data value, F: frame rate data value, L: light data value, O: occlusion data value, Z: focal length data value.

[0086] M algos M represents the installation specification dataset for different algorithms. weights M represents the weight values ​​corresponding to different indicators. thresholds This represents the calculated threshold, and the formula for calculating the threshold is M. thresholds =f(M algos M weights ).

[0087] This embodiment, by comprehensively considering the weight ratios and thresholds of different calibration indicators, can more accurately assess whether a camera is suitable for deployment AI algorithms. It avoids misjudgments that may be caused by judging a single indicator, and improves the accuracy and reliability of the judgment. By adaptively adjusting the installation specification dataset and calibration indicator weight ratios according to different algorithms, it enhances the flexibility and scalability of the camera deployment system, making it suitable for a variety of complex deployment scenarios. It enables rapid assessment of whether a camera is suitable for deployment AI algorithms, reducing the time and cost of manual judgment.

[0088] In some embodiments, the distance between the target object and the camera is calculated based on calibration index data and the actual size of the target object, including:

[0089] Based on the calibration index data and the actual size of the target object, calculate the ratio of the target object to its actual size.

[0090] The distance between the target object and the camera is calculated based on the ratio of the target object to its actual size.

[0091] The process involves using image detection algorithms to detect target objects in the real-time or frame-by-frame images captured by the camera. For each detected target object, the ratio of its size in the image to its actual size is calculated based on a pre-defined database of actual target object sizes (e.g., standard dimensions of a human body, bicycle, or car). This can be achieved by measuring the pixel dimensions of the target object in the image and comparing them to its actual size. Based on this calculated ratio, and combined with calibration data such as the camera's focal length and resolution, the actual distance between the target object and the camera is calculated using geometric relationships or relevant formulas in the algorithm configuration model. This may require considering various factors, such as the camera's installation height, tilt angle, and the target object's orientation, to ensure the accuracy of the calculation results. This embodiment can more accurately determine the position and dynamics of the target object by precisely calculating the distance between the target object and the camera, thereby improving the precision and accuracy of AI algorithm deployment. Based on the actual size of different target objects and their size ratio in the image, the calculation parameters and algorithm configuration are automatically adjusted to adapt to the deployment needs of different scenarios and target objects. Furthermore, by automatically processing the identification and distance calculation of multiple target objects simultaneously, it supports the multi-target deployment needs in complex scenarios, reduces the need for manual intervention and manual camera adjustment, thereby simplifying the deployment process and improving work efficiency.

[0092] In some embodiments, the weighted average to be adjusted includes a weighted distance value, a weighted pitch angle value, and a weighted horizontal angle value; the weighted average to be adjusted is calculated based on the distance to be adjusted and the proportion weight of each target object, including:

[0093] Calculate the weighted distance value based on the distance to be adjusted and the proportion of each target object;

[0094] Based on the distance between the target object and the camera, and the installation height of the camera to be tested, the weighted elevation angle is calculated, and based on the distance between the target object and the camera, the weighted horizontal angle is calculated.

[0095] Each target object has its own weight, which is typically determined based on its importance, location within the scene, or other relevant factors. Combining the weights of each target object with the distance to be adjusted, a weighted distance value A is calculated. The formula is as follows:

[0096] Where n is the number of target objects; the calculated proportion P(i) is O iThe i-th target object type is represented by g(P(i),R,Z); g(P(i),R,Z) is the function for calculating distance; O represents other configuration parameters, which may include target object type, camera parameters, etc.; M d and M w These represent the functions in the algorithm configuration model M used to calculate the distance and weights to be adjusted.

[0097] Given the distance A between the center point of each target object and the camera, and the camera installation height H, the elevation angle to be adjusted for each target object is calculated using the algorithm configuration model M. Then, based on the proportion and weight of each target object, the weighted elevation angle value B is calculated.

[0098] Calculate the horizontal offset angle between the center point of each target object and the camera, configure the model M using the algorithm, calculate the horizontal angle to be adjusted for each target object, and then calculate the weighted horizontal angle value C based on the proportion weight of each target object.

[0099] This embodiment comprehensively considers the adjustable distance, elevation angle, and horizontal angle of each target object, enabling the processing of multiple target objects and assigning appropriate weights to each target object. This allows for the calculation of a more accurate camera adjustment scheme, thereby improving the accuracy of deployment and making it particularly suitable for deployment needs in complex scenarios. Furthermore, compared to manually adjusting the camera, it automatically calculates and adjusts the camera parameters, thus greatly reducing labor costs and time consumption.

[0100] In some embodiments, a weighted pitch angle value is calculated based on the distance between the target object and the camera and the installation height of the camera to be tested, including:

[0101] Based on the distance between the target object and the camera and the installation height of the camera to be tested, the elevation and depression angles of each target object are calculated.

[0102] The weighted elevation angle value is calculated based on the elevation angle of each target object and the weight of each target object.

[0103] The process involves capturing image information of the target object by extracting frames from real-time camera footage, determining the center point coordinates of the target object using an image detection algorithm, and calculating the elevation angle of each target object using geometric principles based on the straight-line distance between the target object's center point and the camera (i.e., the distance between the target object and the camera) and the camera's installation height H. The specific formula is as follows: Where A i θ is the distance between the i-th target and the camera. i This represents the elevation angle that the algorithm configuration model calculates the i-th target object should adjust.

[0104] Determine the weight values ​​corresponding to the pitch angles of different target objects, and calculate the weighted pitch angle value B using the weighted average formula, as follows:

[0105] Among them, M wi This represents the weighting of the elevation angle of the i-th target.

[0106] This embodiment, based on precise elevation and tilt angle calculation and adjustment, can ensure that the camera monitors the target object at the optimal angle, reduce blind spots, improve monitoring quality, and quickly determine the camera adjustment scheme by automatically calculating the elevation and tilt angles and weighted elevation and tilt angle values ​​of the target object, without the need for manual measurement and adjustment, which greatly improves the deployment and debugging efficiency of the monitoring system.

[0107] In some embodiments, a weighted horizontal angle value is calculated based on the distance between the target object and the camera, including:

[0108] Based on the horizontal position of the center point of the detection area and the horizontal position of the camera to be debugged, the horizontal distance between the target object and the camera is obtained;

[0109] Calculate the horizontal offset angle of the target object based on the horizontal distance and the distance between the target object and the camera;

[0110] The weighted horizontal angle value is calculated based on the horizontal offset angle and the proportion weight of each target object.

[0111] Specifically, the horizontal position (x) of the center point of each target object within the detection area is determined using an image detection algorithm. t ,y t ), obtain the horizontal position (x) of the camera to be debugged. c ,y c (i.e., the coordinates of its installation location or reference point), calculate the straight-line distance between the center point of each target object and the horizontal position of the camera, i.e., the horizontal distance d. ref The horizontal offset angle of each target object can be calculated using the following formula:

[0112] Then, based on the horizontal offset angle and the proportion weight of each target object, the weighted horizontal angle value is calculated, as shown in the following formula:

[0113] This embodiment, by accurately calculating the weighted horizontal angle value, can more rationally allocate and adjust the position and orientation resources of the camera, avoiding unnecessary waste of resources and duplication of work, and improving resource utilization efficiency. By accurately calculating the horizontal offset angle between the target object and the camera, and combining it with the weighted average of the proportion of each target object, it can more accurately reflect the overall offset of the camera relative to the target object, which helps to more accurately adjust the position and orientation of the camera in subsequent steps, thereby improving the accuracy of deployment.

[0114] In some embodiments, the weighted average value to be adjusted includes a weighted distance value, a weighted elevation angle value, and a weighted horizontal angle value; based on the weighted average value to be adjusted, the camera to be debugged is calibrated, including:

[0115] The target height is calculated based on the weighted distance value, the installation height of the camera to be tested, and the height adjustment weight.

[0116] The target's elevation angle is calculated by adjusting the weights based on the weighted elevation angle value and elevation angle.

[0117] The target horizontal angle is calculated based on the weighted horizontal angle value and the horizontal angle adjustment weight; where the height adjustment weight, the pitch angle adjustment weight, and the horizontal angle adjustment weight are summed to one.

[0118] The camera to be tested is calibrated based on the target height, target elevation angle, and target horizontal angle.

[0119] Specifically, based on the weighted distance value A, weighted elevation angle value B, and weighted horizontal angle value C, and combined with the corresponding adjustment weights, the target height, target elevation angle, and target horizontal angle are calculated. Then, the camera to be debugged is adjusted accordingly, as shown in the following formula:

[0120] Height adjustment formula: H final =H+M H ×A;

[0121] Pitch angle adjustment formula: θ final =M B ×B;

[0122] Horizontal angle adjustment formula: θ' final =M C ×C;

[0123] M H To highly adjust the weights, M B Adjusting the weights for pitch angle, M C The weights are adjusted for the horizontal angle, and M H +M B +M C =1.

[0124] This embodiment, by accurately calculating weighted distance, weighted elevation, and weighted horizontal angle values, and combining them with corresponding adjustment weights, can derive the ideal parameters for the adjusted camera. This ensures that the camera accurately covers the target area during deployment, reduces blind spots, and improves monitoring effectiveness. Furthermore, compared to traditional manual adjustment methods, this embodiment can automatically and accurately complete the camera calibration process. Automated calibration not only reduces labor costs and time consumption but also improves calibration efficiency and accuracy. In addition, this invention can flexibly adjust according to different algorithm installation specifications and target object types. Whether facing new algorithm specifications or changes in target objects, it can quickly respond and calculate the optimal camera adjustment scheme.

[0125] The embodiments of this application will be described and illustrated below through preferred embodiments.

[0126] Figure 3 is a schematic diagram of the installation and deployment of the camera to be debugged according to a preferred embodiment of this application, and Figure 4 is a flowchart of the calibration method of the AI ​​algorithm-controlled camera according to a preferred embodiment of this application. As shown in Figure 4, the specific steps of this preferred embodiment are as follows:

[0127] S401, Create algorithm configuration model M, determine the installation specification datasets for different algorithms and the weight values ​​corresponding to different indicators, and calculate the threshold. An example of camera specification data for a certain type of algorithm is as follows:

[0128] (I) Basic camera parameter settings:

[0129] Resolution: 1080P is recommended, not lower than 720P, and not higher than 4K;

[0130] Frame rate: No higher than 25fps, no lower than 15fps, recommended value is 20fps;

[0131] Bitrate: 4096Kbps~6144Kbps is recommended for 720P, 6144Kbps~8192Kbps is recommended for 1080P, and higher bitrates can be set for higher resolutions;

[0132] Video encoding: If H.265 is supported, set it to H.265.

[0133] (ii) Camera shooting direction:

[0134] The camera should be positioned at a slightly overhead angle, with the following specific requirements:

[0135] Erection height: 5-10M;

[0136] Monitoring distance: 5-10M;

[0137] Monitoring width: 3-5M;

[0138] View angle: Left and right tilt angle less than 8°; Pitch angle 10°-20°.

[0139] (III) Lighting requirements:

[0140] During the day, the light intensity must be within normal lighting conditions, with a range of 60 to 1000 lux (excluding heavy rain, dense fog, etc.);

[0141] At night, there should be streetlights (to eliminate insufficient light) and the effects of reflection, excessive light, and backlight should be minimized.

[0142] Set M algos M represents the installation specification dataset for different algorithms. weights M represents the weight values ​​corresponding to different indicators. thresholds This represents the calculated threshold, and the formula for calculating the threshold is as follows: M thresholds =f(M algos M weights );

[0143] S402 acquires scene images from the camera, configures the model using an algorithm, calculates data values ​​for resolution, frame rate, lighting, occlusion, and focal length, compares these values ​​with thresholds and weights, calculates a score, and determines whether the AI ​​algorithm is suitable for deployment. The formula is as follows:

[0144] I: Camera scene image; M: Algorithm configuration model, including threshold and weight values.

[0145] R: Resolution data value, F: Frame rate data value, L: Light data value, O: Occlusion data value, Z: Focal length data value.

[0146] For each indicator, calculate its ratio to the threshold and multiply it by the corresponding weight value.

[0147] Calculate the total score for all metrics and compare it with a preset value (depending on application requirements) to determine if it is suitable for deploying the AI ​​algorithm.

[0148] S403 detects target objects based on image detection algorithms, delineates detection areas according to target object categories, calculates center points, and determines the optimal AI algorithm category based on the combination of detection area orientation and target object category. A best =A(R(D(I)),{C(r)|r∈R(D(I))},T);

[0149] Where I is the input image, D(I) is the target object detection result in image I, R(D(I)) is the set of detection regions defined based on the detection results, C(r) is the center point of the target object in detection region r, T is the set of categories, and A bestIt is the set of the best AI algorithm categories for deployment.

[0150] S404, based on the calculated AI algorithm type, substitute it into the algorithm configuration model, and calculate the ratio between the target object and its actual size based on the resolution, focal length, and the size of the reference target object (such as human body, bicycle, car, trash can, telephone pole, etc.). Calculate the distance between each target object and the camera based on the ratio, determine the camera's installation direction and tilt direction, calculate the distance that the target object should be adjusted and the weight of each area based on the algorithm configuration model, and calculate the weighted average value A of the distance that should be adjusted based on the distance and weight.

[0151] Where n is the number of target objects, and the calculated proportion P(i) is: o i This represents the type of the i-th target object.

[0152] The function for calculating distance is g(P(i),R,Z), where O represents other configuration parameters, which may include target object type, camera parameters, etc. d and M w These represent the functions in the algorithm configuration model M used to calculate the distance and weights to be adjusted.

[0153] S405, based on the distance A between the center point of the target object and the camera and the installation height H of the camera, calculate the elevation angle of each target object, calculate the elevation angle and weight of the target object to be adjusted according to the algorithm configuration model, and calculate the weighted average value B of the elevation angle to be adjusted according to the elevation angle and weight.

[0154] in, This represents the weighting of the elevation angle of the i-th target. The elevation angle of each target can be determined by... Calculate, where A i θ is the distance between the i-th target and the camera. i This represents the elevation angle that the algorithm configuration model calculates the i-th target object should adjust.

[0155] S406, Calculate the horizontal offset angle between the center point of the target object and the camera, calculate the horizontal angle that the target object should be adjusted and its weight according to the algorithm configuration model, and calculate the weighted average value C of the horizontal angle that should be adjusted according to the horizontal angle and weight.

[0156] in, This represents the weighting of the horizontal offset angle of the i-th target object. The horizontal offset angle of each target object can be determined by... Calculate the coordinates of the center point of the target object as (x t ,y t The camera's coordinates are (x...).c ,y c ), d ref The distance between the target object and the camera.

[0157] S407 calculates the final adjustable height, horizontal angle, and pitch angle of the camera based on the values ​​and weights of H, A, B, and C.

[0158] Height adjustment formula: H final =H+M H ×A;

[0159] Pitch angle adjustment formula: θ final =M B ×B;

[0160] Horizontal angle adjustment formula: θ' final =M C ×C;

[0161] Among them, M H M B M C These represent the weights of altitude, pitch angle, and horizontal angle, respectively, and M H +M B +M C =1.

[0162] This embodiment also provides a calibration device for AI algorithm-controlled cameras. This device is used to implement the above embodiments and preferred embodiments, and details already described will not be repeated. As used below, the terms "module," "unit," "subunit," etc., can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0163] Figure 5 is a structural block diagram of a calibration device for an AI algorithm-controlled camera according to an embodiment of this application. As shown in Figure 5, the device includes:

[0164] The algorithm configuration model module 10 is used to create an algorithm configuration model based on the preset calibration index weight ratio and the entire algorithm installation specification dataset.

[0165] The algorithm type determination module 20 is used to acquire scene images captured by the camera to be debugged and calibration index data of the camera to be debugged; detect target objects from the scene images and delineate detection areas from the scene images based on the object category corresponding to the target objects; and obtain the target deployment AI algorithm type based on the location of the detection area and the object category.

[0166] The algorithm calculation module 30 is used to calculate the distance between the target object and the camera based on calibration index data and the actual size of the target object; and to obtain the target installation specification dataset based on the target deployment AI algorithm type.

[0167] The algorithm calculation module 30 is also used to calculate the distance to be adjusted and the weight of each target object based on the target installation specification dataset and the distance between the target object and the camera.

[0168] The calibration module 40 is used to calculate the weighted average value to be adjusted based on the distance to be adjusted and the proportion of each target object, and to calibrate the camera to be debugged based on the weighted average value to be adjusted.

[0169] It should be noted that the above modules can be functional modules or program modules, and can be implemented through software or hardware. For modules implemented through hardware, the above modules can reside in the same processor; or the above modules can be located in different processors in any combination.

[0170] Furthermore, in conjunction with the AI ​​algorithm-based camera calibration method described in the above embodiments, this application embodiment can provide a storage medium for implementation. This storage medium stores a computer program; when executed by a processor, the computer program implements any of the AI ​​algorithm-based camera calibration methods described in the above embodiments.

[0171] Those skilled in the art should understand that the technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments have been described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0172] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A method for calibrating AI algorithm camera control, characterized in that, include: An algorithm configuration model is created based on the preset calibration index weight ratios and the preset algorithm installation specification dataset. Acquire scene images captured by the camera to be debugged and calibration index data of the camera to be debugged; Detect target objects from the scene image, and define detection areas from the scene image based on the object category corresponding to the target objects; Based on the location of the detection area and the category of the object, the target deployment AI algorithm type is obtained; Based on the calibration index data and the actual size of the target object, the distance between the target object and the camera is calculated; Substitute the target deployment AI algorithm type into the algorithm configuration model to obtain the target installation specification dataset; Based on the target installation specification dataset and the distance between the target object and the camera, the distance to be adjusted and the weight of each target object are calculated. Based on the distance to be adjusted and the proportion of each of the target objects, the weighted average value to be adjusted is calculated, and the camera to be debugged is calibrated based on the weighted average value to be adjusted.

2. The calibration method for AI algorithm-controlled cameras according to claim 1, characterized in that, The step of delineating the detection region from the scene image includes: Based on the calibration index weight ratio and the calibration index data, it is determined whether the camera to be debugged is suitable for deploying AI algorithms. If the camera to be debugged is suitable for the deployment AI algorithm, then the target object will continue to be detected from the scene image; If the camera to be debugged is not suitable for deploying the AI ​​algorithm, then calibration should be stopped.

3. The calibration method for AI algorithm-controlled cameras according to claim 2, characterized in that, The step of determining whether the camera to be debugged is suitable for deployment of AI algorithms based on the calibration index weight ratio and the calibration index data includes: Based on the weight ratio of the calibration indicators and the preset installation specification dataset, the calibration indicator threshold is calculated; The calibration index score is calculated based on the calibration index threshold, the calibration index data, and the calibration index weight ratio. Based on the comparison results between the calibration index score and the preset requirement score, it is determined whether the camera to be debugged is suitable for deployment AI algorithm.

4. The calibration method for AI algorithm-controlled cameras according to claim 1, characterized in that, The step of calculating the distance between the target object and the camera based on the calibration index data and the actual size of the target object includes: Based on the calibration index data and the actual size of the target object, calculate the ratio of the target object to its actual size. Based on the ratio of the target object to its actual size, the distance between the target object and the camera is calculated.

5. The calibration method for AI algorithm-controlled cameras according to claim 1, characterized in that, The weighted average value to be adjusted includes a weighted distance value, a weighted pitch angle value, and a weighted horizontal angle value; the calculation of the weighted average value to be adjusted based on the distance to be adjusted and the proportion weight of each of the target objects includes: The weighted distance value is calculated based on the distance to be adjusted and the proportion weight of each of the target objects. Based on the distance between the target object and the camera, and the installation height of the camera to be tested, the weighted elevation angle value is calculated, and based on the distance between the target object and the camera, the weighted horizontal angle value is calculated.

6. The calibration method for AI algorithm-controlled cameras according to claim 5, characterized in that, Based on the distance between the target object and the camera and the installation height of the camera to be tested, the weighted elevation angle value is calculated, including: Based on the distance between the target object and the camera and the installation height of the camera to be tested, the elevation angle of each target object is calculated; The weighted elevation angle value is calculated based on the elevation angle of each target object and the proportion weight of each target object.

7. The calibration method for AI algorithm-controlled cameras according to claim 5, characterized in that, The calculation of the weighted horizontal angle value based on the distance between the target object and the camera includes: Based on the horizontal position of the center point of the detection area and the horizontal position of the camera to be debugged, the horizontal distance between the target object and the camera is obtained; Based on the horizontal distance and the distance between the target object and the camera, calculate the horizontal offset angle of the target object; The weighted horizontal angle value is calculated based on the horizontal offset angle and the proportion weight of each of the target objects.

8. The calibration method for AI algorithm-controlled cameras according to claim 1, characterized in that, The weighted average values ​​to be adjusted include weighted distance values, weighted pitch angle values, and weighted horizontal angle values; The calibration of the camera to be debugged based on the adjusted weighted average includes: The target height is calculated based on the weighted distance value, the installation height of the camera to be debugged, and the height adjustment weight. The target elevation angle is calculated based on the weighted elevation angle value and the elevation angle adjustment weight. The target horizontal angle is calculated based on the weighted horizontal angle value and the horizontal angle adjustment weight; wherein the sum of the height adjustment weight, the pitch angle adjustment weight, and the horizontal angle adjustment weight is one. The camera to be tested is calibrated based on the target height, the target pitch angle, and the target horizontal angle.

9. A calibration device for AI algorithm-controlled cameras, characterized in that, include: The algorithm configuration model module is used to create an algorithm configuration model based on the preset calibration index weight ratio and the entire algorithm installation specification dataset. The algorithm type determination module is used to obtain scene images captured by the camera to be debugged and calibration index data of the camera to be debugged; The target object is detected from the scene image, and a detection area is delineated from the scene image based on the object category corresponding to the target object; the target deployment AI algorithm type is obtained based on the location of the detection area and the object category. The algorithm calculation module is used to calculate the distance between the target object and the camera based on the calibration index data and the actual size of the target object; Based on the target deployment AI algorithm type, obtain the target installation specification dataset; The algorithm calculation module is also used to calculate the distance to be adjusted and the proportion weight of each target object based on the target installation specification dataset and the distance between the target object and the camera. The calibration module is used to calculate the weighted average value to be adjusted based on the distance to be adjusted and the proportion weight of each of the target objects, and to calibrate the camera to be debugged based on the weighted average value to be adjusted.

10. A storage medium, characterized in that, The storage medium stores a computer program, wherein the computer program is configured to execute the calibration method for the AI ​​algorithm-controlled camera according to any one of claims 1 to 8 when running.