Camera calibration method and device for substation inspection and electronic equipment

By acquiring image templates and target images for quality evaluation and calibration, the problem of insufficient position offset and clarity of the power equipment image collected by the substation camera is solved, efficient and automatic camera calibration is achieved, and the intelligence level and safety of the inspection system are improved.

CN120451287AActive Publication Date: 2025-08-08STATE GRID BEIJING ELECTRIC POWER CO +1
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202510949826.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-10
Publication Date
2025-08-08
Estimated Expiration
2045-07-10

AI Technical Summary

Technical Problem

In the prior art, the power equipment images collected by the substation camera are prone to problems of position deviation and insufficient clarity, resulting in a decrease in patrol efficiency and accuracy.

Method used

By acquiring the image template and target image of the power equipment, performing image quality evaluation, determining whether the image quality score is less than the preset threshold, if it is lower than the threshold, determining the image positioning offset, and performing parameter calibration of the camera based on this, including adjusting the translation, tilt, zoom and focus parameters.

Benefits of technology

Fast and accurate camera calibration is achieved, ensuring the quality of the inspection image of the power equipment, improving the inspection efficiency and accuracy, reducing manual intervention, adapting to environmental changes, and maintaining the stability of the image quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120451287A_ABST
    Figure CN120451287A_ABST
Patent Text Reader

Abstract

The invention discloses a camera calibration method and device for substation inspection and electronic equipment. The method comprises the steps that in the process of routing inspection of power equipment in a transformer substation, an image template of the power equipment and a target image, collected by a camera based on a current preset position, of the power equipment are obtained, and the image template is an image which is collected for the power equipment and has the known accurate position and definition; performing image quality evaluation based on the image template and the target image to obtain a target image quality score; judging whether the target image quality score is smaller than a preset score threshold; determining a target image positioning offset between the image template and the target image under the condition that the target image quality score is smaller than a preset score threshold; and performing parameter calibration on the camera based on the target image positioning offset. According to the invention, the technical problems of easy position offset and insufficient definition of the electrical equipment image acquired based on the camera in the prior art are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of smart grids, and in particular to a camera calibration method, device, and electronic equipment for substation inspection. Background Art

[0002] With the continuous expansion of power systems and technological advancements, traditional power inspection methods are no longer able to meet the requirements of efficient and safe operation of modern power grids. Manual inspections are not only time-consuming and labor-intensive, but also pose potential safety risks. Inspections are particularly difficult and dangerous in remote areas or under adverse weather conditions. Therefore, the power grid industry has actively explored and promoted the use of advanced camera-based inspection technology to improve inspection efficiency and safety. In recent years, the development of technologies such as artificial intelligence, the Internet of Things, and big data has provided strong support for the intelligentization of power systems. By installing high-definition cameras on key infrastructure such as transmission lines and substations, combined with intelligent analysis algorithms, real-time monitoring of power equipment status and fault warnings can be achieved, significantly improving power grid operations and management.

[0003] Currently, in the actual use of a large number of substation online inspection systems, it is found that the camera is easily affected by natural factors (such as wind, rain, dust, temperature, vibration, etc.) and internal factors (unstable fixation, wear of mechanical components, differences in control accuracy, different firmware versions, etc.), resulting in inaccurate positioning of the pictures taken, preset position offset, blurred images, etc.

[0004] Currently, no effective solution has been proposed to the problems of positional offset and insufficient clarity that occur in power equipment images captured by cameras in the above-mentioned related technologies. Summary of the Invention

[0005] The embodiments of the present invention provide a camera calibration method, device and electronic equipment for substation inspection, so as to at least solve the technical problems in the related art of position offset and insufficient clarity of power equipment images collected by cameras.

[0006] According to one aspect of an embodiment of the present invention, a camera calibration method for substation inspection is provided, comprising: obtaining an image template of power equipment in the substation, and a target image of the power equipment captured by a camera based on a current preset position, wherein the image template is an image of known accurate position and clarity captured for the power equipment; performing image quality assessment based on the image template and the target image to obtain a target image quality score; determining whether the target image quality score is less than a preset score threshold; if the target image quality score is less than the preset score threshold, determining a target image positioning offset between the image template and the target image; and performing parameter calibration on the camera based on the target image positioning offset.

[0007] According to another aspect of an embodiment of the present invention, a camera calibration device for substation inspection is provided, including: an image acquisition module for acquiring an image template of power equipment in the substation, and a target image of the power equipment acquired by a camera based on a current preset position, wherein the image template is an image of a known accurate position and clarity acquired for the power equipment; a quality assessment module for performing image quality assessment based on the image template and the target image to obtain a target image quality score; a threshold judgment module for judging whether the target image quality score is less than a preset score threshold; an offset determination module for determining a target image positioning offset between the image template and the target image when the target image quality score is less than a preset score threshold; and a parameter calibration module for performing parameter calibration on the camera based on the target image positioning offset.

[0008] According to another aspect of an embodiment of the present invention, a non-volatile storage medium is provided. The non-volatile storage medium stores a plurality of instructions, and the instructions are suitable for being loaded and executed by a processor for any one of the camera calibration methods for substation inspection.

[0009] According to another aspect of an embodiment of the present invention, an electronic device is also provided, comprising one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by one or more processors, the one or more processors implement any one of the camera calibration methods for substation inspection.

[0010] In an embodiment of the present invention, an image template of the power equipment in the substation and a target image of the power equipment captured by a camera based on the current preset position are obtained, wherein the image template is an image of a known accurate position and clarity captured for the power equipment; an image quality assessment is performed based on the image template and the target image to obtain a target image quality score; it is determined whether the target image quality score is less than a preset score threshold; when the target image quality score is less than the preset score threshold, the target image positioning offset between the image template and the target image is determined; based on the target image positioning offset, the camera parameters are calibrated, thereby achieving the purpose of obtaining an image template and a real-time image for comparative evaluation, automatically determining the image quality deviation, and accurately adjusting the camera parameters based on the deviation information, thereby achieving the technical effect of quickly and accurately calibrating the camera, ensuring the image quality of the power equipment inspection, and improving the inspection efficiency and accuracy, thereby solving the technical problems in the related art of position offset and insufficient clarity that are prone to occur in the images of power equipment captured by the camera. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0012] Figure 1 is a flow chart of a camera calibration method for substation inspection according to an embodiment of the present invention;

[0013] Figure 2 is a flow chart of an optional camera calibration method for substation inspection according to an embodiment of the present invention;

[0014] Figure 3 This is an optional system framework diagram according to an embodiment of the present invention;

[0015] Figure 4 2 is a schematic diagram of a camera calibration device for substation inspection according to an embodiment of the present invention. DETAILED DESCRIPTION

[0016] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0017] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof 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 necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0018] According to an embodiment of the present invention, an embodiment of a method for calibrating a camera for substation inspection is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in an order different from that shown here.

[0019] Figure 1 FIG. 1 is a flow chart of a camera calibration method for substation inspection according to an embodiment of the present invention. Figure 1 As shown, the method includes the following steps:

[0020] Step S102, obtaining an image template of the power equipment in the substation and a target image of the power equipment captured by a camera at a current preset position;

[0021] Optionally, the target image can be a camera-captured image of the power equipment to be inspected in the substation. The image template is an image of the power equipment with a known accurate location and resolution. The image template includes a reference image and coordinate information for the target inspection object (e.g., the power equipment).

[0022] Optionally, the execution body of steps S102 to S110 may be a camera calibration system. The camera calibration system obtains an image template from the online intelligent patrol system of the substation. Before executing step S102, it may be detected whether there is an image template of the power equipment. If so, the operation of step S102 is executed. If not, the image template may be generated through online annotation by the camera calibration system, and then the operation of step S102 is executed. If the online intelligent patrol system already has an image template of the power equipment, it may be synchronized to the camera calibration system online or offline. The power equipment may include, but is not limited to, pointer meters, oil level meters, digital meters, knife switches, splitters, indicator lights, and the like. If the online intelligent patrol system does not have an image template, the camera calibration system may be used to generate an image template through online annotation. For example, a large number of substation equipment appearances do not have templates.

[0023] Optionally, the camera calibration system can obtain the camera preset position ID and the corresponding PTZF parameters indirectly from the online intelligent patrol system or directly from the camera. P (Pan) corresponds to the camera's horizontal rotation parameter; T (Tilt) corresponds to the camera's vertical pitch parameter; Z (Zoom) corresponds to the camera's zoom parameter, enabling adjustment of the lens's field of view; and F (Focus) corresponds to the camera's focus parameter, enabling adjustment of lens focus. The camera calibration system develops an automatic calibration plan, enabling unattended automatic calibration. Camera calibration can be performed during inspections of power equipment in substations. Furthermore, to avoid conflicts between calibration tasks and intelligent patrol tasks, the calibration system can compare and coordinate task plans with those of intelligent patrol tasks. For example, during idle time after a patrol task, if the recognition rate falls below a threshold, regular calibration is performed, executing steps S102 through S110.

[0024] Optionally, the camera calibration system captures images of power equipment in the substation based on the acquired camera preset IDs. Because substations often have multiple cameras, a single camera can have multiple presets. To improve efficiency, the image acquisition strategy can be executed in parallel across multiple cameras, with each camera capturing images sequentially based on the preset IDs to capture images of the power equipment.

[0025] Step S104, performing image quality assessment based on the image template and the target image to obtain a target image quality score;

[0026] Optionally, the quality of the target image can be evaluated by comparing the image template with the target image. The comparison angles may include, but are not limited to, the clarity of the target image, the offset of the target image relative to the image template, and the like.

[0027] In an optional embodiment, an image quality assessment is performed based on the image template and the target image to obtain a target image quality score, including: performing a clarity comparison on the image template and the target image to obtain a clarity comparison result; performing feature registration on the image template and the target image to obtain a feature registration result, wherein the feature registration result is used to indicate the offset of feature points included in the target image relative to the image template; and obtaining a target image quality score based on the clarity comparison result and the feature registration result.

[0028] Optionally, the target image quality can be assessed using both clarity comparison and feature registration. This comprehensive assessment not only considers image clarity but also analyzes the positional deviation of key feature points within the image, providing a more comprehensive image quality evaluation metric. Compared to single-evaluation methods that rely solely on clarity or feature registration, this approach more accurately reflects the overall quality of the target image and provides a more reliable basis for camera calibration decisions. Clarity comparison and feature registration results assess the image's visual quality and feature positioning accuracy, respectively. This allows the target image's performance in different quality dimensions to be determined, along with the appropriate calibration type (e.g., adjusting focus to improve clarity or adjusting positioning parameters to correct for offset). This targeted calibration improves the efficiency and effectiveness of camera calibration, avoiding unnecessary calibration and resource waste. By automating the assessment of target image quality and determining calibration requirements, camera calibration can be performed without human intervention. This not only enhances the intelligence of inspection systems but also reduces labor costs. Especially for environments like substations, which require frequent and precise monitoring, automated calibration ensures that cameras are always operating in optimal condition, improving inspection efficiency and safety.

[0029] In an optional embodiment, a clarity comparison is performed on the image template and the target image to obtain a clarity comparison result, including: using a structural similarity index measurement method to compare the clarity of the image template and the target image to obtain a clarity comparison result; and feature registration is performed on the image template and the target image to obtain a feature registration result, including: using an accelerated robust feature method to perform feature registration on the image template and the target image to obtain a feature registration result.

[0030] Sharpness comparison is an optional process for evaluating the difference in sharpness between the target image and the template image. Using the Structural Similarity Index Measure (SSIM) algorithm, the structural similarity between the two images can be measured, rather than simply comparing pixels directly. The SSIM algorithm considers brightness, contrast, and structural information, calculating the similarity of this information to produce a sharpness comparison result. A high SSIM value indicates a high degree of structural similarity between the target image and the template image, indicating good image sharpness. Conversely, a low SSIM value indicates poor image sharpness and requires calibration. Feature registration is the process of detecting and matching key feature points in the template and target images to assess positioning offsets. The Speeded-Up Robust Features (SURF) algorithm can rapidly detect feature points in the images and calculate their relative positional offsets between the two images to produce feature registration results. The SURF algorithm, due to its robustness to changes in illumination and radiation, can more accurately determine feature point offsets. If the average deviation of the feature points is low, it indicates that the target image and the image template are well aligned; otherwise, calibration is needed to reduce positional deviation. By using the SSIM and SURF algorithms, not only can the accuracy and efficiency of camera calibration be improved, but also the robustness to changes in lighting, scale, and rotation can be enhanced. This ensures that camera images maintain high clarity and accurate positioning even in the complex environment of substations, improving the reliability and automation level of the inspection system.

[0031] Optionally, the image feature registration is evaluated for its registration accuracy and stability using the accelerated and robust feature algorithm SURF. The SURF algorithm not only maintains the scale-invariant and rotation-invariant properties of the Scale-Invariant Feature Transform (SIFT), but is also highly robust to illumination and radiation changes. The SURF algorithm uses the concepts of HAAR features and integral images, which greatly speeds up the program's running time. The HAAR feature is based on the wavelet transform principle and describes features by calculating the grayscale difference between different areas in the image. These features are usually step-like patterns in the vertical, horizontal, or diagonal directions. The pyramid image constructed by SURF is very different from SIFT, and it is because of these differences that its detection speed is accelerated. SIFT uses the Difference of Gaussians (DOG) image, while SURF uses the Hansen Hessian matrix determinant approximation image. The Hessian matrix is the core of the SURF algorithm. The Hessian matrix consists of functions and partial derivatives. A pixel point in the image The Hessian matrix , where x represents the horizontal coordinate of the corresponding pixel point, and y represents the vertical coordinate of the corresponding pixel point. The Hessian judgment formula is , where the Hessian matrix discriminant is the Gaussian convolution of the original image. Gaussian coefficients obey the normal distribution. From the center point outward, the coefficients are getting lower and lower. In order to improve the operation speed, a box filter is used to approximate the Gaussian filter. The Hessian matrix discriminant is transformed into , where a pixel in the image Grayscale difference between adjacent pixels , is the derivative of the grayscale difference. When the discriminant reaches a local maximum, the current point is determined to be brighter or darker than other points in the surrounding neighborhood, and is thus identified as the key feature point. Comparing the key feature points of the two images can determine the registration offset. By calculating the offset of all key feature points, the average offset can be determined.

[0032] Optionally, the clarity comparison is evaluated using the SSIM image quality algorithm based on the structural similarity index of the image contrast. The SSIM evaluation formula is: ,in and Image templates and the target image The average brightness, and Images The standard deviation of is an image The covariance of and Is a constant used to avoid the special case where the denominator is zero; you can set the constant 、 ,in 、 , Determined by the number of image bits, such as 8-bit image, The value is 255. The larger the value, the closer the clarity of the two images. When SSIM calculates the difference between two images at each position, it does not take a single pixel from each image at that position, but rather takes pixels from a region of each image. SSIM mainly considers three key features of the image: brightness, contrast, and structure. The brightness similarity index is The brightness is measured by the average grayscale, and the brightness of the template image is calculated by averaging the pixel values in the area. ,in For images The brightness value of the corresponding pixel in the corresponding image area, is the total number of pixels in the image area; the brightness of the picture taken based on the preset position ID is ,in For images The brightness value of the corresponding pixel in the corresponding image area. The contrast similarity index is The contrast is measured by the grayscale standard deviation. The grayscale standard deviation of the template image is , For images The average brightness of the image taken based on the preset position ID is , For images The structure of an image refers to the description of the relative position and proportional relationship between pixels. The structural similarity index is ,in , is a constant.

[0033] In an optional embodiment, a target image quality score is obtained based on the clarity comparison result and the feature registration result, including: determining a first weight value corresponding to the clarity comparison result, and a second weight value corresponding to the feature registration result; performing a weighted calculation based on the clarity comparison result, the first weight value, the feature registration result and the second weight value to obtain the target image quality score.

[0034] Optionally, the target image quality score is derived based on a combination of the clarity comparison and feature registration results. First, the SSIM and SURF algorithms are used to quantify clarity and feature offset, respectively. These two results are then weighted averaged according to pre-set weights to generate a target image quality score (i.e., the clarity comparison and feature registration results). The choice of weights reflects the relative importance of clarity and positioning accuracy in the overall assessment. If clarity is weighted higher, the clarity comparison result has a greater impact on the score; conversely, the feature registration result has a greater impact on the score. By assigning different weights to the clarity comparison and feature registration results and performing a weighted calculation to generate a comprehensive target image quality score, this approach ensures that the scoring system considers the relative importance of the two key indicators when evaluating image quality, thereby improving the accuracy and efficiency of camera calibration decisions.

[0035] Step S106, determining whether the target image quality score is less than a preset score threshold;

[0036] Optionally, the target image collected for the power equipment is compared with the corresponding image template for clarity and feature registration evaluation, and a comprehensive evaluation score (i.e., image quality score) is obtained. ) threshold judgment, The SSIM value of the comprehensive image quality (i.e., the clarity comparison result) and the average offset of the key feature points (i.e., the feature registration result) are obtained according to certain weights. For example, when When >90, it is determined that the image quality corresponding to the current preset position ID is good and no calibration is required. When <90, it is determined that the image corresponding to the current preset position ID needs to be calibrated in terms of clarity and offset.

[0037] Step S108, when the target image quality score is less than a preset score threshold, determining a target image positioning offset between the image template and the target image;

[0038] Optionally, when the target image quality score is less than a preset score threshold, it indicates that the image quality captured by the camera is poor and the camera needs to be calibrated. At this time, the target image positioning offset between the image template and the target image can be obtained, and the camera parameters can be calibrated based on the target image positioning offset.

[0039] In an optional embodiment, determining the target image positioning offset between the image template and the target image includes: using an image feature detection algorithm to identify target feature points respectively included in the image template and the target image; matching the target feature points respectively included in the image template and the target image to determine the target image positioning offset.

[0040] Optionally, image feature detection algorithms (such as SURF) can be used to automatically identify and compare key feature points in the image template and target image, thereby accurately determining the positioning offset of the target image. This process is a crucial step in the camera calibration system because it can quantify the displacement of the target image relative to the template image, providing a specific data basis for subsequent camera parameter adjustments. Specifically, image feature detection algorithms can detect key points in the image. These points can be unique structures in the image (such as corners, edges, or texture change points), so they can be stably identified in different images. By matching these key points, the translation, rotation, and scale changes of the target image relative to the template image can be calculated, that is, the positioning offset. This feature point matching-based method can not only handle changes in lighting, perspective, and scale, but also has good robustness to partial occlusion, distortion, and noise in the image. Through the above methods, it is possible to ensure that even under the influence of environmental factors, the offset of key features in the image can be accurately detected, thereby providing precise guidance for the automatic calibration of the camera, improving the efficiency and accuracy of calibration, reducing the need for manual intervention, and ultimately achieving automatic and precise correction of the camera preset position, ensuring that the inspection image quality of power equipment meets the requirements of remote monitoring and intelligent analysis.

[0041] In an optional embodiment, target feature points respectively included in the image template and the target image are matched to determine the target image positioning offset, including: matching the corresponding target feature points of the image template and the target image to obtain a list of matching feature points; in the list of matching feature points, calculating the offset of each pair of matching feature points in the horizontal and vertical directions; and identifying the maximum offset from the offsets of all matching feature points as the target image positioning offset.

[0042] Optionally, by matching the image template with the feature points on the target image, a list of all matching feature point pairs is generated. This step utilizes the robustness and positioning capabilities of image feature detection algorithms (such as SURF) to ensure that a sufficient number of matching points can be found even in the case of poor image quality. Based on the list of matching feature points, the offsets of each pair of matching feature points in the horizontal (x-coordinate) and vertical (y-coordinate) directions are calculated, thereby quantifying the relative movement between the target image and the template image, including translation and rotation. From all the calculated offsets, the largest offset is identified as the target image positioning offset. In camera calibration, this method is particularly suitable for dealing with situations where the preset position offset is large. By determining the maximum offset, the system can prioritize adjusting this offset to ensure accurate alignment of key feature points, thereby improving the efficiency and accuracy of calibration.

[0043] Optionally, the camera calibration system calculates the key offset value of each image feature at the current preset position based on the image feature registration algorithm, which includes two offset values of the x coordinate and the y coordinate. The overall image offset value adopts the maximum offset method, that is, the maximum offset is taken as . Convert the pixel offset of key feature points to the offset of PTZ ( ), , where the field of view , is the image width, is the image height, is the magnification.

[0044] Step S110 , calibrating camera parameters based on the target image positioning offset.

[0045] Optionally, camera calibration may include, but is not limited to, calibration of pan, tilt, zoom, and focus parameters (PTZF parameters). Specifically, if the camera calibration system determines that the image currently captured based on the acquired camera preset position ID (i.e., the target image) has a low overall evaluation score compared to the image template, the camera calibration process begins. The camera calibration system can then adjust to capture the image at the corresponding preset position and obtain the PTZF parameters for the current preset position.

[0046] Optionally, after the camera calibration system is adjusted according to the target image positioning offset (i.e., maximum offset), the image feature registration offset score (i.e., feature registration result) is used. ) to determine whether the correction is successful. For example, when When >95, it is determined that the image offset corresponding to the current preset position ID is within the acceptable range and no offset calibration is required; When <95, it is determined that the image corresponding to the current preset position ID is still large in terms of offset. When the offset cannot be corrected to the ideal range, the target detection based on the deep learning algorithm YOLO is continued to be used for feature value registration, which can not only ensure the detection accuracy but also improve the detection speed. Before target detection, since there is a possibility that the target detection object (i.e., power equipment) has been partially or completely offset, the camera magnification is first reduced to a minimum, and then the deep learning algorithm is used to confirm whether the target object is within the field of view. If it is confirmed that the target object is within the field of view (the confidence level is greater than the set threshold), the method of converting the pixel offset of the key feature point into the offset of the PTZF parameter is continued to be used until If the set threshold is reached, the offset calibration is successful and the adjusted camera PTZF parameters are saved. If the target object cannot be identified or is out of the field of view and cannot be detected (the confidence level is less than the set threshold), the offset calibration fails.

[0047] Optionally, after the camera calibration system offset calibration is successful, the clarity score is calculated based on the Structural Similarity Index Image Quality Algorithm (SSIM). ) evaluation. For example, when When >95, it is determined that the image clarity corresponding to the current preset position ID is within the acceptable range and no clarity calibration is required; If the value is <95, the image corresponding to the current preset ID is still considered to have a high degree of clarity. Camera clarity is primarily determined by adjusting the focal length (f) parameter. Clarity deviation is primarily based on the combination of the camera's fixed focus range and the semi-automatic zoom mode. Based on the acquired focal length (f) parameter, the adjustment range is set. Within this range, combined with semi-automatic zoom, multiple screenshots are taken to obtain the image with the best clarity. The focal length value with the highest clarity score is selected and saved.

[0048] In an optional embodiment, after calibrating the camera parameters based on the target image positioning offset, the method further includes: acquiring a new image of the power equipment captured by the camera after parameter calibration; performing image quality assessment based on the image template and the new image to obtain a new image quality score; determining whether the new image quality score is less than a preset score threshold; if the new image quality score is less than the preset score threshold, determining a new image positioning offset between the image template and the new image; and continuing to calibrate the parameters of the camera after parameter calibration based on the new image positioning offset.

[0049] Optionally, after the camera is calibrated, images of the power equipment are recaptured to evaluate the calibration effect in real time and provide a basis for possible subsequent adjustments. Based on the image template, the quality of the newly captured image is evaluated to obtain a new image quality score, which can provide instant feedback on the actual image quality after calibration, ensuring that the calibration process does not only rely on a single calibration result, but can be adjusted according to the actual effect. Compared with the preset score threshold, if the new image quality score is lower than the preset threshold, it means that the image quality after the initial calibration still does not meet the requirements and needs further optimization. In the case that the image quality score does not meet the standard, the positioning offset is determined again based on the new image, thereby more accurately identifying the difference between the current image and the template, providing data support for secondary or multiple calibrations. Based on the new image positioning offset, the camera parameters are recalibrated. This process can be repeated until the image quality score reaches or exceeds the preset threshold to ensure that the final image meets the needs of patrol and fault warning.

[0050] In the above method, iterative calibration ensures the continuity of the camera calibration process and the stability of the final image quality. Even if the image quality is not ideal after the initial adjustment, subsequent optimization can be automatically performed to avoid manual intervention. The above method can adapt to changes in environmental conditions, such as lighting, weather, and equipment status, and maintain optimal image quality through continuous image quality assessment and adjustment. By accurately calculating the new image positioning offset, the accuracy of the calibration can be ensured, thereby improving the accuracy and reliability of the entire camera calibration system. The automated iterative calibration process can reduce the need for manual adjustments, improve the operation and maintenance efficiency of the power equipment inspection system, reduce labor costs, and also improve the efficiency of online substation inspections and the accuracy of data collection.

[0051] Through the above steps S102 to S110, the purpose of obtaining image templates and real-time images for comparative evaluation, automatically determining image quality deviations, and accurately adjusting camera parameters based on deviation information can be achieved, thereby achieving rapid and accurate calibration of the camera, ensuring the quality of power equipment inspection images, and improving inspection efficiency and accuracy. The technical problems of position offset and insufficient clarity that are prone to occur in power equipment images collected by cameras in related technologies are thereby solved.

[0052] Based on the above embodiments and optional embodiments, the present invention proposes an optional implementation mode: Figure 2 is a flowchart of an optional camera calibration method for substation inspection according to an embodiment of the present invention. Figure 3 This is an optional system framework diagram according to an embodiment of the present invention. The method can be applied to Figure 3 The system framework shown in Figure 2 As shown, the method includes:

[0053] Step S1: The camera calibration system obtains an image template from the substation's online intelligent patrol system. The image template includes a reference image and coordinate information for the target detection object (e.g., power equipment). If the online intelligent patrol system already has image templates for the power equipment, they are synchronized to the camera calibration system online or offline. The power equipment may include, but is not limited to, pointer meters, oil level gauges, digital meters, switches, trip / closers, indicator lights, and other devices, all of which have existing image templates. If the online intelligent patrol system does not have image templates, the camera calibration system can generate them through online annotation. For example, many substation equipment exteriors do not have templates.

[0054] Step S2: The camera calibration system can obtain the camera preset position ID and the corresponding PTZF parameters indirectly from the online intelligent patrol system or directly from the camera. P (Pan) corresponds to the camera's horizontal rotation parameter; T (Tilt) corresponds to the camera's vertical pitch parameter; Z (Zoom) corresponds to the camera's zoom parameter, which adjusts the lens's field of view; and F (Focus) corresponds to the camera's zoom parameter, which adjusts the lens's focus.

[0055] Step S3: The camera calibration system develops an automatic calibration plan, enabling unattended automatic calibration. To avoid conflicts between calibration tasks and intelligent patrol tasks, the calibration system can compare and coordinate with the intelligent patrol task plans. For example, regular calibration can be implemented during idle time after a patrol task and when the recognition rate falls below a threshold.

[0056] Step S4: The camera calibration system captures images of the power equipment in the substation based on the acquired camera preset position IDs. Since substations have many cameras, a single camera can have multiple preset positions. To improve efficiency, the image acquisition strategy can be executed in parallel across multiple cameras, with each camera capturing images in the order of the preset position IDs.

[0057] Step S5: Based on the image obtained in step S4 and the corresponding image template obtained in step S1, perform clarity comparison and feature registration evaluation, and make a comprehensive evaluation score (i.e., image quality score). ) threshold judgment, The SSIM value of the comprehensive image quality (i.e., the clarity comparison result) and the average offset of the key feature points (i.e., the feature registration result) are obtained according to certain weights. For example, when When >90, it is determined that the image quality corresponding to the current preset position ID is good and no calibration is required. If the value is <90, the image corresponding to the current preset ID is determined to require calibration in terms of clarity and offset. The image feature registration results are evaluated for accuracy and stability using the accelerated, robust SURF algorithm. The clarity comparison results are evaluated using the Structural Similarity Index (SSIM) image quality algorithm, which uses image contrast.

[0058] Step S6: If the camera calibration system determines that the comprehensive evaluation score of the image captured based on the acquired camera preset position ID is low compared with the image template, the camera calibration process begins. The calibration system adjusts to the corresponding preset position to capture a photo and obtains the PTZF parameters of the current preset position.

[0059] Step S7: The camera calibration system calculates the key offset value of each image feature at the current preset position based on the image feature registration algorithm. The value includes two offset values, the x-coordinate and the y-coordinate. The maximum offset method is used for the overall image offset value, that is, the maximum offset is taken as . Use the image feature registration offset score in step S5 ( ) to determine whether the correction is successful. For example, when When >95, it is determined that the image offset corresponding to the current preset position ID is within the acceptable range and no offset calibration is required; When <95, it is determined that the image corresponding to the current preset position ID is still relatively large in terms of offset. When the offset cannot be corrected to the ideal range, the target detection based on the deep learning algorithm YOLO is continued to be used for feature value registration, which can not only ensure the detection accuracy but also improve the detection speed. Before target detection, since there is a possibility that the target object has been partially or completely offset, the camera magnification is first reduced to a minimum, and then the deep learning algorithm is used to confirm whether the target object is within the field of view. If it is confirmed that the target object is within the field of view (the confidence level is greater than the set threshold), the method of converting the pixel offset of the key feature point into the offset of PTZ is continued until If the set threshold is reached, the offset calibration is successful and the adjusted camera PTZ parameters are saved. If the target object cannot be identified or is out of the field of view and cannot be detected (the confidence level is less than the set threshold), the offset calibration fails.

[0060] Step S8: After the camera calibration system offset calibration is successful, the clarity score is calculated based on the structural similarity index image quality algorithm SSIM in step S5 ( ) evaluation. For example, when When >95, it is determined that the image clarity corresponding to the current preset position ID is within the acceptable range and no clarity calibration is required; If the value is <95, the image corresponding to the current preset ID is still considered to have a high degree of clarity. Camera clarity is primarily determined by adjusting the focal length (f) parameter. Clarity deviation is primarily based on the combination of the camera's fixed focus range and the semi-automatic zoom mode. Based on the acquired focal length (f) parameter, the adjustment range is set. Within this range, combined with semi-automatic zoom, multiple screenshots are taken to obtain the image with the best clarity. The focal length value with the highest clarity score is selected and saved.

[0061] Step S9: After the camera calibration system completes the preset position calibration for all cameras according to the task settings, it then updates the parameters based on whether the automatic update mode is set. If the update is automatic, the saved PTZF parameters can be updated to the online intelligent patrol system or each camera; if the update is not automatic, the update can be performed manually.

[0062] After the above nine steps, a camera calibration system based on image feature registration and deep learning visual fusion is formed, so that the camera can be calibrated in batches, quickly, accurately, efficiently and automatically.

[0063] It should be noted that in the related art, the image target offset detection is basically implemented by the scale-invariant feature variable registration method based on image features. On the one hand, when there is a large amount of calculation, this embodiment has problems such as slow calculation speed and large resource requirements, and cannot meet the situation where there are many cameras in the substation scene and many preset positions. On the other hand, there is a problem of low detection accuracy when the illumination and radiation change. In addition, the scale-invariant feature variable registration method cannot effectively correct the offset when a large displacement deviation occurs in the preset position and the target object image is partially or completely offset out of the picture, and cannot meet actual application needs.

[0064] The robust SURF feature algorithm based on an accelerated mode provided in this embodiment utilizes HAAR features and integral images, significantly accelerating detection speed. While maintaining the scale-invariance and rotation-invariance properties of the SIFT algorithm, it is also highly robust to changes in illumination and radiation, improving accuracy in image quality due to environmental influences. Furthermore, the Structural Similarity Index (SSIM) image quality algorithm provided in this embodiment utilizes a detection mechanism with a template image comparison mode. When calculating the difference between two images at each position, SSIM takes pixels from a region of each image, rather than a single pixel from each image. This method outperforms single image quality analysis methods, such as the grayscale variance function (SMD) algorithm and the energy gradient function algorithm, which are based on template-free image comparison. It also outperforms similar template-based image comparison methods, such as the mean square error (MSE) algorithm and the peak signal-to-noise ratio (PSNR) algorithm. When calculating pixel differences at each location, MSE and PSNR only consider the two pixel values at the current location, and are independent of pixels at any other locations. This approach treats the image as isolated pixels, ignoring visual features contained in the image content, particularly local structural information. Furthermore, the method provided in this embodiment integrates object detection and feature value registration based on the deep learning algorithm YOLO. This addresses the issue of large offset, even outside the original preset field of view, by enabling the target to be found and corrected in one step, achieving both high detection accuracy and high speed. Furthermore, the camera calibration system provided in this embodiment incorporates image feature registration offset scores (OF-Score), clarity scores (DE-Score), and comprehensive evaluation scores (CE-Score), which can be flexibly configured based on a large amount of calibration data to optimize calibration accuracy.

[0065] In this embodiment, a camera calibration device for substation inspection is also provided. The device is used to implement the above-mentioned embodiments and preferred implementation methods. The details that have been described will not be repeated here. As used below, the terms "module" and "device" can be a combination of software and / or hardware that implements the predetermined functions. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.

[0066] According to an embodiment of the present invention, there is also provided an embodiment of a device for implementing the above-mentioned camera calibration method for substation inspection. Figure 4 FIG. 1 is a structural diagram of a camera calibration device for substation inspection according to an embodiment of the present invention. Figure 4 As shown, the camera calibration device for substation inspection includes: an image acquisition module 400, a quality assessment module 402, a threshold judgment module 404, an offset determination module 406, and a parameter calibration module 408, wherein:

[0067] Image acquisition module 400, used to obtain image templates of power equipment in the substation and target images of the power equipment captured by the camera based on the current preset position, wherein the image template is an image of the power equipment captured with known accurate position and clarity;

[0068] A quality assessment module 402 is configured to perform image quality assessment based on the image template and the target image to obtain a target image quality score;

[0069] A threshold determination module 404 is configured to determine whether the target image quality score is less than a preset score threshold;

[0070] an offset determination module 406 for determining a target image positioning offset between the image template and the target image when the target image quality score is less than a preset score threshold;

[0071] The parameter calibration module 408 is used to calibrate the parameters of the camera based on the target image positioning offset.

[0072] It should be noted that the above modules can be implemented by software or hardware. For example, for the latter, it can be implemented in the following ways: the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.

[0073] It should be noted that the image acquisition module 400, quality assessment module 402, threshold determination module 404, offset determination module 406, and parameter calibration module 408 correspond to steps S102 to S108 in the embodiment. The examples and application scenarios implemented by these modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiment. It should be noted that these modules, as part of the device, can be run on a computer terminal.

[0074] It should be noted that the optional or preferred implementation of this embodiment can be found in the relevant description in the embodiment, which will not be repeated here.

[0075] The above-mentioned camera calibration device for substation inspection can also include a processor and a memory. The above-mentioned image acquisition module 400, quality assessment module 402, threshold judgment module 404, offset determination module 406, parameter calibration module 408, etc. are all stored in the memory as program modules, and the processor executes the above-mentioned program modules stored in the memory to realize the corresponding functions.

[0076] The processor includes a core, which retrieves corresponding program modules from memory. There can be one or more cores. Memory may include non-permanent memory in a computer-readable medium, random access memory (RAM), and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory includes at least one memory chip.

[0077] According to an embodiment of the present application, an embodiment of a non-volatile storage medium is also provided. Optionally, in this embodiment, the non-volatile storage medium includes a stored program, wherein, when the program is executed, the device containing the non-volatile storage medium is controlled to execute any of the above-mentioned camera calibration methods for substation inspections.

[0078] Optionally, in this embodiment, the non-volatile storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group, and the non-volatile storage medium includes a stored program.

[0079] Optionally, when the program is running, the device where the non-volatile storage medium is located is controlled to perform the following functions: obtain an image template of the power equipment in the substation, and a target image of the power equipment captured by a camera based on the current preset position, wherein the image template is an image of known accurate position and clarity captured for the power equipment; perform image quality assessment based on the image template and the target image to obtain a target image quality score; determine whether the target image quality score is less than a preset score threshold; when the target image quality score is less than the preset score threshold, determine the target image positioning offset between the image template and the target image; and perform parameter calibration on the camera based on the target image positioning offset.

[0080] According to an embodiment of the present application, an embodiment of a processor is further provided. Optionally, in this embodiment, the processor is configured to run a program, wherein when the program is run, any of the above-mentioned camera calibration methods for substation inspection is executed.

[0081] According to an embodiment of the present application, an embodiment of a computer program product is also provided, which, when executed on a data processing device, is suitable for executing a program that initializes any of the above-mentioned camera calibration method steps for substation inspection.

[0082] Optionally, the above-mentioned computer program product, when executed on a data processing device, is suitable for executing a program initialized with the following method steps: obtaining an image template of the power equipment in the substation, and a target image of the power equipment captured by a camera based on the current preset position, wherein the image template is an image of known accurate position and clarity captured for the power equipment; performing image quality assessment based on the image template and the target image to obtain a target image quality score; determining whether the target image quality score is less than a preset score threshold; when the target image quality score is less than the preset score threshold, determining the target image positioning offset between the image template and the target image; and performing parameter calibration on the camera based on the target image positioning offset.

[0083] An embodiment of the present invention provides an electronic device, which includes a processor, a memory, and a program stored in the memory and capable of running on the processor. When the processor executes the program, the following steps are implemented: obtaining an image template of power equipment in a substation, and a target image of the power equipment captured by a camera based on a current preset position, wherein the image template is an image of a known accurate position and clarity captured for the power equipment; performing image quality assessment based on the image template and the target image to obtain a target image quality score; determining whether the target image quality score is less than a preset score threshold; if the target image quality score is less than the preset score threshold, determining a target image positioning offset between the image template and the target image; and performing parameter calibration on the camera based on the target image positioning offset.

[0084] The above sequence of the embodiments of the present invention is for description only and does not represent the superiority or inferiority of the embodiments.

[0085] In the above embodiments of the present invention, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0086] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only exemplary. For example, the division of the above modules can be a logical function division. In actual implementation, there may be other division methods, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, modules or indirect coupling or communication connection of modules, which can be electrical or other forms.

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

[0088] In addition, the functional modules in various embodiments of the present invention may be integrated into a single processing module, or each module may exist physically separately, or two or more modules may be integrated into a single module. The aforementioned integrated modules may be implemented in the form of hardware or software functional modules.

[0089] If the above-mentioned integrated modules are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable non-volatile storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a non-volatile storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the various embodiments of the method of the present invention. The aforementioned non-volatile storage medium includes various media that can store program code, such as USB flash drives, read-only memories (ROMs), random access memories (RAMs), mobile hard drives, magnetic disks, or optical disks.

[0090] The above are only preferred embodiments of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A camera calibration method for substation inspection, characterized in that: include: Obtain an image template of the power equipment in the substation and a target image of the power equipment captured by a camera at a current preset position, wherein the image template is an image of the power equipment captured with a known accurate position and clarity; Performing image quality assessment based on the image template and the target image to obtain a target image quality score; Determining whether the target image quality score is less than a preset score threshold; When the target image quality score is less than the preset score threshold, determining a target image positioning offset between the image template and the target image; Parameters of the camera are calibrated based on the target image positioning offset.

2. The method according to claim 1, characterized in that The performing image quality assessment based on the image template and the target image to obtain a target image quality score includes: Performing a clarity comparison between the image template and the target image to obtain a clarity comparison result; Performing feature registration on the image template and the target image to obtain a feature registration result, wherein the feature registration result is used to indicate a degree of deviation of feature points included in the target image relative to the image template; The target image quality score is obtained based on the clarity comparison result and the feature registration result.

3. The method according to claim 2, characterized in that The performing clarity comparison on the image template and the target image to obtain a clarity comparison result includes: performing clarity comparison on the image template and the target image using a structural similarity index measurement method to obtain the clarity comparison result; The performing feature registration on the image template and the target image to obtain the feature registration result includes: performing feature registration on the image template and the target image using an accelerated robust feature method to obtain the feature registration result.

4. The method according to claim 2, characterized in that Obtaining the target image quality score based on the clarity comparison result and the feature registration result includes: Determining a first weight value corresponding to the clarity comparison result and a second weight value corresponding to the feature registration result; A weighted calculation is performed based on the clarity comparison result, the first weight value, the feature registration result and the second weight value to obtain the target image quality score.

5. The method according to claim 1, wherein Determining a target image positioning offset between the image template and the target image includes: Using an image feature detection algorithm to identify target feature points respectively included in the image template and the target image; Matching target feature points respectively included in the image template and the target image is performed to determine the target image positioning offset.

6. The method according to claim 5, characterized in that The matching of target feature points respectively included in the image template and the target image to determine the target image positioning offset includes: Matching the image template with corresponding target feature points of the target image to obtain a list of matching feature points; In the matching feature point list, calculating the offset of each pair of matching feature points in the horizontal and vertical directions; From the offsets of all matching feature points, a maximum offset is identified as the target image positioning offset.

7. The method according to any one of claims 1 to 6, characterized in that After calibrating the camera parameters based on the target image positioning offset, the method further includes: Acquire a new image of the electric power equipment captured by the camera after parameter calibration; Performing image quality assessment based on the image template and the new image to obtain a new image quality score; Determining whether the new image quality score is less than the preset score threshold; When the new image quality score is less than the preset score threshold, determining a new image positioning offset between the image template and the new image; Based on the new image positioning offset, continue to perform parameter calibration on the camera after the parameter calibration.

8. A camera calibration device for substation inspection, characterized in that: include: An image acquisition module is configured to acquire an image template of the power equipment in the substation and a target image of the power equipment acquired by a camera at a currently preset position, wherein the image template is an image of the power equipment acquired with a known accurate position and clarity; A quality assessment module, configured to perform image quality assessment based on the image template and the target image to obtain a target image quality score; A threshold judgment module is used to judge whether the target image quality score is less than a preset score threshold; an offset determination module, configured to determine a target image positioning offset between the image template and the target image when the target image quality score is less than the preset score threshold; A parameter calibration module is used to calibrate the parameters of the camera based on the target image positioning offset.

9. A non-volatile storage medium, characterized in that: The non-volatile storage medium stores a plurality of instructions, which are suitable for being loaded by a processor and executed by the camera calibration method for substation inspection according to any one of claims 1 to 7.

10. An electronic device, characterized in that: It includes one or more processors and a memory, the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the camera calibration method for substation inspection as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Monitoring image blurring abnormity identification method and device

    CN104394377A

  • Multi-camera shooting system based on infrared shooting adjustment

    CN110278378A

  • No-reference online image definition evaluation method and system

    CN110689524A

  • Pan-tilt calibration method and device of valve hall equipment inspection robot and storage medium

    CN111932609A

  • Method and device for automatically correcting preset position of camera and computer equipment

    CN114078161A