A method, device and equipment for intelligent reading of sulfur hexafluoride fine pointer instrument

By using area growth method and virtual linear rotation technology in a fine sulfur hexafluoride instrument, the pointer and scale area are accurately extracted, and the problem of low reading recognition accuracy in the prior art is solved, achieving higher recognition accuracy.

CN118736543BActive Publication Date: 2025-02-28CHINA THREE GORGES CORPORATION
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410820834.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-24
Publication Date
2025-02-28
Estimated Expiration
2044-06-24

AI Technical Summary

Technical Problem

In the existing method of identifying fine sulfur hexafluoride instruments, it is difficult for the regional growth method to accurately extract pointers, resulting in low accuracy in reading recognition.

Method used

By obtaining the target dial image of the instrument, determining the initial seed point, using the preset area growth method to extract the pointer and scale areas, and rotating the virtual straight lines in these areas, recording the number of pixel points that overlap the virtual straight lines with the pointer and scale areas, determining the pointer position, and finally calculating the reading.

Benefits of technology

The accuracy of the reading recognition of the fine pointer type meter of sulfur hexafluoride is improved, and the problem of poor pointer extraction effect of regional growth method is overcome.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118736543B_ABST
    Figure CN118736543B_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of electric meter reading recognition, and discloses an intelligent reading method, device and equipment for a sulfur hexafluoride fine pointer type meter. The method comprises: obtaining a target dial image of the sulfur hexafluoride fine pointer type meter; determining an initial seed point in the target dial image; taking the initial seed point as a starting point, extracting a pointer and a scale area in the target dial image by a preset region growing method; rotating a virtual straight line in the pointer and scale area and recording the number of target pixel points where the virtual straight line and the pointer and scale area overlap, and when the number of target pixel points where the virtual straight line and the pointer and scale area overlap is the least, taking the position of the virtual straight line as the pointer position; and calculating the reading of the sulfur hexafluoride fine pointer type meter according to the angular relationship between the pointer position and the start and end scales in the sulfur hexafluoride fine pointer type meter. The invention improves the accuracy of the reading recognition of the sulfur hexafluoride fine pointer type meter.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of electric meter reading recognition, and in particular to an intelligent reading method, device and equipment for a sulfur hexafluoride thin pointer type meter. Background Art

[0002] With the rapid development of smart energy, the demand for unmanned inspection of substations, booster stations and other plants is increasing. As a gas state monitoring device for electrical equipment, automatic reading of sulfur hexafluoride meters is crucial for safe power production. Commonly used sulfur hexafluoride meter recognition methods include Hough transform, template matching, deep learning and other methods.

[0003] Among the existing pointer instrument recognition methods, the most commonly used method is the Hough transform detection method, which uses the duality of points and lines to detect specific shapes in the instrument image, such as circles and lines, and realizes instrument positioning based on circle detection and pointer extraction based on line detection. The second is the region growing method, which gathers pixels based on the similarity between pixels to form connected regions with the same characteristics. The region growing method is often used to segment the instrument pointer region. For sulfur hexafluoride thin and short pointer type instruments, the main feature of this type of instrument is that the pointer is thin and short, and the pointer is connected to the C-shaped area in the dial. The Hough detection method is difficult to directly segment and extract the pointer line. The recognition of this type of instrument is different from the recognition of long pointer type instruments. The region growing method extracts the pointer region by gathering pixels based on the similarity of pixels. Since the pointer of the sulfur hexafluoride instrument, the C-shaped area in the center of the dial, and the dial shell are all black pixels, the general region growing method has a poor effect in segmenting the pointer, resulting in low accuracy in instrument reading recognition. Summary of the invention

[0004] In view of this, the present invention provides a method, device and equipment for intelligent reading of a sulfur hexafluoride fine pointer type meter to solve the technical problem of low reading recognition accuracy of the sulfur hexafluoride fine pointer type meter.

[0005] In a first aspect, the present invention provides an intelligent reading method for a sulfur hexafluoride fine pointer instrument, comprising: obtaining a target dial image of a sulfur hexafluoride fine pointer instrument; determining an initial seed point in the target dial image; taking the initial seed point as a starting point, extracting a pointer and a scale area in the target dial image by a preset region growing method; rotating a virtual straight line in the pointer and scale area and recording the number of target pixel points overlapping between the virtual straight line and the pointer and scale area, and when the number of target pixel points overlapping between the virtual straight line and the pointer and scale area is the least, taking the position of the virtual straight line as the pointer position; and calculating the reading of the sulfur hexafluoride fine pointer instrument according to the angular relationship between the pointer position and the start and end scales in the sulfur hexafluoride fine pointer instrument.

[0006] The invention discloses an intelligent reading method for a sulfur hexafluoride fine pointer type instrument, which comprises the following steps: obtaining a target dial image of a sulfur hexafluoride fine pointer type instrument; determining an initial seed point in the target dial image; taking the initial seed point as a starting point, extracting a pointer and a scale area in the target dial image by a preset region growing method; rotating a virtual straight line in the pointer and scale area and recording the number of target pixel points that overlap between the virtual straight line and the pointer and scale area, and taking the position of the virtual straight line as the pointer position when the number of target pixel points that overlap between the virtual straight line and the pointer and scale area is the least; and calculating the reading of the sulfur hexafluoride fine pointer type instrument according to the angular relationship between the pointer position and the start and end scales in the sulfur hexafluoride fine pointer type instrument, thereby overcoming the problem that the existing region growing method has a poor effect in extracting the pointer of the sulfur hexafluoride fine pointer type instrument, thereby improving the accuracy of the recognition of the reading of the sulfur hexafluoride fine pointer type instrument.

[0007] Optionally, determining the initial seed point in the target dial image includes: performing ellipse detection based on Hough transform to obtain ellipse equation parameters; calculating the center coordinates of the ellipse according to the ellipse equation parameters and using the center coordinates of the ellipse as the initial seed point in the target dial image.

[0008] In this way, the initial seed point can be automatically found through ellipse detection, providing an accurate starting position for the region growing method and improving detection efficiency and accuracy.

[0009] Optionally, taking the initial seed point as the starting point, the pointer and scale area in the target dial image is extracted by a preset region growing method, including: taking the initial seed point as the starting point, judging whether the absolute value of the difference between the grayscale value of the neighborhood pixel of the initial seed point and the grayscale value of the initial seed point is less than a first threshold; when the absolute value of the difference between the grayscale value of the neighborhood pixel and the grayscale value of the initial seed point is less than the first threshold, and the distance between the neighborhood pixel and the initial seed point is less than or equal to a second threshold, adding the neighborhood pixel to the grown area.

[0010] In this method, the pointer and scale area are effectively extracted through dual threshold judgment of grayscale and distance.

[0011] Optionally, the general equation of the ellipse obtained by ellipse detection in Hough transform is expressed as:

[0012] Ax 2 +Bxy+Cy 2 +x+Ey+=0

[0013] In the formula, A, B, C, D, E and F are the parameters of the ellipse equation that determine the ellipse, and x and y are the horizontal and vertical coordinates respectively;

[0014] The second threshold is calculated according to the following formula:

[0015]

[0016] Wherein, d is the second threshold.

[0017] In this manner, the second threshold is calculated based on the ellipse equation parameters, so that the conditional judgment of the region growing method is more standardized and accurate.

[0018] Optionally, after extracting the pointer and scale area in the target dial image, it also includes: traversing all connected areas in the pointer and scale area by a contour search method; and removing the connected areas whose areas are smaller than a preset area threshold.

[0019] In this way, isolated points are removed by removing small connected areas, thus reducing the interference of noise and other non-target elements.

[0020] Optionally, obtaining a target dial image of a sulfur hexafluoride thin-pointer instrument includes: detecting a collected instrument image using a Hough ellipse detection algorithm according to contour features of the sulfur hexafluoride thin-pointer instrument to obtain an initial dial area; selecting four pairs of matching key points from the initial dial area; and performing a perspective transformation on the initial dial area through the key points to obtain a target dial image of the sulfur hexafluoride thin-pointer instrument.

[0021] In this way, the image can be tilt-corrected by perspective transformation, which improves the accuracy of pointer and scale extraction in subsequent steps.

[0022] Optionally, after acquiring the target dial image of the sulfur hexafluoride thin-pointer instrument, the method further includes: performing bilateral filtering, smoothing and noise reduction, image graying and image brightness and contrast adjustment on the target dial image in sequence.

[0023] In this way, the image quality is improved through filtering, graying and contrast adjustment, providing a clearer image for subsequent pointer and scale extraction.

[0024] In a second aspect, the present invention provides an intelligent reading device for a sulfur hexafluoride fine pointer instrument, comprising: an image acquisition module, used to acquire a target dial image of the sulfur hexafluoride fine pointer instrument; a seed point determination module, used to determine an initial seed point in the target dial image; a region growing module, used to extract a pointer and scale area in the target dial image using a preset region growing method with the initial seed point as a starting point; a pointer extraction module, used to rotate a virtual straight line in the pointer and scale area and record the number of target pixel points that overlap between the virtual straight line and the pointer and scale area, and when the number of target pixel points that overlap between the virtual straight line and the pointer and scale area is the least, the position of the virtual straight line is used as the pointer position; a reading calculation module, used to calculate the reading of the sulfur hexafluoride fine pointer instrument based on the pointer position and the angular relationship between the start and end scales in the sulfur hexafluoride fine pointer instrument.

[0025] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the intelligent reading method of the sulfur hexafluoride fine pointer type instrument according to the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0026] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the intelligent reading method for a sulfur hexafluoride fine-pointer instrument according to the first aspect or any corresponding embodiment thereof.

[0027] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions, wherein the computer instructions are used to enable a computer to execute the intelligent reading method of a sulfur hexafluoride fine pointer meter as described in the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0029] Figure 1 It is a flow chart of an intelligent reading method of a sulfur hexafluoride thin pointer instrument according to an embodiment of the present invention;

[0030] Figure 2 is a schematic diagram of a target dial image according to an embodiment of the present invention;

[0031] Figure 3Schematic diagram of the start and end scale positions of the pointer and the dial of an embodiment of the present invention;

[0032] Figure 4 This is a diagram showing the segmentation effect of the pointer and scale area when no region growth stop rule is added according to an embodiment of the present invention;

[0033] Figure 5 This is a diagram showing the segmentation effect of the pointer and scale area when adding a region growth stop rule in an embodiment of the present invention;

[0034] Figure 6 : is a structural block diagram of an intelligent reading device for a sulfur hexafluoride thin pointer instrument according to an embodiment of the present invention;

[0035] Figure 7 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0036] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0037] At present, in the related technology, the image segmentation algorithm based on region growing is applied to the field of pointer instrument recognition to realize the automatic reading of the instrument. However, since the pointer, the C-shaped area in the center of the dial and the dial shell of the sulfur hexafluoride instrument are all black pixels, the general region growing method has a poor effect in segmenting the pointer, and it is difficult to realize instrument reading recognition. Based on this, an embodiment of the present invention proposes an intelligent reading method for a sulfur hexafluoride fine pointer instrument.

[0038] According to an embodiment of the present invention, an embodiment of an intelligent reading method for a sulfur hexafluoride fine pointer type instrument is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0039] In this embodiment, a method for intelligent reading of a sulfur hexafluoride thin pointer meter is provided, which is applied to terminal devices such as computers, tablets and mobile phones, such as Figure 1 As shown, the process of the intelligent reading method of the sulfur hexafluoride fine pointer instrument includes the following steps:

[0040] Step S101, obtaining a target dial image of a sulfur hexafluoride thin-pointer instrument.

[0041] Specifically, an initial instrument image is captured by a camera, and a target dial image is obtained by performing image enhancement, such as grayscale conversion and noise reduction, on the instrument image.

[0042] In one example, the target dial image is as follows Figure 2 As shown in the figure, it can be seen from the target dial image that the center area of ​​the dial and the instrument scale area are a connected domain in the image. The connected domain of similar pixels can be quickly extracted through the region growing method.

[0043] Step S102, determining an initial seed point in the target dial image.

[0044] Specifically, the initial seed point is a preset starting point of the region growing method, and the region growing method starts from the initial seed point and searches for pixel points close to the initial seed point.

[0045] Step S103, taking the initial seed point as the starting point, extracting the pointer and scale area in the target dial image by a preset region growing method.

[0046] Specifically, the pointer and scale regions are extracted starting from the initial seed point using the region growing method.

[0047] Step S104, rotating the virtual straight line in the pointer and scale area and recording the number of target pixel points overlapping the virtual straight line and the pointer and scale area. When the number of target pixel points overlapping the virtual straight line and the pointer and scale area is the least, the position of the virtual straight line is used as the pointer position.

[0048] Specifically, the target pixel is a white pixel.

[0049] Use the rotating virtual straight line method to fit the pointer straight line. Assume that a virtual straight line rotates clockwise around the center from the right 0 degree position. When it turns to the position pointed by the pointer, the overlapped white pixels are the least. This position is the position of the pointer. At this time, record the position of the fitted virtual straight line. According to the position of the virtual straight line, the angle of the pointer can be determined.

[0050] Step S105, calculating the reading of the sulfur hexafluoride fine pointer type instrument according to the pointer position and the angular relationship between the start and end scales of the sulfur hexafluoride fine pointer type instrument.

[0051] Specifically, in one example, the pointer and the start and end scale positions of the dial are as follows: Figure 3 shown.

[0052] The formula for calculating the reading of the sulfur hexafluoride fine pointer type instrument based on the pointer position and the angular relationship between the start and end scales in the sulfur hexafluoride fine pointer type instrument is as follows:

[0053]

[0054] Where R is the reading of the sulfur hexafluoride fine pointer instrument, v max is the scale value corresponding to the starting scale line, v max is the scale value corresponding to the last scale line, α is the angle between the pointer and the last scale line, β is the angle between the pointer and the starting scale line, and α and β are calculated according to the pointer position in step S104.

[0055] In one example, v min is -0.1, v min is 0.9, the calculated α is 25 degrees, β is 245 degrees, and the final reading R calculated according to the formula is 0.002.

[0056] The invention discloses an intelligent reading method for a sulfur hexafluoride fine pointer instrument, which comprises the following steps: obtaining a target dial image of a sulfur hexafluoride fine pointer instrument; determining an initial seed point in the target dial image; taking the initial seed point as a starting point, extracting a pointer and a scale area in the target dial image by a preset region growing method; rotating a virtual straight line in the pointer and scale area and recording the number of target pixel points where the virtual straight line and the pointer and scale area overlap, and when the number of target pixel points where the virtual straight line and the pointer and scale area overlap is the least, taking the position of the virtual straight line as the pointer position; and calculating the reading of the sulfur hexafluoride fine pointer instrument according to the angular relationship between the pointer position and the start and end scales in the sulfur hexafluoride fine pointer instrument, thereby overcoming the problem that the existing region growing method has a poor effect in extracting the pointer of the sulfur hexafluoride fine pointer instrument, thereby improving the accuracy of the recognition of the reading of the sulfur hexafluoride fine pointer instrument.

[0057] In one example, step S101, obtaining a target dial image of a sulfur hexafluoride thin pointer instrument, includes:

[0058] Step S1011, based on the contour features of the sulfur hexafluoride thin pointer type instrument, the collected instrument image is detected using the Hough ellipse detection algorithm to obtain an initial dial area.

[0059] Step S1012, selecting four pairs of matching key points from the initial dial area.

[0060] Step S1013, performing perspective transformation on the initial dial area through key points to obtain a target dial image of the sulfur hexafluoride thin pointer type instrument.

[0061] Specifically, based on the circular contour features of the instrument, the Hough ellipse detection algorithm is used to search the collected instrument image and detect the instrument area. The image perspective matrix is ​​calculated by extracting four pairs of matching coordinate points on the dial, and then the image is perspectively transformed to correct the dial area to obtain a dial with uniform scale, that is, the target dial image.

[0062] The embodiment of the present invention realizes instrument detection and tilt correction, and can perform tilt correction on an image through perspective transformation, thereby improving the accuracy of pointer and scale extraction in subsequent steps.

[0063] In one embodiment, in step S101, after obtaining the target dial image of the sulfur hexafluoride thin pointer type instrument, the method further includes:

[0064] Step S1014, performing bilateral filtering, smoothing and noise reduction, image grayscale and image brightness and contrast adjustment on the target dial image in sequence.

[0065] Specifically, the image noise interference is first removed by bilateral filtering and smoothing through the image filtering algorithm, and then the image color information is filtered through grayscale processing, and the brightness and contrast of the grayscale image are adjusted through image fusion and weighted addition operations.

[0066] The image adjustment steps include:

[0067] Bilateral filtering is a nonlinear filter that can achieve the effect of maintaining edges and reducing noise. Bilateral filtering uses a weighted average method to represent the intensity of a pixel by the weighted average of the brightness values ​​of surrounding pixels. The weighted average used is based on Gaussian distribution. The calculation formula for bilateral filtering in an image is as follows:

[0068]

[0069] Among them, BF[] pp is the image after bilateral filtering, is the regularization factor, G σs (‖p-‖) is the spatial domain weight, G σr ( p -q|) is the pixel domain weight, I q is the input image.

[0070] Image grayscale. Convert a color image into a grayscale image to reduce the amount of calculation for subsequent images. The description of the grayscale image reflects the distribution and characteristics of the overall and local chromaticity and brightness levels of the entire image.

[0071] Image brightness contrast adjustment. In order to improve the accuracy of image region growing, the present invention improves the pixel difference of the image by adjusting the contrast and brightness of the image. The contrast and brightness adjustment formulas of the image are as follows:

[0072] t(x)=α1f(x)+β1g(x)+γ1

[0073] Parameters a1 and β1 are gain parameters, γ1 is a bias parameter, these parameters are mainly used to control the contrast and brightness of the image, f(x) and g(x) are input images, t(x) is the output image, and the cv2.addWeighted() function is called in opencv to adjust the brightness and contrast of the instrument image through different parameter settings.

[0074] In the embodiment of the present invention, the quality of the image is improved through filtering, graying and contrast adjustment, and a clearer image is provided for subsequent pointer and scale extraction.

[0075] In one embodiment, step S102, determining an initial seed point in the target dial image, includes:

[0076] Step S1021, performing ellipse detection based on Hough transform to obtain ellipse equation parameters.

[0077] Step S1022, calculating the coordinates of the center of the ellipse according to the ellipse equation parameters and using the coordinates of the center of the ellipse as the initial seed point in the target dial image.

[0078] Specifically, the general equation of the ellipse obtained by ellipse detection in the hough transform is expressed as:

[0079] Ax 2 +Bxy+Cy 2 +x+Ey+=0

[0080] Where A, B, C, D, E and F are the parameters of the ellipse equation that determine the ellipse, and x and y are the horizontal and vertical coordinates respectively.

[0081] Hough transform uses many-to-one mapping for ellipse detection. Five points are randomly selected from the edge points of the target dial image to construct a sample. The sample is mapped to a point in the 5-dimensional space by solving five equations. If the general equation form of the ellipse is satisfied, the parameter space count corresponding to the point is increased by 1. Repeat the above operation. When the cumulative number of a solution reaches a certain set threshold, the point with the most votes corresponds to the ellipse parameter point. After the ellipse parameter point is determined, the ellipse equation parameters can be solved according to the corresponding sample.

[0082] According to the determined ellipse equation parameters, the coordinates of the center of the ellipse O(x c ,y c ),in:

[0083]

[0084] The coordinates of the center of the circle O(x c ,y c) is the initial seed point of the region growing method. In one example, the coordinates of the center of the circle are (195, 194). In the embodiment of the present invention, the ellipse coordinates (195, 194) of the dial ellipse detection result based on Hough transform are the seed points of the region growing method, and there is no need to manually set the initial seed point position.

[0085] In the embodiment of the present invention, the initial seed point can be automatically found through ellipse detection, providing an accurate starting position for the region growing method, thereby improving detection efficiency and accuracy.

[0086] In one embodiment, step S102, taking the initial seed point as the starting point, extracting the pointer and scale area in the target dial image by a preset region growing method, includes:

[0087] Step S1021, taking the initial seed point as the starting point, determining whether the absolute value of the difference between the grayscale value of the neighborhood pixels of the initial seed point and the grayscale value of the initial seed point is less than a first threshold.

[0088] Step S1022, when the absolute value of the difference between the grayscale value of the neighborhood pixel and the grayscale value of the initial seed point is less than the first threshold, and the distance between the neighborhood pixel and the initial seed point is less than or equal to the second threshold, the neighborhood pixel is added to the grown area.

[0089] Specifically, the embodiment of the present invention sets a region growing rule based on the first threshold.

[0090] It can be seen from the segmented dial image that the center area of ​​the dial and the instrument scale line area are a connected domain in the image. The connected domain of similar pixels can be quickly extracted by the region growing method. The steps of extracting the scale area by the region growing method are as follows: take (195, 194) as the starting point, set the absolute value R of the grayscale value of the 4 neighborhood pixels of the starting point subtracted from the grayscale value of the starting point pixel f(195, 194) and compare it with the first threshold. For example, the first threshold is 10. If R is less than the threshold 10, the seed pixel will contain the area where the target pixel is located. The absolute value of the difference between the starting point pixel and the pixel in the neighborhood is:

[0091] {R = ‖f(x c,c )-(i,j)‖}

[0092] If R<10, it means that the grayscale value of the adjacent area meets this interval range, indicating that f(i, k) and f(195, 194) are similar. It is further judged that the distance between the neighborhood pixel and the initial seed point is less than or equal to the second threshold, and the adjacent area is included in the grown area; if R≥10, it means that f(195, 194) and f(i, j) are not similar, and the grown area remains unchanged.

[0093] The embodiment of the present invention sets a region growing stopping rule based on the second threshold.

[0094] The embodiment of the present invention uses the distance constraint as a new type of stop growth condition. That is, each newly added pixel point not only needs to have similar properties to the initial seed point, but also needs to be within a circular area with the initial seed point as the center and d as the radius. When the seed point is not within the range, it should not be divided into the target area even if it has similar properties to the seed point, so the formula can be obtained:

[0095]

[0096]

[0097] In the formula, x c and c are the horizontal and vertical coordinates of the initial seed point, respectively, new and new are the horizontal and vertical coordinates of the new pixel respectively, and d is the second threshold.

[0098] The second threshold is calculated based on the ellipse equation parameters, making the conditional judgment of the region growing method more standardized and accurate. By improving the stop condition of region growing, all the pixel points of the region segmentation can be limited to (x c ,y c ) as the center and the radius d, which can significantly remove the similar edge pixels of the dial shell, thereby improving the accuracy of the pointer and scale area segmentation.

[0099] The pointer and scale area segmentation effects under different constraints are as follows Figure 4 and Figure 5 As shown, Figure 4 The figure shows the segmentation effect without adding the region growing stop rule. Figure 5 This is the segmentation effect diagram of the present invention by adding the regional growth stop rule. From the comparison diagram, it can be seen that Figure 5 The distance constraint of the second threshold is added as the region growing stopping rule, which makes the segmentation effect of the pointer and scale area of ​​the instrument image more accurate and improves the accuracy of subsequent pointer detection.

[0100] In the embodiment of the present invention, the pointer and scale area are effectively extracted through dual threshold judgment of grayscale and distance.

[0101] In one embodiment, after extracting the pointer and scale area in the target dial image in step S103, the method further includes:

[0102] Step a1, traverse all connected areas in the pointer and scale area by contour search method.

[0103] Step a2: remove connected regions whose areas are smaller than a preset area threshold.

[0104] Specifically, all connected areas of the image are traversed by the contour search method, and isolated points of the image are removed by area screening.

[0105] The embodiment of the present invention removes isolated points by removing small connected areas, thereby reducing interference from noise and other non-target elements.

[0106] The intelligent reading method of a sulfur hexafluoride fine pointer instrument according to the embodiment of the present invention has the following advantages:

[0107] The embodiment of the present invention solves the problem of automatic reading of sulfur hexafluoride thin pointer type instrument in power inspection, improves inspection efficiency, obtains the pointer position by rotating the virtual straight line and judging by fitting, and improves the accuracy of extracting the pointer;

[0108] The region growing method is improved to obtain a preset region growing method. By using the preset region growing method, ellipse detection is performed through Hough transform and the initial seed point of region growing is automatically determined. The second threshold is added as the stop condition for setting region growing, thereby improving the accuracy and efficiency of pointer and scale region extraction.

[0109] The tilt correction is achieved by performing perspective transformation on the acquired image, and the image quality is improved by filtering, graying and contrast adjustment.

[0110] The embodiment of the present invention also provides a sulfur hexafluoride thin pointer type meter intelligent reading device, such as Figure 6 As shown, including:

[0111] An image acquisition module 601 is used to acquire a target dial image of a sulfur hexafluoride thin pointer type instrument;

[0112] A seed point determination module 602 is used to determine an initial seed point in the target dial image;

[0113] A region growing module 603 is used to extract the pointer and scale region in the target dial image by using a preset region growing method with the initial seed point as the starting point;

[0114] The pointer extraction module 604 is used to rotate the virtual straight line in the pointer and scale area and record the number of target pixel points that overlap between the virtual straight line and the pointer and scale area, and when the number of target pixel points that overlap between the virtual straight line and the pointer and scale area is the least, the position of the virtual straight line is used as the pointer position;

[0115] The reading calculation module 605 is used to calculate the reading of the sulfur hexafluoride fine pointer type instrument according to the pointer position and the angular relationship between the start and end scales in the sulfur hexafluoride fine pointer type instrument.

[0116] The intelligent reading device of the sulfur hexafluoride fine pointer type instrument of the embodiment of the present invention obtains the target dial image of the sulfur hexafluoride fine pointer type instrument; determines the initial seed point in the target dial image; uses the initial seed point as the starting point to extract the pointer and scale area in the target dial image through a preset region growing method; rotates a virtual straight line in the pointer and scale area and records the number of target pixel points that overlap between the virtual straight line and the pointer and scale area, and when the number of target pixel points that overlap between the virtual straight line and the pointer and scale area is the least, uses the position of the virtual straight line as the pointer position; calculates the reading of the sulfur hexafluoride fine pointer type instrument according to the angular relationship between the pointer position and the start and end scales in the sulfur hexafluoride fine pointer type instrument, thereby overcoming the problem that the existing region growing method has a poor effect in extracting the pointer of the sulfur hexafluoride fine pointer type instrument, thereby improving the accuracy of the sulfur hexafluoride fine pointer type instrument reading recognition.

[0117] Further, the seed point determination module 602 includes:

[0118] The ellipse detection module is used to detect ellipse based on Hough transform and obtain the parameters of ellipse equation;

[0119] The center coordinate calculation module is used to calculate the center coordinates of the ellipse according to the ellipse equation parameters and use the center coordinates of the ellipse as the initial seed point in the target dial image.

[0120] Furthermore, the region growing module 603 includes:

[0121] A first judgment module is used to take the initial seed point as a starting point and judge whether the absolute value of the difference between the grayscale value of the neighborhood pixel of the initial seed point and the grayscale value of the initial seed point is less than a first threshold value;

[0122] The second judgment module is used to add the neighboring pixel to the grown area when the absolute value of the difference between the grayscale value of the neighboring pixel and the grayscale value of the initial seed point is less than the first threshold and the distance between the neighboring pixel and the initial seed point is less than or equal to the second threshold.

[0123] Furthermore, the general equation of the ellipse obtained by ellipse detection in Hough transform is expressed as:

[0124] Ax 2 +Bxy+Cy 2 +x+Ey+=0

[0125] In the formula, A, B, C, D, E and F are the parameters of the ellipse equation that determine the ellipse, and x and y are the horizontal and vertical coordinates respectively;

[0126] The second threshold is calculated according to the following formula:

[0127]

[0128] Wherein, d is the second threshold.

[0129] Furthermore, the region growing module 603 further includes:

[0130] A connected region search module, used to traverse all connected regions in the pointer and scale regions by using a contour search method;

[0131] The isolated point removal module is used to remove connected areas whose area is smaller than a preset area threshold.

[0132] Furthermore, the image acquisition module 601 includes:

[0133] The initial dial area acquisition module is used to detect the collected instrument image using the Hough ellipse detection algorithm according to the contour features of the sulfur hexafluoride thin pointer type instrument to obtain the initial dial area;

[0134] A key point selection module is used to select four pairs of matching key points from the initial dial area;

[0135] The perspective transformation module is used to perform perspective transformation on the initial dial area through key points to obtain a target dial image of the sulfur hexafluoride thin pointer type instrument.

[0136] Furthermore, the image acquisition module 601 also includes:

[0137] The image adjustment module is used to perform bilateral filtering, smoothing and noise reduction, image graying and image brightness and contrast adjustment on the target dial image in sequence.

[0138] The embodiment of the present invention also provides a schematic diagram of the structure of a computer device, such as Figure 7 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 7 A processor 10 is taken as an example.

[0139] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0140] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.

[0141] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0142] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0143] The computer device also includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Figure 7 The example of connecting through bus is taken in the following.

[0144] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device can be a touch screen.

[0145] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0146] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0147] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. An intelligent reading method for a sulfur hexafluoride thin pointer instrument, characterized in that: include: Acquire a target dial image of a sulfur hexafluoride fine-pointer instrument; Determining an initial seed point in the target dial image; Taking the initial seed point as the starting point, extracting the pointer and scale area in the target dial image by a preset region growing method; Rotate a virtual straight line in the pointer and scale area and record the number of target pixel points that overlap between the virtual straight line and the pointer and scale area, and when the number of target pixel points that overlap between the virtual straight line and the pointer and scale area is the least, use the position of the virtual straight line as the pointer position; Calculating the reading of the sulfur hexafluoride fine pointer type instrument based on the pointer position and the angular relationship between the start and end scales in the sulfur hexafluoride fine pointer type instrument; Wherein, determining the initial seed point in the target dial image includes: Perform ellipse detection based on Hough transform and obtain the ellipse equation parameters; The coordinates of the center of the ellipse are calculated according to the ellipse equation parameters and the coordinates of the center of the ellipse are used as the initial seed point in the target dial image.

2. The intelligent reading method of sulfur hexafluoride thin pointer instrument according to claim 1 is characterized in that: Taking the initial seed point as the starting point, extracting the pointer and scale area in the target dial image by a preset region growing method, including: Taking the initial seed point as a starting point, determining whether the absolute value of the difference between the grayscale value of the neighborhood pixel of the initial seed point and the grayscale value of the initial seed point is less than a first threshold; When the absolute value of the difference between the grayscale value of the neighborhood pixel and the grayscale value of the initial seed point is less than the first threshold, and the distance between the neighborhood pixel and the initial seed point is less than or equal to the second threshold, the neighborhood pixel is added to the grown area.

3. The intelligent reading method of sulfur hexafluoride thin pointer instrument according to claim 2 is characterized in that: The general equation of the ellipse obtained by ellipse detection in Hough transform is expressed as: Ax 2 +Bxy+Cy 2 +Dx+Ey+F=0 In the formula, A, B, C, D, E and F are the parameters of the ellipse equation that determine the ellipse, and x and y are the horizontal and vertical coordinates respectively; The second threshold is calculated according to the following formula: Wherein, d is the second threshold.

4. The intelligent reading method of sulfur hexafluoride thin pointer instrument according to claim 1 is characterized in that: After extracting the pointer and scale area in the target dial image, the method further includes: Traversing all connected areas in the pointer and scale area by using a contour search method; The connected regions whose areas are smaller than a preset area threshold are removed.

5. The intelligent reading method of sulfur hexafluoride thin pointer instrument according to claim 1 is characterized in that: Acquire the target dial image of the sulfur hexafluoride thin-pointer instrument, including: According to the contour features of the sulfur hexafluoride thin pointer instrument, the Hough ellipse detection algorithm is used to detect the collected instrument image to obtain the initial dial area; Select four pairs of matching key points from the initial dial area; The initial dial area is perspectively transformed through the key points to obtain a target dial image of a sulfur hexafluoride thin pointer type instrument.

6. The intelligent reading method of sulfur hexafluoride thin pointer instrument according to claim 1 is characterized in that: After acquiring the target dial image of the sulfur hexafluoride fine pointer instrument, it also includes: The target dial image is subjected to bilateral filtering, smoothing, noise reduction, image graying, and image brightness and contrast adjustment in sequence.

7. An intelligent reading device for a sulfur hexafluoride thin pointer instrument, characterized in that: include: An image acquisition module, used for acquiring a target dial image of a sulfur hexafluoride fine pointer instrument; A seed point determination module, used to determine an initial seed point in the target dial image; A region growing module, used to extract the pointer and scale region in the target dial image by using a preset region growing method with the initial seed point as the starting point; A pointer extraction module, used for rotating a virtual straight line in the pointer and scale area and recording the number of target pixel points that overlap between the virtual straight line and the pointer and scale area, and taking the position of the virtual straight line as the pointer position when the number of target pixel points that overlap between the virtual straight line and the pointer and scale area is the least; A reading calculation module, used for calculating the reading of the sulfur hexafluoride fine pointer type instrument according to the pointer position and the angular relationship between the start and end scales in the sulfur hexafluoride fine pointer type instrument; The seed point determination module includes: The ellipse detection module is used to detect ellipse based on Hough transform and obtain the parameters of ellipse equation; The center coordinate calculation module is used to calculate the center coordinates of the ellipse according to the ellipse equation parameters and use the center coordinates of the ellipse as the initial seed point in the target dial image.

8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the intelligent reading method of the sulfur hexafluoride fine pointer instrument according to any one of claims 1 to 6 by executing the computer instructions.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the sulfur hexafluoride fine-pointer instrument intelligent reading method according to any one of claims 1 to 6.

10. A computer program product, characterized in that The method comprises computer instructions for causing a computer to execute the intelligent reading method of a sulfur hexafluoride fine pointer type meter according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method and device for automatically reading pointer instrument by video frequency

    CN103148881A

  • Intelligent digital display method for pointer instrument based on GBS-YOLOv5s

    CN113343969A