Automatic identification and correction method, system and storage medium of power graphic elements on monitoring screen

By creating a typical template library of power diagrams and image processing technology, the automatic identification and correction of power diagrams in unattended substations is realized, solving the problem of identification information errors, improving work efficiency and supporting intelligent monitoring systems.

CN115116083BActive Publication Date: 2024-09-06CHINA ELECTRIC POWER RESEARCH INSTITUTE CO LTD +2
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202210711493.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-22
Publication Date
2024-09-06
Estimated Expiration
2042-06-22

AI Technical Summary

Technical Problem

In the existing technology, it is difficult to automatically identify and correct power diagram elements in the monitoring system of unattended substations, resulting in identification information errors and low work efficiency.

Method used

By creating a typical template library of power primitives, using image processing technology to extract regions of interest, template matching and positioning, automatically identify power primitives and interactively correct their scheduling number information, combined with image grayscale binarization, median filtering, contour Steps such as extraction and cropping realize automatic identification and correction of power primitives.

Benefits of technology

It improves detection efficiency, reduces identification information errors, supports intelligent monitoring and advanced applications of unattended substations, and replaces manual identification and judgment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115116083B
    Figure CN115116083B
Patent Text Reader

Abstract

A method, system and storage medium for automatic identification and correction of power graphic elements in monitoring screens, the method comprising: creating a typical template library of power graphic elements and loading it into a power monitoring system; extracting a region of interest on the monitoring screen of the power monitoring system; in the region of interest, automatically identifying and locating the power graphic elements through image template matching, determining the type of the corresponding power graphic element in the typical template library for the searched matching power graphic element, and determining the optimal graphic element area; in the optimal graphic element area, automatically determining the position of the power graphic element scheduling number according to the principle of the closest distance based on the position and direction of the identified power graphic element, and automatically matching and identifying the power graphic element scheduling number information through image processing technology; interactively correcting the identification and positioning information and the power graphic element scheduling number information obtained by image template matching of the power graphic element, and visually displaying them in the template image. The present invention can improve the efficiency of graphic element detection and avoid errors in identification information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of image processing of electric power monitoring systems, and in particular relates to a method, system and storage medium for automatic identification and correction of electric power graphic elements in monitoring images. Background Art

[0002] Image processing refers to the technology of processing image information with computers. It mainly includes image digitization, image enhancement and restoration, image data coding, image segmentation and image recognition. Image processing technology has achieved a leap in development in recent years with the rapid rise of mobile Internet. It has been increasingly penetrated and widely used in industrial production, construction and transportation, medical care, entertainment and media, and even cutting-edge defense industries.

[0003] Image processing can be traced back to 1920 when people used cables laid on the bottom of the North Atlantic Ocean to transmit a photo processed by simple digital compression technology from London, England to New York, USA. This innovation can be regarded as the origin of image processing technology. In the 1950s, with the development of electronic computers, the exponentially increasing data analysis and processing capabilities of computers allowed people to see new breakthroughs, and the research of digital image processing (DIP) also began to become a hot topic, and in the 1960s, the birth of the new discipline of digital image processing was officially announced.

[0004] Image processing and recognition are interrelated. Image processing is the basic condition for image recognition, and image recognition promotes the improvement of image processing technology. By processing and analyzing images with computers, the required technical effect is finally achieved, and the processed object can be identified. The ultimate goal of image processing and recognition is recognition. Text recognition, digital image recognition, and object recognition are the three stages of image recognition. In many fields in my country, the naked eye cannot meet the needs of very fine objects. At this time, it is necessary to use computer image processing and recognition technology to replace humans with fine technology to process a large amount of physical information, thereby improving recognition efficiency and reducing error rates.

[0005] In recent years, image processing technology has also been gradually applied to power systems, especially unmanned substations. Intelligent monitoring of unmanned substations, especially small substations, can free staff from simple and boring monitoring work, avoid monitoring errors caused by personnel factors, and help improve work efficiency and reduce business operating costs. At present, intelligent instruments and related automatic control components are mainly used to form a relatively complex intelligent monitoring system. The cost of the intelligent monitoring system for unmanned substations using image recognition technology is relatively small, and there is basically no need to replace the existing corresponding monitoring instruments and control components. Specifically, the use of image recognition technology can easily realize the reading recognition of existing digital instruments and pointer instruments in unmanned substations, the color recognition of various alarms or indicator lights, the gear recognition of switch devices, etc., and the fire recognition and access control management of unmanned substations can be performed. On this basis, the intelligent monitoring and control of unmanned substations can be realized, and the cost-effectiveness ratio is very significant.

[0006] In addition, the daily operation monitoring interface of the substation monitoring system mainly includes the main wiring diagram and the interval diagram. The main wiring diagram is drawn by the on-site service personnel based on the main wiring diagram provided by the design institute. If the main wiring diagram provided by the design institute can be automatically converted into the main wiring diagram used by the monitoring system, a lot of workload can be reduced; and in the daily operation and maintenance interface, if the dynamic changes of specific power elements can be automatically detected and identified, and the early warning information of the monitoring system can be mutually verified, it can also effectively reduce the occurrence of false alarms and missed alarms, so it also has great application value in engineering. Summary of the invention

[0007] The purpose of the present invention is to address the problems in the above-mentioned prior art and provide a method, system and storage medium for automatic identification and correction of power graphic elements in monitoring screens, so as to improve detection efficiency and avoid possible identification information errors.

[0008] In order to achieve the above object, the present invention has the following technical solutions:

[0009] In a first aspect, a method for automatically identifying and correcting power graphic elements in a monitoring screen is provided, comprising:

[0010] Create a typical template library of power graphics elements and load it into the power monitoring system;

[0011] Extracting the region of interest from the monitoring screen of the power monitoring system through image processing technology;

[0012] In the extracted region of interest, the power graphic element is automatically identified and located in the power graphic element typical template library by image template matching, and for the searched matching power graphic element, the type of the power graphic element corresponding to the power graphic element typical template library is determined, and the optimal graphic element region is determined;

[0013] In the optimal element area, according to the position and direction of the identified power element, the position of the power element dispatch number is automatically determined according to the principle of closest distance, and the power element dispatch number information is automatically matched and identified through image processing technology;

[0014] The identification and positioning information of the power graphic element obtained through image template matching and the scheduling number information of the power graphic element identified through image processing technology are interactively corrected and visually displayed in the template image.

[0015] As a preferred solution of the method for automatic identification and correction of power graphics elements on the monitoring screen of the present invention, the step of creating a typical template library of power graphics elements includes, for the same type of power graphics elements, cutting out a screenshot file of the required identified power graphics elements from the monitoring interface; for power graphics elements with multiple display states, there are differences in coverage areas, and corresponding graphic element templates are created one by one, and the largest coverage area is selected and saved into the typical template library of power graphics elements by category.

[0016] As a preferred solution of the method for automatically identifying and correcting power graphic elements on the monitoring screen of the present invention, the step of extracting the region of interest by image processing technology on the monitoring screen of the power monitoring system includes:

[0017] Image grayscale binarization, median filtering, contour extraction and contour clipping;

[0018] The image grayscale binarization process includes: firstly, combining the grayscale distribution characteristics of the monitoring interface image, using the weighted average method to convert the color image into a grayscale image, and secondly, realizing the image binarization according to the calculated global adaptive threshold;

[0019] The median filtering process includes: setting the gray value of each pixel point to the median of the gray values ​​of all pixels within a certain neighborhood window of the point, eliminating isolated noise points, and retaining the edge features of the monitoring screen image;

[0020] The contour extraction includes: setting the pixel value of the region of interest to 1 and the other pixel values ​​to 0, detecting all boundary points where the pixel value changes from 0 to 1 from the edge of the image from the outside to the inside to obtain an outer contour pixel set, screening the outer contour pixel set according to the prior knowledge of the target image of the monitoring information area, and removing the extracted erroneous outer contour pixels;

[0021] The contour clipping includes: rotating the image to be judged at a certain interval within 90° of the main axis of the image, and recording the parameters of the circumscribed rectangle after each rotation, and obtaining the minimum circumscribed rectangle by calculating and comparing the areas; and, clipping the monitoring screen according to the vertex coordinates of the minimum circumscribed rectangle.

[0022] As a preferred solution of the method for automatically identifying and correcting power graphic elements in the monitoring screen of the present invention, in the step of automatically identifying and positioning power graphic elements through image template matching, during the identification process, the position information of the power graphic elements is recorded using the original image space coordinates, and then drawn in the interface view coordinate space of the power monitoring system;

[0023] The mutual conversion between view coordinates and image coordinates is carried out according to the following method:

[0024] Assume that the width and height of the original image are Iw and Ih respectively, and the width and height of the view display frame are Vw and Vh respectively;

[0025] Calculate the width ratio and height ratio of the view display frame to the template image according to the following formula:

[0026] WidR = Vw / Iw

[0027] HeiR = Vh / Ih

[0028] If WidR < HeiR, then use WidR as the equal proportion scaling factor ScaleRatio of the image;

[0029] Otherwise, use HeiR as the equal proportion scaling factor ScaleRatio of the image;

[0030] Calculate the actual display width and height of the image in the interface display frame according to the following formula:

[0031] ActW = Iw * ScaleRatio

[0032] ActH = Ih * ScaleRatio

[0033] Calculate the possible edge blank spaces in the width direction and height direction when the image is centered in the view display frame according to the following formula:

[0034] BlankW = (Vw - ActW) / 2

[0035] BlankH = (Vh - ActH) / 2

[0036] Mutually convert the image coordinates (ImageX, ImageY) and the view coordinates (ViewX, ViewY) according to the following formula:

[0037] Convert view coordinates to image coordinates:

[0038] ImageX=int((ViewX–BlankW) / ScaleRatio)

[0039] ImageY=int((ViewY–BlankH) / ScaleRatio)

[0040] Convert image coordinates to view coordinates:

[0041] ViewX=int(ImageX*ScaleRatio+BlankW)

[0042] ViewY=int(ImageY*ScaleRatio+BlankH).

[0043] As a preferred solution of the automatic identification and correction method of the power graphic element of the monitoring screen of the present invention, the step of determining the type of the power graphic element corresponding to the power graphic element typical template library and determining the optimal graphic element area includes traversing the pixels in the monitoring information area in sequence, intercepting a sub-image with the same size as the graphic element template each time, and obtaining an area similar to the template by calculating the matching similarity between the sub-image and the template image; when using template matching to detect the graphic element area, in the case where several candidate areas are obtained for one power graphic element, a non-maximum suppression method is used to screen and determine the optimal graphic element area;

[0044] The step of using the non-maximum suppression method to screen and determine the optimal primitive area includes: filtering out area candidate boxes that are less than a matching threshold based on position matching confidence; calculating the intersection-and-union ratio of the candidate box with the highest local matching confidence and other candidate boxes, and filtering out area candidate boxes whose intersection-and-union ratio is greater than an overlap threshold; and obtaining a local unique optimal area position through iteration.

[0045] As a preferred solution of the method for automatically identifying and correcting power graphic elements in the monitoring screen of the present invention, the steps of automatically determining the position of the power graphic element scheduling number according to the principle of closest distance based on the position and direction of the identified power graphic element, and automatically matching and identifying the power graphic element scheduling number information through image processing technology include:

[0046] Locating dispatch numbers, segmenting dispatch numbers, and matching and identifying dispatch numbers;

[0047] The positioning of the dispatch number includes:

[0048] According to the obtained coordinate information of the graphic element position, the possible position information of the number is obtained according to the relative position relationship between the two and the principle of affine transformation, and the possible position is searched for matching to identify whether there is a numbered graphic symbol at the nearest position;

[0049] The matrix processing formula for affine transformation is as follows:

[0050]

[0051] In the formula, a 11 、a 12 、a 21 、a 22 are scaling factors, b1 and b2 are translation factors;

[0052] x0, y0 are the coordinates of the position of the graphic element, and x, y are the coordinates of the position of the dispatch number;

[0053] The segmentation of the dispatch number includes:

[0054] Combined with the characteristics of the power graphic element dispatch number in the monitoring screen, the number area is binarized, and then the character wrapping area is obtained by horizontal projection of the number; the wrapping area is vertically projected to achieve coarse segmentation of the numbered characters; all character images obtained by coarse segmentation are scaled proportionally according to the height H, and for each character image, its actual width after scaling is assumed to be Ws, and the upper limit of the expected width calculated based on the prior knowledge of the character aspect ratio is assumed to be Wm; when Ws>Wm, it is determined that the coarsely segmented character image has adhesion, then the width of a single character W=Ws / [(Ws / Wm)], the symbol [] in the formula represents rounding operation, and the final graphic element number segmentation image is obtained after re-segmentation according to the width W of a single character;

[0055] The matching and identification of dispatch numbers include:

[0056] The bilinear interpolation method is used to scale each character obtained by segmentation to a pixel size that matches the primitive template; a template image of the corresponding number is made according to the font of the primitive number in the monitoring screen, and is uniformly scaled to a matching pixel size; the normalized correlation coefficient matching method is used to identify the primitive scheduling number information.

[0057] As a preferred solution of the method for automatic identification and correction of power graphic elements in the monitoring screen of the present invention, the step of interactively correcting the identification and positioning information of the power graphic elements includes: displaying the power graphic element coverage area identification in the form of a rectangular frame on each identified power graphic element, receiving the graphic element identification frame object selected by the user through the mouse when the graphic element identification frame has a position deviation, loading the graphic element identification frame position or graphic element identification frame size information changed by the user through the keyboard and mouse, and the power graphic element scheduling number and status information directly edited and modified by the user on the interface after selecting the graphic element identification frame; in the above-mentioned interactive correction process, the coordinate information of the identified power graphic element is continuously adjusted and changed between the interface view and the original image, and the conversion information is immediately modified to the result record file in XML format.

[0058] In a second aspect, a monitoring screen power graphic element automatic identification and correction system is provided, comprising:

[0059] Template library loading module, used to create a typical template library of power graphic elements and load it into the power monitoring system;

[0060] An area of ​​interest extraction module is used to extract an area of ​​interest on the monitoring screen of the power monitoring system by using image processing technology;

[0061] The optimal primitive region determination module is used to automatically identify and locate the power primitives in the extracted region of interest by image template matching in the power primitive typical template library, and to determine the type of the power primitive corresponding to the power primitive typical template library for the searched matching power primitives, and to determine the optimal primitive region;

[0062] The module for determining the scheduling number of the graphic element is used to automatically determine the location of the scheduling number of the electric graphic element according to the location and direction of the identified electric graphic element in the optimal graphic element area according to the principle of the closest distance, and automatically match and identify the scheduling number information of the electric graphic element through image processing technology;

[0063] The correction display module is used to interactively correct the identification and positioning information of the power graphic element obtained through image template matching and the scheduling number information of the power graphic element identified through image processing technology matching, and visually display it in the template image.

[0064] As a preferred solution of the automatic identification and correction system of power graphic elements in the monitoring screen of the present invention, the template library loading module obtains a screenshot file of the power graphic elements required for identification from the monitoring interface for the same type of power graphic elements; for power graphic elements with multiple display states, there are differences in coverage areas, and corresponding graphic element templates are created one by one, and the largest coverage area is selected and saved into the typical template library of power graphic elements by category.

[0065] As a preferred solution of the automatic identification and correction system of power graphic elements on the monitoring screen of the present invention, the steps of extracting the region of interest by the region of interest extraction module on the monitoring screen of the power monitoring system through image processing technology include: image grayscale binarization processing, median filtering processing, contour extraction and contour clipping;

[0066] The image grayscale binarization process includes: firstly, combining the grayscale distribution characteristics of the monitoring interface image, using the weighted average method to convert the color image into a grayscale image, and secondly, realizing the image binarization according to the calculated global adaptive threshold;

[0067] The median filtering process includes: setting the gray value of each pixel point to the median of the gray values ​​of all pixels within a certain neighborhood window of the point, eliminating isolated noise points, and retaining the edge features of the monitoring screen image;

[0068] The contour extraction includes: setting the pixel value of the region of interest to 1 and other pixel values to 0, and detecting all boundary points where the pixel value changes from 0 to 1 from the edge of the image from outside to inside to obtain the outer contour pixel set. According to the prior knowledge of the target picture of the monitoring information area, the outer contour pixel set is screened to remove the extracted incorrect outer contour pixels.

[0069] The contour clipping includes: rotating the image to be judged at a certain interval within 90° of the main axis of the image, and recording the parameters of the circumscribed rectangle after each rotation, and obtaining the minimum circumscribed rectangle by calculating and comparing the areas; and, clipping the monitoring screen according to the vertex coordinates of the minimum circumscribed rectangle.

[0070] As a preferred solution of the power graphic element automatic identification and correction system for the monitoring screen of the present invention, during the recognition process of the optimal graphic element area determination module, the position information of the power graphic element is recorded using the original image space coordinates and then drawn in the interface view coordinate space of the power monitoring system.

[0071] The mutual conversion between the view coordinates and the image coordinates is performed according to the following method:

[0072] Assume that the width and height of the original image are Iw and Ih respectively, and the width and height of the view display frame are Vw and Vh respectively;

[0073] Calculate the width ratio and height ratio of the view display frame to the template image according to the following formula:

[0074] WidR = Vw / Iw

[0075] HeiR = Vh / Ih

[0076] If WidR < HeiR, then use WidR as the equal-proportion scaling factor ScaleRatio of the image;

[0077] Otherwise, use HeiR as the equal-proportion scaling factor ScaleRatio of the image;

[0078] Calculate the actual display width and height of the image in the interface display frame according to the following formula:

[0079] ActW = Iw * ScaleRatio

[0080] ActH = Ih * ScaleRatio

[0081] Calculate the possible edge blank spaces in the width direction and height direction when the image is centered in the view display frame according to the following formula:

[0082] BlankW = (Vw - ActW) / 2

[0083] BlankH=(Vh-ActH) / 2

[0084] The image coordinates (ImageX, ImageY) and view coordinates (ViewX, ViewY) are converted to each other as follows:

[0085] Convert view coordinates to image coordinates:

[0086] ImageX=int((ViewX–BlankW) / ScaleRatio)

[0087] ImageY=int((ViewY–BlankH) / ScaleRatio)

[0088] Convert image coordinates to view coordinates:

[0089] ViewX=int(ImageX*ScaleRatio+BlankW)

[0090] ViewY=int(ImageY*ScaleRatio+BlankH).

[0091] As a preferred solution of the automatic identification and correction system of power graphic elements in the monitoring screen of the present invention, the optimal graphic element area determination module traverses the pixels in the monitoring information area in sequence, intercepts a sub-image with the same size as the graphic element template each time, and obtains the area similar to the template by calculating the matching similarity between the sub-image and the template image; when using template matching to detect the graphic element area, for the case where several candidate areas are obtained for one power graphic element, a non-maximum suppression method is used to screen and determine the optimal graphic element area; the steps of using the non-maximum suppression method to screen and determine the optimal graphic element area include: filtering out area candidate frames that are less than the matching threshold according to the position matching confidence; calculating the intersection and union ratio of the candidate frame with the highest local matching confidence and other candidate frames, and filtering out area candidate frames whose intersection and union ratio is greater than the overlap threshold; and obtaining the local unique optimal area position through iteration.

[0092] As a preferred solution of the automatic identification and correction system of power graphic elements in the monitoring screen of the present invention, the graphic element dispatch number determination module performs the positioning of the dispatch number, the segmentation of the dispatch number, and the matching and identification of the dispatch number;

[0093] The positioning of the dispatch number includes:

[0094] According to the obtained coordinate information of the graphic element position, the possible position information of the number is obtained according to the relative position relationship between the two and the principle of affine transformation, and the possible position is searched for matching to identify whether there is a numbered graphic symbol at the nearest position;

[0095] The matrix processing formula for affine transformation is as follows:

[0096]

[0097] In the formula, a 11 、a 12 、a 21 、a 22 are scaling factors, b1 and b2 are translation factors;

[0098] x0, y0 are the coordinates of the position of the graphic element, and x, y are the coordinates of the position of the dispatch number;

[0099] The segmentation of the dispatch number includes:

[0100] Combined with the characteristics of the power graphic element dispatch number in the monitoring screen, the number area is binarized, and then the character wrapping area is obtained by horizontal projection of the number; the wrapping area is vertically projected to achieve coarse segmentation of the numbered characters; all character images obtained by coarse segmentation are scaled proportionally according to the height H, and for each character image, its actual width after scaling is assumed to be Ws, and the upper limit of the expected width calculated based on the prior knowledge of the character aspect ratio is assumed to be Wm; when Ws>Wm, it is determined that the coarsely segmented character image has adhesion, then the width of a single character W=Ws / [(Ws / Wm)], the symbol [] in the formula represents rounding operation, and the final graphic element number segmentation image is obtained after re-segmentation according to the width W of a single character;

[0101] The matching and identification of dispatch numbers include:

[0102] The bilinear interpolation method is used to scale each character obtained by segmentation to a pixel size that matches the primitive template; a template image of the corresponding number is made according to the font of the primitive number in the monitoring screen, and is uniformly scaled to a matching pixel size; the normalized correlation coefficient matching method is used to identify the primitive scheduling number information.

[0103] As a preferred solution of the automatic identification and correction system of power graphic elements in the monitoring screen of the present invention, the correction display module displays the power graphic element coverage area identification in the form of a rectangular frame on each identified power graphic element, receives the graphic element identification frame object selected by the user with the mouse when the graphic element identification frame has a position deviation, loads the graphic element identification frame position or graphic element identification frame size information changed by the user through the keyboard and mouse, and the power graphic element scheduling number and status information directly edited and modified by the user on the interface after selecting the graphic element identification frame; in the above-mentioned interactive correction process, the coordinate information of the identified power graphic element is continuously adjusted and changed between the interface view and the original image, and the conversion information is immediately modified to the result record file in XML format.

[0104] According to a third aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for automatically identifying and correcting power graphic elements in a monitoring screen is implemented.

[0105] Compared with the prior art, the first aspect of the present invention has at least the following beneficial effects:

[0106] The method of the present invention first creates an element template for the specific power element that the user needs to identify, then extracts the area of ​​interest from the wiring diagram and interval diagram of the monitoring interface to be identified, and then matches and locates the element through templates. After the match is successful, the element coordinate information and the identified type information are saved, and the user is provided with an online editing tool to confirm and correct the above results. By introducing image recognition technology into the intelligent automatic identification of the power elements of interest in the power system monitoring screen, data support can be provided for the intelligent advanced applications of unmanned substation monitoring and master station dispatching systems. By automatically identifying and correcting the power elements in the monitoring screen, the manual identification and judgment of the test work are replaced, thereby improving the efficiency of the detection work. The present invention supports the interactive modification of element recognition and positioning information, and can correct the identification information errors that may be caused by factors such as image quality and operating environment.

[0107] It can be understood that the beneficial effects of the second to third aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0108] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0109] Figure 1 Flow chart of the method for automatically identifying and correcting power graphic elements in monitoring screens according to an embodiment of the present invention;

[0110] Figure 2 A schematic diagram of a program system framework based on a three-layer structure designed in an embodiment of the present invention;

[0111] FIG. 3( a ) is a schematic diagram of character wrapping areas in the process of segmenting a dispatch number according to an embodiment of the present invention;

[0112] FIG3( b ) is a schematic diagram of a rough segmentation of the characters of a scheduling number in the segmentation process of the embodiment of the present invention;

[0113] FIG3(c) is a schematic diagram of the final image segmentation process of the scheduling numbering according to an embodiment of the present invention;

[0114] Figure 4 Block diagram of a system for automatically identifying and correcting power graphic elements in monitoring images according to an embodiment of the present invention. DETAILED DESCRIPTION

[0115] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0116] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0117] In the monitoring system of the power dispatching master station and substation, the application of computer vision processing technology to intelligently identify the power elements in the primary wiring diagram and the secondary information diagram has been a research hotspot in the unmanned substation and intelligent dispatching applications of the power system in recent years. In the existing technology, for example, the literature "HOG method for electrical symbol recognition [J]. Liu Jian, Gong Zhiheng, Gao Enyang, etc., Journal of Shenyang Jianzhu University (Natural Science Edition), 2013, 29(03): 571-576", "Research on automatic recognition method of common electrical symbols based on invariant moments and neural networks [J]. Gu Cailian, Sun Guokai, Wang Lidi. Journal of Shenyang Agricultural University, 2005, 36(6): 687-690" and "Electrical symbol recognition in circuit diagram based on PHOG features [J]. Xiao Dou, Hou Xiaorong. Ship Electronic Engineering, 2017, 37(1): 90-93" respectively introduce some existing automatic recognition methods for electrical elements, but these methods are difficult to meet the requirements of automatic recognition and positioning of monitoring images in terms of application scope, recognition efficiency and recognition accuracy. For example, the document "Fast correlation matching based on fast Fourier transform and integral graph [J]. Yin Songfeng, Wang Yicheng, Cao Liangcai. Acta Photonica Sinica, 2010, 39(12): 2246-2250" proposed a fast correlation template matching algorithm, which uses fast Fourier transform and integral graph to calculate the correlation coefficient, reduces the complexity of the matching algorithm, and effectively improves the anti-interference ability. The patent application with publication number CN202010867681.7 provides a recognition system and method for dynamic perception of power symbols on the substation monitoring interface. According to the content of its technical solution, it focuses on an automatic test system based on interface symbol recognition. The key technologies in the document include image signal acquisition methods, intelligent comparison of recognition results with expected values, etc., but the specific method of image processing is not explained.

[0118] like Figure 1 As shown, the automatic identification and correction method of power graphic elements in the monitoring screen according to the embodiment of the present invention mainly includes the following steps:

[0119] S1. Create a typical template library of power graphics elements and load it into the power monitoring system;

[0120] S2. Extracting the region of interest by image processing technology on the monitoring screen of the power monitoring system;

[0121] S3. In the extracted region of interest, the power element is automatically identified and located in the power element typical template library by image template matching, and the type of the power element corresponding to the power element typical template library is determined for the searched matching power element, and the optimal element area is determined;

[0122] S4. In the optimal element area, according to the position and direction of the identified power element, the position of the power element scheduling number is automatically determined according to the principle of the closest distance, and the power element scheduling number information is automatically matched and identified through image processing technology;

[0123] S5. Interactively correct the identification and positioning information of the power graphic element obtained through image template matching and the scheduling number information of the power graphic element identified through image processing technology matching, and display them visually in the template image.

[0124] Template matching: It is the most primitive and basic pattern recognition method. It studies where the pattern of a specific object is located in the image, and then identifies the object. This is a matching problem. Template matching is the most basic and most commonly used matching method in image processing. Template matching has its own limitations, mainly in that it can only move in parallel. If the matching target in the original image rotates or changes in size, the algorithm is invalid.

[0125] In a possible implementation manner, the step S1 of creating a typical template library of power graphic elements includes:

[0126] In the power monitoring system, the size and morphological characteristics of the primary and secondary power elements displayed on the interface must comply with the requirements of the power system graphic description specification Q / GDW 624 2011. Therefore, for the same type of power elements, screenshot files of the required power elements can be obtained by cutting from the monitoring interface through screenshot software or screen recording equipment. In addition, it should be noted that some power elements have multiple display states. For example, switchgear has multiple states such as open, close, abnormal, etc., and their coverage areas are also different. It is also necessary to create corresponding element templates one by one, and select the largest coverage area and save it to the template library by category.

[0127] In a possible implementation manner, the step of extracting the region of interest in step S2 includes:

[0128] In addition to the substation monitoring information area, the monitoring screen extracted by the screenshot software or screen recording device generally also has menu bars, toolbars and task bars. In order to ensure the accuracy of the finally identified power element positioning information, it is necessary to first apply image processing technology to extract the area of ​​interest that the user is concerned about in the monitoring interface, that is, the display area of ​​the main wiring diagram in the view window. The so-called region of interest (ROI) refers to the area to be processed in the form of a box, circle, ellipse, irregular polygon, etc. from the processed image in machine vision and image processing, which is called the region of interest, ROI. Various operators and functions are often used in machine vision software such as Halcon, OpenCV, and Matlab to obtain the region of interest ROI and perform the next step of image processing. The image processing and extraction process of the region of interest in this embodiment consists of four steps: image grayscale binarization, median filtering, contour extraction, and contour clipping. The specific implementation is detailed as follows:

[0129] (1) Image grayscale binarization processing

[0130] Image binarization is the process of setting the grayscale value of the pixel on the image to 0 or 255, that is, making the entire image appear in obvious black and white. When processing, first combine the grayscale distribution characteristics of the monitoring interface image and use the weighted average method to convert the color image into a grayscale image. The weighted average model is shown in the following formula, where R(x,y), G(x,y) and B(x,y) represent the red, green and blue components of the pixel at (x,y) respectively. Gray(x,y) represents the calculated grayscale value of the pixel at (x,y).

[0131] Gray(x,y)=0.114*(x,y)+0.578*(x,y)+0.299*(x,y)

[0132] Secondly, the image is binarized according to the calculated global adaptive threshold. The maximum inter-class variance method is used to calculate the global adaptive threshold, which can better distinguish the background information from the foreground information of the image.

[0133] (2) Median filtering

[0134] The median filter is a nonlinear smoothing technique that sets the grayscale value of each pixel to the median of the grayscale values ​​of all pixels in a neighborhood window of the point. The basic principle of the median filter is to replace the value of a point in a digital image or digital sequence with the median of the values ​​of each point in a neighborhood of the point, so that the surrounding pixel values ​​are close to the true value, thereby eliminating isolated noise points. The algorithm process of the median filter is simple, but it can effectively suppress impulse noise and protect the edge information of the image. Since the monitoring information area of ​​the monitoring screen has a lot of background color, median filtering the monitoring screen image after grayscale binarization can effectively remove small features and retain edge features.

[0135] (3) Contour extraction

[0136] The area contours in the binary image can be divided into two types: outer contours and inner contours. For the display characteristics of the monitoring information area, it is only necessary to detect its outer contour. Assuming that the pixel value of the area of ​​interest is 1 and the other pixel values ​​are 0, the extraction process is:

[0137] First, from the edge of the image from the outside to the inside, the outer contour pixel set is obtained by detecting all boundary points where the pixel value changes from 0 to 1; then, based on the prior knowledge that the shape of the monitoring information area is a rectangle, the aspect ratio is between 2.2 and 4.4, and the length and width are both greater than 400 pixels, the prior knowledge can be adjusted according to the target image, and the outer contour pixel set is screened to remove the erroneous outer contour pixels extracted due to the influence of areas such as the status bar, toolbar, and menu bar.

[0138] (4) Contour cutting

[0139] This embodiment uses an equidistant rotation search method to achieve contour clipping of the monitoring information area:

[0140] First, the image to be judged is rotated at certain intervals within 90° of the main axis of the image, and the parameters of the bounding rectangle after each rotation are recorded. The minimum bounding rectangle is obtained by calculating and comparing the area; then, the monitoring screen is cropped according to the vertex coordinates of the minimum bounding rectangle to complete the correct extraction of the monitoring information area.

[0141] In a possible implementation manner, the process of automatically identifying and locating the power graphic element by image template matching in step S3 requires coordinate conversion between the view and the image, and the coordinate conversion between the view and the image specifically includes:

[0142] During the recognition process, the location information of the graphic element is recorded using the original image space coordinates and then drawn in the interface view coordinate space of the management program. It is necessary to realize the mutual conversion between the view coordinates and the image coordinates.

[0143] The specific conversion method is described in detail as follows: Assume that the width and height of the original image are Iw and Ih respectively, and the width and height of the view display box are Vw and Vh respectively. The relevant conversion parameters need to be calculated through the following initialization process:

[0144] (1) Calculate the width ratio and height ratio of the view display box to the template image:

[0145] WidR = Vw / Iw

[0146] HeiR = Vh / Ih

[0147] (2) If WidR < HeiR, then use WidR as the equal ratio scaling factor ScaleRatio of the image; otherwise, use HeiR as the equal ratio scaling factor ScaleRatio.

[0148] (3) Calculate the actual display width and height of the image in the interface display box:

[0149] ActW = Iw * ScaleRatio

[0150] ActH = Ih * ScaleRatio

[0151] (4) Calculate the possible margins on the width and height directions when the image is centered in the view display box:

[0152] BlankW = (Vw - ActW) / 2

[0153] BlankH = (Vh - ActH) / 2

[0154] After completing the calculation of the above coordinate information initialization parameters, in the subsequent processing, the image coordinates (ImageX, ImageY) and the view coordinates (ViewX, ViewY) can be converted to each other. The specific conversion calculation formulas are as follows:

[0155] (1) Convert view coordinates to image coordinates:

[0156] ImageX = int((ViewX – BlankW) / ScaleRatio)

[0157] ImageY = int((ViewY – BlankH) / ScaleRatio)

[0158] (2) Convert image coordinates to view coordinates:

[0159] ViewX = int(ImageX * ScaleRatio + BlankW)

[0160] ViewY=int(ImageY*ScaleRatio+BlankH)

[0161] In a possible implementation manner, step S3 of determining the optimal primitive region specifically includes:

[0162] First, search for matching images in the monitoring interface: traverse the pixels in the monitoring information area one by one, intercept a sub-image of the same size as the primitive template each time, and calculate the matching similarity between the sub-image and the template image to obtain the area similar to the template. Through test comparison and analysis, the normalized correlation coefficient matching method is selected to realize the calculation of template matching similarity.

[0163] Secondly, determine the optimal primitive area: when using template matching to detect primitive areas, it is possible that one power primitive will obtain several candidate areas. The non-maximum suppression method is used to screen and determine the optimal power primitive area. The steps include:

[0164] (1) Filter out some region candidate boxes that are smaller than the matching threshold according to the position matching confidence;

[0165] (2) Calculate the intersection-and-union ratio of the candidate box with the highest local matching confidence and other candidate boxes, and filter out the candidate boxes in the area where the intersection-and-union ratio is greater than the overlap threshold;

[0166] (3) Obtain the local unique optimal area position through iteration.

[0167] The graphic element dispatch number refers to the unified numbering of primary equipment objects that need to be operated, controlled or monitored in the power system for the convenience of dispatch management. The dispatch number information is generally composed of a combination of English letters and numbers, and the number is unique within the scope of the dispatch power grid. In a possible implementation, step S4 automatically matches and identifies the power graphic element dispatch number information and specifically includes: in accordance with the requirements of the power system graphic description specification Q / GDW 624 2011, each specific power graphic element that the user is concerned about will be marked with its unique corresponding dispatch number in the vicinity of the graphic element on the interface. The dispatch number format of the power graphic element is uniformly encoded using a combination of letters and numbers. Therefore, automatically identifying the corresponding unique dispatch number of each power graphic element on the interface is also the focus of the present invention. Automatic identification of graphic element numbers includes the steps of positioning, segmentation and identification, as follows:

[0168] (1) Location of dispatch number

[0169] According to the coordinate position information of the graphic element obtained in the above steps, the possible position information of the number is obtained according to the relative position relationship between the two (up, down, left, right) based on the affine transformation principle, and the matching is searched at the possible position to identify whether there is a numbered icon at the nearest position, wherein the matrix processing formula of the affine transformation is as follows:

[0170]

[0171] In the formula, a 11 、a 12 、a 21 、a 22 are scaling factors, b1 and b2 are translation factors;

[0172] x0 and y0 are the position coordinates of the graphic element, and x and y are the position coordinates of the scheduling number.

[0173] (2) Division of dispatch number

[0174] The image element numbering in the monitoring screen has the following characteristics: the number color is obviously different from the background color; the numbering is all digital characters; except for individual numbers, there is a certain gap between the characters; the ratio of the height to the width of the characters is fixed. Combining the above characteristics, as well as prior information such as the height-to-width ratio of the characters, the image element number segmentation algorithm is briefly described as follows:

[0175] (a) Binarize the numbered area, and then obtain the character wrapping area through horizontal projection of the number, as shown in Figure 3(a);

[0176] (b) The wrapped area is vertically projected to achieve a rough segmentation of the numbered characters, which may generally have some pixel adhesion, as shown in Figure 3(b).

[0177] (c) All character images obtained by rough segmentation are scaled in proportion to their height H. For each character image, its actual width after scaling is assumed to be Ws, and the upper limit of the expected width calculated based on the prior knowledge of the character aspect ratio is assumed to be Wm;

[0178] (d) When Ws>Wm, it is determined that there is adhesion in the roughly segmented character image, and the width of a single character W = Ws / [(Ws / Wm)], where the symbol [] represents rounding operation. After further segmentation according to W, the final primitive number segmentation image is obtained, as shown in Figure 3(c).

[0179] (3) Matching and identification of dispatch numbers

[0180] Firstly, the bilinear interpolation method is used to scale each character obtained by segmentation to a pixel size that matches the primitive template. Then, the template images of the corresponding numbers are made according to the font of the primitive number in the monitoring screen, and they are uniformly scaled to a matching pixel size. Finally, the normalized correlation coefficient matching method is used to identify the primitive scheduling number information.

[0181] In a possible implementation manner, step S5 of interactively correcting the power graphic element identification and positioning information specifically includes:

[0182] According to the technical contents and steps described above in the embodiment of the present invention, the type, location, and dispatch number and other information related to the power element are obtained, and the result information is saved in an XML format file. At the same time, considering the possible identification information errors caused by factors such as image quality and operating environment, the interface interaction program of the embodiment of the present invention also provides an interactive modification function of element identification and positioning information. The specific implementation method of the interactive modification function is detailed as follows: on each identified element, its coverage area is displayed in the form of a rectangular frame. When the user determines that the automatically identified and located element identification box has a large position deviation, the element identification box can be selected by the mouse, and then its position or size can be changed by the keyboard and mouse; for the number, status and other information of the power element, it can be edited and modified directly on the interface after the element identification box is selected; in the above-mentioned interactive modification process, the coordinate information of the identified power element will be continuously adjusted and changed between the program view and the original image, and the "view and image coordinate conversion" method described above needs to be used to continuously convert between the two coordinate systems, and the conversion information is immediately modified to the result record file in XML format.

[0183] In a possible implementation manner, the above-mentioned functions of the method for automatic identification and correction of power graphic elements in the monitoring screen of the embodiment of the present invention are developed using PyCharm and PyQt5 as development tools, using Python language and based on the OpenCV library.

[0184] See also Figure 2 The program system framework based on the three-layer structure designed in the embodiment of the present invention is as follows:

[0185] The interactive interface layer implements functions such as operation commands, information display, and user interaction;

[0186] The business logic layer implements business logic functions such as extraction of regions of interest, visual-image coordinate conversion, automatic matching and positioning of primitives, recognition and location information editing, and system configuration according to various commands issued by the interactive interface layer;

[0187] The data processing layer exchanges data with the business logic layer to realize the loading of monitoring screen images and primitive images, the access of identification and positioning information in XML file format, and the access of configuration information.

[0188] See also Figure 4 Another embodiment of the present invention provides a monitoring screen power graphic element automatic identification and correction system, comprising:

[0189] The template library loading module 1 is used to create a typical template library of power graphic elements and load it into the power monitoring system;

[0190] An area of ​​interest extraction module 2 is used to extract an area of ​​interest on a monitoring screen of a power monitoring system by using image processing technology;

[0191] The optimal primitive region determination module 3 is used to automatically identify and locate the power primitives in the extracted region of interest by image template matching in the power primitive typical template library, and to determine the type of the power primitive corresponding to the power primitive typical template library for the searched matching power primitives, and to determine the optimal primitive region;

[0192] The graphic element scheduling number determination module 4 is used to automatically determine the position of the power graphic element scheduling number in the optimal graphic element area according to the position and direction of the identified power graphic element and the principle of the closest distance, and automatically match and identify the power graphic element scheduling number information through image processing technology;

[0193] The correction display module 5 is used to interactively correct the identification and positioning information of the power graphic element obtained through image template matching and the scheduling number information of the power graphic element identified through image processing technology matching, and visually display them in the template image.

[0194] Optionally, the size and morphological features of the power graphics created by the template library loading module 1 comply with the requirements of the power system graphic description specification Q / GDW 624 2011. For the same type of power graphics, a screenshot file of the required identified power graphics is obtained by cropping from the monitoring interface; for power graphics with multiple display states, there are differences in coverage areas, and corresponding graphic element templates are created one by one, and the largest coverage area is selected and saved in the power graphic element typical template library by category.

[0195] Optionally, the step of extracting the region of interest by the region of interest extraction module 2 on the monitoring screen of the power monitoring system through image processing technology includes: image grayscale binarization processing, median filtering processing, contour extraction and contour clipping;

[0196] The image grayscale binarization process includes: firstly, combining the grayscale distribution characteristics of the monitoring interface image, using the weighted average method to convert the color image into a grayscale image, and secondly, realizing the image binarization according to the calculated global adaptive threshold;

[0197] The median filtering process includes: setting the gray value of each pixel point to the median of the gray values ​​of all pixels within a certain neighborhood window of the point, eliminating isolated noise points, and retaining the edge features of the monitoring screen image;

[0198] The contour extraction includes: setting the pixel values of the region of interest to 1 and other pixel values to 0, detecting all boundary points where the pixel values change from 0 to 1 from the outside to the inside of the image edge to obtain the outer contour pixel set, and screening the outer contour pixel set according to the prior knowledge of the target picture in the monitoring information area to remove the extracted incorrect outer contour pixels;

[0199] The contour clipping includes: rotating the image to be judged at a certain interval within 90° of the main axis of the image and recording the parameters of the circumscribed rectangle after each rotation, obtaining the minimum circumscribed rectangle by calculating and comparing the areas; and clipping the monitoring picture according to the vertex coordinates of the minimum circumscribed rectangle.

[0200] Optionally, during the recognition process of the optimal primitive region determination module 3, the position information of the power primitive is recorded using the original image space coordinates and then drawn in the interface view coordinate space of the power monitoring system;

[0201] The mutual conversion between the view coordinates and the image coordinates is performed according to the following method:

[0202] Assume that the width and height of the original image are Iw and Ih respectively, and the width and height of the view display frame are Vw and Vh respectively;

[0203] Calculate the width ratio and height ratio of the view display frame to the template image according to the following formula:

[0204] WidR = Vw / Iw

[0205] HeiR = Vh / Ih

[0206] If WidR < HeiR, then use WidR as the equal-proportion scaling factor ScaleRatio of the image;

[0207] Otherwise, use HeiR as the equal-proportion scaling factor ScaleRatio of the image;

[0208] Calculate the actual display width and height of the image in the interface display frame according to the following formula:

[0209] ActW = Iw * ScaleRatio

[0210] ActH = Ih * ScaleRatio

[0211] Calculate the possible edge white spaces in the width direction and height direction when the image is centered in the view display frame according to the following formula:

[0212] BlankW = (Vw - ActW) / 2

[0213] BlankH = (Vh - ActH) / 2

[0214] The image coordinates (ImageX, ImageY) and view coordinates (ViewX, ViewY) are converted to each other as follows:

[0215] Convert view coordinates to image coordinates:

[0216] ImageX=int((ViewX–BlankW) / ScaleRatio)

[0217] ImageY=int((ViewY–BlankH) / ScaleRatio)

[0218] Convert image coordinates to view coordinates:

[0219] ViewX=int(ImageX*ScaleRatio+BlankW)

[0220] ViewY=int(ImageY*ScaleRatio+BlankH).

[0221] Optionally, the optimal primitive region determination module 3 sequentially traverses pixels in the monitoring information region, intercepts a sub-image of the same size as the primitive template each time, and obtains an area similar to the template by calculating the matching similarity between the sub-image and the template image; when the primitive region is detected by template matching, in the case where a plurality of candidate regions are obtained for one power primitive, a non-maximum suppression method is used to screen and determine the optimal primitive region;

[0222] The step of using the non-maximum suppression method to screen and determine the optimal primitive area includes: filtering out area candidate boxes that are less than a matching threshold based on position matching confidence; calculating the intersection-and-union ratio of the candidate box with the highest local matching confidence and other candidate boxes, and filtering out area candidate boxes whose intersection-and-union ratio is greater than an overlap threshold; and obtaining a local unique optimal area position through iteration.

[0223] Optionally, the primitive dispatch number determination module 4 performs dispatch number positioning, dispatch number segmentation, and dispatch number matching and identification; the dispatch number positioning, dispatch number segmentation, and dispatch number matching and identification are specifically as follows:

[0224] The positioning of the dispatch number includes:

[0225] According to the obtained coordinate information of the graphic element position, the possible position information of the number is obtained according to the relative position relationship between the two and the principle of affine transformation, and the possible position is searched for matching to identify whether there is a numbered graphic symbol at the nearest position;

[0226] The matrix processing formula for affine transformation is as follows:

[0227]

[0228] In the formula, a 11 、a 12 、a 21 、a 22 are scaling factors, b1 and b2 are translation factors;

[0229] x0, y0 are the coordinates of the position of the graphic element, and x, y are the coordinates of the position of the dispatch number;

[0230] The segmentation of the dispatch number includes:

[0231] Combined with the following characteristics of the power graphic element dispatching number in the monitoring screen: there is a clear difference between the number color and the background color; the number is all digital characters; except for individual numbers, there is a certain gap between the characters; the ratio of the height and width of the character is fixed; and the prior information of the character; execution: binarize the number area, and then obtain the character wrapping area through the horizontal projection of the number; vertically project the wrapping area to achieve rough segmentation of the numbered characters; scale all the character images obtained by rough segmentation according to the height H, for each character image, assume that its actual width after scaling is Ws, and assume that the upper limit of the expected width calculated according to the prior knowledge of the character aspect ratio is Wm; when Ws>Wm, it is determined that the rough segmented character image has adhesion, then the width of a single character W=Ws / [(Ws / Wm)], the symbol [] in the formula represents rounding operation, and the final graphic element number segmentation image is obtained after re-segmentation according to the width W of a single character;

[0232] The matching and identification of dispatch numbers include:

[0233] Firstly, the bilinear interpolation method is used to scale each character obtained by segmentation to a pixel size that matches the primitive template. Then, a template image of the corresponding number is made according to the font of the primitive number in the monitoring screen, and the image is uniformly scaled to a matching pixel size. Finally, the normalized correlation coefficient matching method is used to identify the primitive scheduling number information.

[0234] Optionally, the correction display module 5 displays the power element coverage area identification in the form of a rectangular frame on each identified power element. When the user determines that the automatically identified and located element identification frame has a position deviation, the user selects the element identification frame with the mouse, and then changes the position of the element identification frame or changes the size of the element identification frame using the keyboard and mouse; the number and status information of the power element can be edited and modified directly on the interface after the element identification frame is selected; in the above-mentioned interactive correction process, the coordinate information of the identified power element is continuously adjusted and changed between the interface view and the original image, and the conversion information is immediately modified to the result record file in XML format.

[0235] Another embodiment of the present invention further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the method for automatic identification and correction of power graphic elements in the monitoring screen as described in the previous embodiment of the present invention.

[0236] The computer program includes computer program code, which may be in source code form, object code form, executable file or some intermediate form. The computer-readable storage medium may include: any entity or device, medium, USB flash drive, mobile hard disk, disk, optical disk, computer memory, read-only memory, random access memory, electric carrier signal, telecommunication signal and software distribution medium, etc. that can carry the computer program code. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals. For ease of explanation, the above content only shows the part related to the embodiment of the present invention. For specific technical details not disclosed, please refer to the method part of the embodiment of the present invention. The computer-readable storage medium is non-temporary and can be stored in a storage device formed by various electronic devices, which can realize the execution process recorded in the method of the embodiment of the present invention.

[0237] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0238] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems) and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the process in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0239] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0240] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0241] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A method for automatically identifying and correcting power graphic elements in a monitoring screen, characterized in that: Including: Create a typical template library of power graphic elements and load it into the power monitoring system; Extract the region of interest on the monitoring screen of the power monitoring system through image processing technology; Within the extracted region of interest, automatically identify and locate power graphic elements through image template matching in the typical template library of power graphic elements. For the searched matching power graphic elements, determine the type in the typical template library of power graphic elements corresponding to the power graphic elements, and determine the optimal graphic element region; Within the optimal graphic element region, automatically determine the position of the power graphic element scheduling number according to the nearest distance principle based on the position and direction of the identified power graphic element, and automatically match and identify the power graphic element scheduling number information through image processing technology; Interactively correct the recognition and positioning information obtained for power graphic elements through image template matching and the power graphic element scheduling number information matched and identified through image processing technology, and visually display them in the template image; For the step of automatically identifying and locating power graphic elements through image template matching, during the recognition process, the position information of the power graphic elements is recorded using the original image space coordinates and then drawn in the interface view coordinate space of the power monitoring system; Mutual conversion between view coordinates and image coordinates is performed according to the following method: Assume that the width and height of the original image are Iw and Ih respectively, and the width and height of the view display frame are Vw and Vh respectively; Calculate the width ratio and height ratio of the view display frame to the template image according to the following formula: WidR = Vw / Iw HeiR = Vh / Ih If WidR < HeiR, then use WidR as the equal-proportion scaling factor ScaleRatio of the image; Otherwise, use HeiR as the equal-proportion scaling factor ScaleRatio of the image; Calculate the actual display width and height of the image in the interface display frame according to the following formula: ActW = Iw * ScaleRatio ActH = Ih * ScaleRatio Calculate the possible marginal blank spaces in the width direction and height direction when the image is centered in the view display frame according to the following formula: BlankW = (Vw - ActW) / 2 BlankH = (Vh - ActH) / 2 Mutually convert the image coordinates (ImageX, ImageY) and the view coordinates (ViewX, ViewY) according to the following formula: Convert view coordinates to image coordinates: ImageX = int((ViewX – BlankW) / ScaleRatio) ImageY = int((ViewY – BlankH) / ScaleRatio) Convert image coordinates to view coordinates: ViewX = int(ImageX * ScaleRatio + BlankW) ViewY = int(ImageY * ScaleRatio + BlankH) The step of automatically determining the position of the power graphic element scheduling number according to the nearest distance principle based on the position and direction of the identified power graphic element, and automatically matching and identifying the power graphic element scheduling number information through image processing technology includes: Locating dispatch numbers, segmenting dispatch numbers, and matching and identifying dispatch numbers; The positioning of the dispatch number includes: According to the obtained coordinate information of the graphic element position, the possible position information of the number is obtained according to the relative position relationship between the two and the principle of affine transformation, and the possible position is searched for matching to identify whether there is a numbered graphic symbol at the nearest position; The matrix processing formula for affine transformation is as follows: In the formula, a 11 、a 12 、a 21 、a 22 are scaling factors, b1 and b2 are translation factors; x0, y0 are the coordinates of the position of the graphic element, and x, y are the coordinates of the position of the dispatch number; The segmentation of the dispatch number includes: Combined with the characteristics of the power graphic element dispatch number in the monitoring screen, the number area is binarized, and then the character wrapping area is obtained by horizontal projection of the number; the wrapping area is vertically projected to achieve coarse segmentation of the numbered characters; all character images obtained by coarse segmentation are scaled proportionally according to the height H, and for each character image, its actual width after scaling is assumed to be Ws, and the upper limit of the expected width calculated based on the prior knowledge of the character aspect ratio is assumed to be Wm; when Ws>Wm, it is determined that the coarsely segmented character image has adhesion, then the width of a single character W=Ws / [(Ws / Wm)], the symbol [] in the formula represents rounding operation, and the final graphic element number segmentation image is obtained after re-segmentation according to the width W of a single character; The matching and identification of dispatch numbers include: The bilinear interpolation method is used to scale each character obtained by segmentation to a pixel size that matches the primitive template; a template image of the corresponding number is made according to the font of the primitive number in the monitoring screen, and is uniformly scaled to a matching pixel size; the normalized correlation coefficient matching method is used to identify the primitive scheduling number information.

2. The method for automatically identifying and correcting power graphic elements on monitoring screens according to claim 1 is characterized in that: The steps of creating a typical template library of power graphics elements include, for the same type of power graphics elements, cropping a screenshot file of the required identified power graphics elements from the monitoring interface; for power graphics elements with multiple display states, there are differences in coverage areas, creating corresponding graphic element templates one by one, and selecting the largest coverage area and saving it into the typical template library of power graphics elements by category.

3. The method for automatically identifying and correcting power graphic elements on monitoring screens according to claim 1 is characterized in that: The step of extracting the region of interest by using image processing technology on the monitoring screen of the power monitoring system includes: Image grayscale binarization, median filtering, contour extraction and contour clipping; The image grayscale binarization process includes: firstly, combining the grayscale distribution characteristics of the monitoring interface image, using the weighted average method to convert the color image into a grayscale image, and secondly, realizing the image binarization according to the calculated global adaptive threshold; The median filtering process includes: setting the gray value of each pixel point to the median of the gray values ​​of all pixels within a certain neighborhood window of the point, eliminating isolated noise points, and retaining the edge features of the monitoring screen image; The contour extraction includes: setting the pixel value of the region of interest to 1 and the other pixel values ​​to 0, detecting all boundary points where the pixel value changes from 0 to 1 from the edge of the image from the outside to the inside to obtain an outer contour pixel set, screening the outer contour pixel set according to the prior knowledge of the target image of the monitoring information area, and removing the extracted erroneous outer contour pixels; The outline cropping includes: rotating the image to be judged at certain intervals within 90° of the main axis of the image, recording the parameters of the circumscribed rectangle after each rotation, obtaining the minimum circumscribed rectangle by calculating and comparing the area; and cropping the monitoring screen according to the vertex coordinates of the minimum circumscribed rectangle.

4. The method for automatically identifying and correcting power graphic elements on monitoring screens according to claim 1 is characterized in that: The step of determining the type of the power graphic element corresponding to the power graphic element typical template library and determining the optimal graphic element area includes sequentially traversing pixels in the monitoring information area, intercepting a sub-image with the same size as the graphic element template each time, and obtaining an area similar to the template by calculating the matching similarity between the sub-image and the template image; when detecting the graphic element area by template matching, in the case where a plurality of candidate areas are obtained for one power graphic element, a non-maximum suppression method is used to screen and determine the optimal graphic element area; The step of using the non-maximum suppression method to screen and determine the optimal primitive area includes: filtering out region candidate boxes that are smaller than a matching threshold according to position matching confidence; Calculate the intersection-and-union ratio of the candidate box with the highest local matching confidence and other candidate boxes, filter out the regional candidate boxes where the intersection-and-union ratio is greater than the overlap threshold; and obtain the local unique optimal regional position through iteration.

5. The method for automatically identifying and correcting power graphic elements in monitoring images according to claim 1 is characterized in that: The steps of interactively correcting the power element identification and positioning information include: displaying the power element coverage area mark in the form of a rectangular frame on each identified power element, receiving the element identification frame object selected by the user through the mouse when the element identification frame has a position deviation, loading the element identification frame position or element identification frame size information changed by the user through the keyboard and mouse, and the power element scheduling number and status information directly edited and modified by the user on the interface after selecting the element identification frame; in the above-mentioned interactive correction process, the coordinate information of the identified power element is continuously adjusted and changed between the interface view and the original image, and the conversion information is immediately modified to the result record file in XML format.

6. A monitoring screen power graphic element automatic identification and correction system, characterized in that: include: Template library loading module, used to create a typical template library of power graphic elements and load it into the power monitoring system; An area of ​​interest extraction module is used to extract an area of ​​interest on the monitoring screen of the power monitoring system by using image processing technology; The optimal primitive region determination module is used to automatically identify and locate the power primitives in the extracted region of interest by image template matching in the power primitive typical template library, and to determine the type of the power primitive corresponding to the power primitive typical template library for the searched matching power primitives, and to determine the optimal primitive region; The module for determining the scheduling number of the graphic element is used to automatically determine the location of the scheduling number of the electric graphic element according to the location and direction of the identified electric graphic element in the optimal graphic element area according to the principle of the closest distance, and automatically match and identify the scheduling number information of the electric graphic element through image processing technology; A correction display module is used to interactively correct the identification and positioning information of the power graphic element obtained through image template matching and the dispatch number information of the power graphic element identified through image processing technology matching, and visually display them in the template image; During the recognition process, the optimal graphic element area determination module records the position information of the power graphic elements using the original image space coordinates and then draws them in the interface view coordinate space of the power monitoring system; The mutual conversion between the view coordinates and the image coordinates is performed according to the following method: Assume that the width and height of the original image are Iw and Ih respectively, and the width and height of the view display box are Vw and Vh respectively; Calculate the width ratio and height ratio of the view display box to the template image according to the following formula: WidR = Vw / Iw HeiR = Vh / Ih If WidR < HeiR, then use WidR as the equal ratio scaling factor ScaleRatio of the image; Otherwise, use HeiR as the equal ratio scaling factor ScaleRatio of the image; Calculate the actual display width and height of the image in the interface display box according to the following formula: ActW = Iw * ScaleRatio ActH = Ih * ScaleRatio Calculate the possible marginal blank spaces in the width direction and height direction when the image is centered in the view display box according to the following formula: BlankW = (Vw - ActW) / 2 BlankH = (Vh - ActH) / 2 Mutually convert the image coordinates (ImageX, ImageY) and the view coordinates (ViewX, ViewY) according to the following formula: Convert view coordinates to image coordinates: ImageX = int((ViewX – BlankW) / ScaleRatio) ImageY = int((ViewY – BlankH) / ScaleRatio) Convert image coordinates to view coordinates: ViewX = int(ImageX * ScaleRatio + BlankW) ViewY = int(ImageY * ScaleRatio + BlankH) The graphic element scheduling number determination module performs the positioning of the scheduling number, the segmentation of the scheduling number, and the matching recognition of the scheduling number; The positioning of the scheduling number includes: According to the obtained graphic element position coordinate information, obtain the possible position information of the number based on the relative position relationship between the two according to the principle of affine transformation, and search for the number graphic symbol at the nearest position for matching recognition at the possible positions; The matrix processing formula for affine transformation is as follows: In the formula, a 11 、a 12 、a 21 、a 22 are scaling factors, b1 and b2 are translation factors; x0 and y0 are the graphic element position coordinates, and x and y are the scheduling number position coordinates; The segmentation of the scheduling number includes: Combined with the characteristics of the power graphic element dispatch number in the monitoring screen, the number area is binarized, and then the character wrapping area is obtained by horizontal projection of the number; the wrapping area is vertically projected to achieve coarse segmentation of the numbered characters; all character images obtained by coarse segmentation are scaled proportionally according to the height H, and for each character image, its actual width after scaling is assumed to be Ws, and the upper limit of the expected width calculated based on the prior knowledge of the character aspect ratio is assumed to be Wm; when Ws>Wm, it is determined that the coarsely segmented character image has adhesion, then the width of a single character W=Ws / [(Ws / Wm)], the symbol [] in the formula represents rounding operation, and the final graphic element number segmentation image is obtained after re-segmentation according to the width W of a single character; The matching and identification of dispatch numbers include: The bilinear interpolation method is used to scale each character obtained by segmentation to a pixel size that matches the primitive template; a template image of the corresponding number is made according to the font of the primitive number in the monitoring screen, and is uniformly scaled to a matching pixel size; the normalized correlation coefficient matching method is used to identify the primitive scheduling number information.

7. The automatic identification and correction system for power graphic elements in monitoring screen according to claim 6 is characterized in that: For the same type of power graphics elements, the template library loading module obtains a screenshot file of the required identified power graphics elements by cutting out from the monitoring interface; for power graphics elements with multiple display states and different coverage areas, corresponding graphic element templates are created one by one, and the largest coverage area is selected and saved into the power graphics element typical template library by category.

8. The automatic identification and correction system for power graphic elements on monitoring screen according to claim 6 is characterized in that: The step of extracting the region of interest by the region of interest extraction module on the monitoring screen of the power monitoring system through image processing technology includes: image grayscale binarization processing, median filtering processing, contour extraction and contour clipping; The image grayscale binarization process includes: firstly, combining the grayscale distribution characteristics of the monitoring interface image, using the weighted average method to convert the color image into a grayscale image, and secondly, realizing the image binarization according to the calculated global adaptive threshold; The median filtering process includes: setting the gray value of each pixel point to the median of the gray values ​​of all pixels within a certain neighborhood window of the point, eliminating isolated noise points, and retaining the edge features of the monitoring screen image; The contour extraction includes: setting the pixel value of the region of interest to 1 and the other pixel values ​​to 0, detecting all boundary points where the pixel value changes from 0 to 1 from the edge of the image from the outside to the inside to obtain an outer contour pixel set, screening the outer contour pixel set according to the prior knowledge of the target image of the monitoring information area, and removing the extracted erroneous outer contour pixels; The outline cropping includes: rotating the image to be judged at certain intervals within 90° of the main axis of the image, recording the parameters of the circumscribed rectangle after each rotation, obtaining the minimum circumscribed rectangle by calculating and comparing the area; and cropping the monitoring screen according to the vertex coordinates of the minimum circumscribed rectangle.

9. The automatic identification and correction system for power graphic elements in monitoring screen according to claim 6 is characterized in that: The optimal primitive region determination module sequentially traverses pixels in the monitoring information region, intercepts a sub-image of the same size as the primitive template each time, and obtains a region similar to the template by calculating the matching similarity between the sub-image and the template image; when the primitive region is detected by template matching, in the case where a plurality of candidate regions are obtained for one power primitive, a non-maximum suppression method is used to screen and determine the optimal primitive region; The step of using the non-maximum suppression method to screen and determine the optimal primitive area includes: filtering out region candidate boxes that are smaller than a matching threshold according to position matching confidence; Calculate the intersection-and-union ratio of the candidate box with the highest local matching confidence and other candidate boxes, filter out the regional candidate boxes where the intersection-and-union ratio is greater than the overlap threshold; and obtain the local unique optimal regional position through iteration.

10. The automatic identification and correction system for power graphic elements in monitoring screen according to claim 6, characterized in that: The correction display module displays the power element coverage area identification in the form of a rectangular frame on each identified power element, receives the element identification frame object selected by the user with the mouse when the element identification frame has a position deviation, loads the element identification frame position or element identification frame size information changed by the user through the keyboard and mouse, and the power element scheduling number and status information that the user edits and modifies directly on the interface after selecting the element identification frame; in the above-mentioned interactive correction process, the coordinate information of the identified power element is continuously adjusted and changed between the interface view and the original image, and the conversion information is immediately modified to the result record file in XML format.

11. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for automatically identifying and correcting power graphic elements in a monitoring screen according to any one of claims 1 to 5 is implemented.

Citation Information

Cited By

  • Distributed control system (DCS) monitoring system digital display primitive configuration and operation state display method based on global dynamic attribute driving

    CN122795500A