Image recognition method and system for pointer type meter

Through the Laplace pyramid method fusion image, Prewitt operator edge detection, double-detection head position detection and Hough transform method angle calculation methods, the problem of low recognition accuracy of pointer meter is solved, and higher recognition success is achieved rate and real-time.

CN119495085APending Publication Date: 2025-02-21GUANGZHOU POWER SUPPLY BUREAU GUANGDONG POWER GRID CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411408385.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-10
Publication Date
2025-02-21

AI Technical Summary

Technical Problem

In the prior art, when identifying pointer meter timing, the influence of factors such as light changes, meter surface stains, shooting angle deviations, resulting in poor recognition accuracy, especially in harsh environments, which is not suitable for manual meter reading.

Method used

The Laplace pyramid method is used to fuse the original images of multiple frames to reduce the impact of light changes and noise; the edge detection of the pointer and dial is accurately detected by using the Prewitt operator; the pointer and dial are detected by the double detection head respectively Position, combine the Hough transform method to calculate the relative angle and convert it into reading.

Benefits of technology

It improves the success and accuracy of meter recognition, reduces the impact of luminous changes and meter stains on recognition, improves recognition efficiency, and can identify meter in real time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119495085A_ABST
    Figure CN119495085A_ABST
Patent Text Reader

Abstract

The invention relates to an image recognition method and system for a pointer type meter. The method comprises the following steps: acquiring an original image of a meter to be recognized; fusing the continuous multiple frames of original images through a Laplacian pyramid method to obtain a fused image; performing edge detection on the fused image through a Prewitt operator to obtain an edge enhanced image; establishing double detection heads, and respectively detecting the positions of a pointer and a dial in the edge enhancement image through the double detection heads to obtain position information; and according to the position information, calculating a relative angle between the pointer and the dial through a Hough transform method, and converting the relative angle into a reading so as to complete image recognition of the pointer type meter. According to the method, the accuracy and robustness of pointer meter image recognition in the weak light environment are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of meter recognition, and in particular to an image recognition method and system for a pointer-type meter. Background Art

[0002] Pointer meters have the advantages of reliable performance, simple working principle, low price, strong anti-interference ability, etc., and are widely used in daily life and industrial sites. Faced with a large number of pointer instruments that need to be calibrated, manual reading is used to calibrate the instrument readings, which is prone to errors in the data. In addition, some industrial sites with harsh environments are not suitable for manual meter reading and data recording.

[0003] With the maturity of image processing technology, image recognition is used in the automatic recognition of pointer instruments. However, pointer instruments are generally installed in environments with insufficient light. For meters in shadows and insufficient light, the background changes greatly and the edge detection is not obvious. In addition, the possibility of pointer displacement due to long-term use is not taken into account, resulting in poor accuracy in meter recognition and reading. Summary of the invention

[0004] The present invention aims to solve at least one of the technical problems existing in the related art. To this end, the present invention provides an image recognition method and system for a pointer meter.

[0005] The present invention provides an image recognition method for a pointer-type meter, comprising: S1: Collect the original image of the meter to be identified; S2: Fusing multiple consecutive frames of original images through the Laplace pyramid method to obtain a fused image; S3: performing edge detection on the fused image by using a Prewitt operator to obtain an edge enhanced image; S4: establishing a dual detection head, and respectively detecting the positions of the pointer and the dial in the edge enhanced image by the dual detection head to obtain position information; S5: According to the position information, the relative angle between the pointer and the dial is calculated by the Hough transform method and converted into a reading to complete the image recognition of the pointer meter.

[0006] According to an image recognition method for a pointer meter provided by the present invention, step S2 further comprises: S21: Processing the multiple frames of original images through a Gaussian filter to obtain multiple frames of first smoothed images; S22: Preset the number of pyramid layers, and downsample the multiple frames of first smoothed images according to the number of pyramid layers to obtain a Gaussian pyramid; S23: Upsampling each layer of the Gaussian pyramid to obtain a Laplacian pyramid; S24: fusing and reconstructing each layer of the Laplacian pyramid respectively to obtain a fused image.

[0007] According to an image recognition method for a pointer meter provided by the present invention, step S23 further comprises: S231: Based on a bilinear interpolation upsampling method, enlarging each layer of the image in the Gaussian pyramid to the image size of the previous layer to obtain an upsampled image; S232: Processing the up-sampled image through a Gaussian filter to obtain a second smoothed image; S233: Subtract each layer image in the Gaussian pyramid from the second smoothed image of the previous layer to obtain a Laplacian pyramid.

[0008] According to an image recognition method for a pointer meter provided by the present invention, step S3 further comprises: S31: define the horizontal edge operator and the vertical edge operator of the Prewitt operator; S32: performing convolution on the fused image by using the horizontal edge operator and the vertical edge operator respectively to obtain a horizontal gradient image and a vertical gradient image; S33: Obtain an edge enhanced image by calculating the gradient amplitude of the horizontal gradient image and the vertical gradient image.

[0009] According to an image recognition method for a pointer meter provided by the present invention, the expression of the edge enhanced image in step S33 is: ; in, is a pixel, is the gradient amplitude of the edge enhancement image, Pixel The gradient value in the horizontal direction, Pixel The gradient value in the vertical direction.

[0010] According to an image recognition method for a pointer meter provided by the present invention, step S4 further comprises: S41: Establishing a first anchor frame as a pointer detection head and establishing a second anchor frame as a dial detection head; S42: Scanning the pointer of the meter to be identified by the pointer detection head to obtain a plurality of candidate pointer positions; based on a segmentation method, separating the dial of the meter to be identified by the dial detection head to obtain dial position information; S43: Based on the regression method, multiple candidate pointer positions are corrected and selected to obtain pointer position information.

[0011] According to an image recognition method for a pointer meter provided by the present invention, the pointer detection head and the dial detection head in step S42 are parallel dual detection heads.

[0012] According to an image recognition method for a pointer meter provided by the present invention, step S5 further comprises: S51: obtaining a pointer straight line according to the pointer position information and obtaining a dial straight line corresponding to the central axis of the dial according to the dial position information by using a Hough transform method; S52: converting the pointer straight line and the dial straight line into unit vectors respectively, and obtaining the relative angle between the pointer straight line and the dial according to the unit vectors; S53: Calculate and obtain the dial reading according to the range information of the dial and the relative angle.

[0013] According to an image recognition method for a pointer meter provided by the present invention, the expression of the relative angle in step S52 is: ; in, To calculate the relative angle, is the unit vector corresponding to the pointer line, is the unit vector corresponding to the dial line, is the modulus of the unit vector corresponding to the pointer line, is the modulus of the unit vector corresponding to the straight line of the dial.

[0014] The present invention also provides an image recognition system for a pointer-type meter, comprising: Acquisition module: used to acquire the original image of the meter to be identified; Fusion module: used for fusing multiple consecutive frames of original images acquired by the acquisition module to obtain a fused image; Edge enhancement module: used for performing edge detection on the fused image obtained by the fusion module to obtain an edge enhanced image; Detection module: used to establish a dual detection head, and respectively detect the positions of the pointer and the dial in the edge enhanced image through the dual detection head to obtain coordinate information; Conversion module: used to calculate the relative angle between the pointer and the dial according to the coordinate information through the Hough transformation method and convert it into a reading.

[0015] The present invention provides an image recognition method and system for pointer-type meters. The Laplace pyramid method is used to fuse continuous multiple frames of original images, which effectively reduces the influence of factors such as illumination changes, stains on the surface of the meter, and shooting angle deviation on the image quality, and obtains a fused image with higher definition and contrast, which provides a better basis for subsequent edge detection and position detection. The Prewitt operator is subsequently used to perform edge detection on the fused image, which can accurately detect the horizontal and vertical edges in the image, especially the edges of the pointer and the dial, and provides accurate edge information for subsequent position detection. In addition, through the dual detection heads, the position detection is performed for the pointer and the dial respectively, which improves the accuracy and efficiency of the detection, and the position information of the pointer and the dial can be obtained more quickly. In general, the present invention can reduce the objective conditions such as illumination changes and meter stains that affect the image recognition of pointer-type meters, improve the success rate and accuracy of meter recognition, and at the same time improve the recognition efficiency, so that the meter can be recognized in real time.

[0016] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, 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 some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0018] Figure 1 It is a flow chart of an image recognition method for a pointer-type meter provided by the present invention; Figure 2 The present invention provides a schematic diagram of the structure of an image recognition system for a pointer-type meter.

[0019] Reference numerals: 100, acquisition module; 200, fusion module; 300, edge enhancement module; 400, detection module; 500, conversion module. DETAILED DESCRIPTION

[0020] In order to make the purpose, technical scheme and advantages of the present invention clearer, the technical scheme of the present invention will be clearly and completely described below in conjunction with the drawings in the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present invention. The following embodiments are used to illustrate the present invention, but cannot be used to limit the scope of the present invention.

[0021] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the embodiment of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0022] Combine the following Figure 1 to Figure 2 Embodiments of the present invention are described.

[0023] like Figure 1 As shown, the present invention provides an image recognition method for a pointer meter, comprising: S1: Collect the original image of the meter to be identified.

[0024] Furthermore, in step S1, the original image of the meter is first collected. It should be noted that multiple continuous original images need to be collected for the fusion of the previous and next frame images in step S2. The equipment used in this embodiment is an industrial camera, which is inexpensive and easy to deploy. In addition, when collecting images, it should be ensured that the shooting angle is perpendicular to the surface of the meter to reduce the impact of perspective deformation on image quality.

[0025] S2: Multiple consecutive frames of original images are fused using the Laplace pyramid method to obtain a fused image.

[0026] In actual application scenarios, the present invention takes into account the existence of blurred texture information, misidentification of feature contours, and occlusion of obstacles in dark environments, which makes it impossible to effectively track feature objects, and thus makes it impossible to effectively meet the demand for the feature recognition accuracy of the meter. Therefore, in step S2, the effective feature representation that characterizes the association is enhanced by fusing multiple frames of images.

[0027] Laplace pyramid fusion is a multi-scale image fusion technology. By constructing a Laplace pyramid, the image is decomposed into layers of different resolutions, and then these layers are processed and fused separately, and finally a high-quality fused image is reconstructed, which can retain the detailed information in the image while improving the clarity and contrast of the image. Therefore, in this stage, the Laplace pyramid method can enhance the detailed information of the image at different resolution levels, so that the features to be identified, that is, the needle and dial, are clearer and more identifiable in the fused image. In addition, this method can also improve the contrast of the image, making the needle, dial and background more distinguishable, especially in low-light environments, which helps to more accurately identify the target position.

[0028] Wherein, step S2 further comprises: S21: Processing multiple frames of original images through a Gaussian filter to obtain multiple frames of first smoothed images.

[0029] Specifically, after obtaining the original image in step S1, the image needs to be converted into a grayscale image first, and then a Gaussian filter is applied to the original image for smoothing to reduce image noise and remove high-frequency details. The Gaussian filter used in this embodiment is a large convolution kernel of 5x5.

[0030] S22: Preset the number of pyramid levels, and downsample the multiple frames of first smoothed images respectively according to the number of pyramid levels to obtain a Gaussian pyramid.

[0031] In the downsampling process, that is, in the process of constructing the Gaussian pyramid, the Gaussian blurred image is first downsampled, that is, pixels are deleted in alternate rows and columns to halve the image size, and the above Gaussian blur and downsampling steps are repeated until the required number of pyramid layers is reached. Each layer of the image in the obtained Gaussian pyramid is one quarter of the size of the previous layer.

[0032] S23: Up-sampling each layer of the Gaussian pyramid to obtain a Laplacian pyramid.

[0033] Wherein, step S23 further comprises: S231: Based on a bilinear interpolation upsampling method, each layer of the image in the Gaussian pyramid is enlarged to the image size of the previous layer to obtain an upsampled image.

[0034] S232: Process the up-sampled image through a Gaussian filter to obtain a second smoothed image.

[0035] After obtaining the Gaussian pyramid in step S22, the specific steps in step S23 are to start from each layer of the Gaussian pyramid, use an upsampling method, and the bilinear interpolation method selected in this embodiment, and optionally, a cubic interpolation method can be used to enlarge the image size to the size of the previous layer, and apply a Gaussian filter to the upsampled image again for smoothing to simulate the high-frequency information lost in the previous layer of the image.

[0036] S233: Subtract each layer image in the Gaussian pyramid from the second smoothed image of the previous layer to obtain a Laplacian pyramid.

[0037] In step S233, each layer of the image in the Gaussian pyramid is subtracted from the image obtained by upsampling and Gaussian convolution of the image in the previous layer, so as to obtain each layer of the Laplacian pyramid, that is, the Laplacian layer, which contains the high-frequency detail information lost at the current scale.

[0038] S24: fusing and reconstructing each layer of the Laplacian pyramid respectively to obtain a fused image.

[0039] Furthermore, in this step, each layer of the obtained Laplacian pyramid is fused separately by weighted averaging method. The fusion result will contain high-frequency detail information from different images. The top image after fusion of the Laplacian pyramid is used as the starting point, and the fused Laplacian layer image is up-sampled layer by layer and added until the resolution of the original image is reached, that is, the reconstruction of the fused image is completed.

[0040] In general, since images taken in low-light environments often contain a lot of noise, the present invention can average the noise by fusing multiple frames of images in step S2, thereby reducing its impact on image quality; in addition, since each frame of the image may capture different detail information, fusing these images can enhance these detail information, thereby improving the overall clarity of the image, and making the details of the dark and bright parts better presented in the edge detection in the subsequent process.

[0041] S3: Perform edge detection on the fused image using a Prewitt operator to obtain an edge enhanced image.

[0042] Furthermore, since the Prewitt operator includes two convolution kernels, which are used to detect horizontal edges and vertical edges respectively, the Prewitt operator can detect edge information in the image more comprehensively, especially in a low-light environment, where the edge of the image may become blurred or unclear. The Prewitt operator can detect edge information stably to a certain extent through its directional detection ability, thereby improving the reliability of edge detection. Therefore, the present invention selects the Prewitt operator for edge detection in a low-light environment, which has the advantages of noise suppression ability, stability of edge detection, and simplicity of implementation. These advantages enable the Prewitt operator to exhibit good performance when processing images in a low-light environment, laying the foundation for subsequent image recognition and analysis.

[0043] Wherein, step S3 further comprises: S31: Define the horizontal edge operator and the vertical edge operator of the Prewitt operator.

[0044] Furthermore, the horizontal Prewitt operator template is used to detect vertical edges, and its mathematical expression is as follows: G x = f(a-1,b-1)+f(a-1,b)+f(a-1,b+1)-[f(a+1,b-1)+f(a+1,b)+f(a+1,b+1)] ; in, is the gradient strength in the horizontal direction, The coordinates are The gray value of the pixel; The vertical Prewitt operator is similar and is usually used to detect horizontal edges. Its mathematical expression is as follows: G y = f(a-1,b+1)+f(a,b+1)+f(a+1,b+1)-[f(a-1,b-1)+f(a,b-1)+f(a+1,b-1)] ; in, is the gradient strength in the vertical direction.

[0045] After obtaining the gradient strength in the horizontal and vertical directions, the edge strength of each pixel in the image can be further calculated, which is the value of the square root of the sum of the squares of the two operators, and the edge direction can be obtained through the inverse tangent function, that is, .

[0046] S32: Convolving the fused image with the horizontal edge operator and the vertical edge operator respectively to obtain a horizontal gradient image and a vertical gradient image.

[0047] In step S32, the Prewitt operator defined in step S31 is used to perform edge detection on the preprocessed image, and the Prewitt templates in the horizontal and vertical directions are respectively applied to the image for convolution operations to calculate the gradient intensity of each pixel point, so as to obtain a horizontal gradient image and a vertical gradient image.

[0048] S33: Obtain an edge enhanced image by calculating the gradient amplitude of the horizontal gradient image and the vertical gradient image.

[0049] The expression of the edge enhanced image in step S33 is: in, is a pixel, is the gradient amplitude of the edge enhancement image, Pixel The gradient value in the horizontal direction, Pixel The gradient value in the vertical direction.

[0050] Finally, in step S33, edge enhancement is performed, that is, the gradient strengths in the horizontal and vertical directions are combined, that is, the square root of the sum of squares or the sum of absolute values ​​as shown in the above formula is calculated to obtain an edge enhanced image.

[0051] S4: establishing a dual detection head, and using the dual detection head to respectively detect the positions of the pointer and the dial in the edge enhanced image to obtain position information.

[0052] Wherein, step S4 further comprises: S41: Establish a first anchor frame as a pointer detection head, and establish a second anchor frame as a dial detection head.

[0053] In step S41, a detection head specifically used for detecting the pointer is first designed. Considering the slender shape of the pointer, a slender anchor frame can be used for preliminary detection, and then the position and angle of the pointer can be further refined in the subsequent process in combination with the regression method. As for the detection head for detecting the dial, since the dial usually has a regular circular or annular shape, the present invention uses an annular anchor frame for preliminary detection. In order to more accurately identify the scale on the dial, the segmentation method can be combined to separate the dial from the background and further extract the scale information.

[0054] S42: Scanning the pointer of the meter to be identified by the pointer detection head to obtain a plurality of candidate pointer positions; based on a segmentation method, separating the dial of the meter to be identified by the dial detection head to obtain dial position information.

[0055] Furthermore, the regression method described in step S42 is to train the pointer detection head using a labeled data set. During the training process, the parameters of the anchor frame mechanism and the regression method are continuously adjusted to improve the detection accuracy. Then, the trained pointer detection head is used to traverse the edge enhanced image obtained in step S3 to find features similar to the pointer shape. During the scanning process, the detection head generates multiple candidate pointer positions, which are based on feature points or areas in the image that may match the pointer.

[0056] The segmentation method described in step S42 is to train a segmentation model so that the dial detection head can separate the dial from the image background. Different from the pointer detection head, the dial detection head mainly uses the segmentation method to process the image. After separating the dial from the image background, it can obtain the specific position information of the dial in the image.

[0057] Wherein, the pointer detection head and the dial detection head in step S42 are parallel dual detection heads.

[0058] Furthermore, the parallelism of the parallel detection heads means that the two detection heads can be operated simultaneously without interfering with each other. In the present invention, since the needle and the dial do not affect each other, the detection heads of the present invention are arranged in parallel to speed up the processing.

[0059] S43: Based on the regression method, multiple candidate pointer positions are corrected and selected to obtain pointer position information.

[0060] In step S43, each candidate pointer position can be corrected through a regression method to eliminate errors caused by factors such as image noise, lighting changes or shooting angles. After correction, a position that is most likely to represent the true pointer position is selected from all candidate positions as the final pointer position information.

[0061] S5: According to the position information, the relative angle between the pointer and the dial is calculated by the Hough transform method and converted into a reading to complete the image recognition of the pointer meter.

[0062] Furthermore, the Hough transform detects straight lines in an image through an accumulator matrix in a parameter space. This conversion process makes the Hough transform highly robust to interference factors such as noise, partial occlusion, and light changes in the image. In addition, the Hough transform is not only applicable to meters with linear pointers, but also to meters with arc pointers or other complex shapes. By adjusting the parameters and algorithms of the Hough transform, it can flexibly adapt to pointer meters of different types and specifications, thereby improving the versatility and practicality of the present invention.

[0063] Wherein, step S5 further comprises: S51: obtaining a pointer straight line according to the pointer position information and obtaining a dial straight line corresponding to the central axis of the dial according to the dial position information by using the Hough transform method.

[0064] Specifically, the Hough transform will traverse all possible straight lines in the image by changing the straight line parameters, that is, ρ and θ in polar coordinates, and calculate the degree of matching between each straight line and the edge of the pointer. When the matching degree reaches a preset threshold, the straight line where the pointer is located is obtained. As for the straight line of the dial, since the dial is regular, the fixed central axis is directly selected as the reference straight line in this embodiment, that is, the horizontal straight line passing through the center of the dial.

[0065] S52: Convert the pointer straight line and the dial straight line into unit vectors respectively, and obtain the relative angle between the pointer straight line and the dial according to the unit vectors.

[0066] The relative angle in step S52 is expressed as: ; in, To calculate the relative angle, is the unit vector corresponding to the pointer line, is the unit vector corresponding to the dial line, is the modulus of the unit vector corresponding to the pointer line, is the modulus of the unit vector corresponding to the straight line of the dial.

[0067] In step S52, the angle between the pointer straight line and the reference straight line in step S51 is calculated by using the vector dot product method. Specifically, the two straight lines can be converted into unit vectors, and the angle between the two vectors is calculated, as shown in the above formula. In this embodiment, the dot product of the vectors and the module length angle are used.

[0068] S53: Calculate and obtain the dial reading according to the range information of the dial and the relative angle.

[0069] Specifically, in step S53, the calculated relative angle is converted into a reading according to the scale and range information of the instrument. In this embodiment, a linear proportional relationship is used for conversion. If the range of the instrument is from 0 to 100, and the angle corresponding to the minimum scale is 0 degrees, and the angle corresponding to the maximum scale is 90 degrees, then the reading can be obtained by the formula Calculated, where is the angle between the pointer and the dial line calculated in step S52, is the angle corresponding to the maximum scale, For the range.

[0070] like Figure 2As shown, the present invention also provides an image recognition system for a pointer meter, comprising: Acquisition module 100: used to acquire the original image of the meter to be identified; Fusion module 200: used to fuse multiple consecutive frames of original images acquired by acquisition module 100 to obtain a fused image; The edge enhancement module 300 is used to perform edge detection on the fused image obtained by the fusion module 200 to obtain an edge enhanced image; Detection module 400: used to establish a dual detection head, and respectively detect the positions of the pointer and the dial in the edge enhanced image through the dual detection head to obtain coordinate information; The conversion module 500 is used to calculate the relative angle between the pointer and the dial according to the coordinate information by using the Hough transformation method and convert it into a reading.

[0071] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0072] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0073] The present invention provides an image recognition method and system for a pointer meter. The method fuses multiple consecutive frames of original images through the Laplace pyramid method, effectively reduces noise and blur in the image under a weak light environment, enhances the clarity of the needle and the dial, and thus improves the accuracy of subsequent image recognition. The Prewitt operator is used for edge detection, which can more comprehensively detect edge information in the image, especially in a weak light environment, and can stably detect the edge, further improving the accuracy of recognition. The application of the Hough transform method makes the present invention have strong robustness to interference factors such as noise, partial occlusion, light change, etc. in the image, and can stably perform image recognition of the pointer meter under a complex environment. The image is processed in parallel by dual detection heads, and the position information can be accurately obtained even when the needle or the dial is partially occluded or the image quality is poor, thereby improving the reliability of the system. By setting parallel dual detection heads, the positions of the pointer and the dial are detected at the same time, which speeds up the processing speed and improves the real-time performance of the system. Although the Laplace pyramid fusion and multi-scale processing increase the computational complexity, the processing time can be minimized while ensuring the recognition accuracy through optimization algorithms and parallel processing.

[0074] 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 aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. An image recognition method for a pointer meter, characterized in that: include: S1: Collect the original image of the meter to be identified; S2: Fusing multiple consecutive frames of original images through the Laplace pyramid method to obtain a fused image; S3: performing edge detection on the fused image by using a Prewitt operator to obtain an edge enhanced image; S4: establishing a dual detection head, and respectively detecting the positions of the pointer and the dial in the edge enhanced image by the dual detection head to obtain position information; S5: According to the position information, the relative angle between the pointer and the dial is calculated by the Hough transform method and converted into a reading to complete the image recognition of the pointer meter.

2. The image recognition method for a pointer meter according to claim 1, characterized in that: Step S2 further comprises: S21: Processing the multiple frames of original images through a Gaussian filter to obtain multiple frames of first smoothed images; S22: Preset the number of pyramid layers, and downsample the multiple frames of first smoothed images according to the number of pyramid layers to obtain a Gaussian pyramid; S23: Upsampling each layer of the Gaussian pyramid to obtain a Laplacian pyramid; S24: fusing and reconstructing each layer of the Laplacian pyramid respectively to obtain a fused image.

3. The image recognition method for a pointer meter according to claim 2, characterized in that: Step S23 further comprises: S231: Based on a bilinear interpolation upsampling method, enlarging each layer of the image in the Gaussian pyramid to the image size of the previous layer to obtain an upsampled image; S232: Processing the upsampled image through a Gaussian filter to obtain a second smoothed image; S233: Subtract each layer image in the Gaussian pyramid from the second smoothed image of the previous layer to obtain a Laplacian pyramid.

4. The image recognition method for a pointer meter according to claim 1, characterized in that: Step S3 further comprises: S31: define the horizontal edge operator and the vertical edge operator of the Prewitt operator; S32: performing convolution on the fused image by using the horizontal edge operator and the vertical edge operator respectively to obtain a horizontal gradient image and a vertical gradient image; S33: Obtain an edge enhanced image by calculating the gradient amplitude of the horizontal gradient image and the vertical gradient image.

5. The image recognition method for a pointer meter according to claim 4, characterized in that: The expression of the edge enhanced image in step S33 is: ; in, is a pixel, is the gradient amplitude of the edge enhancement image, Pixel The gradient value in the horizontal direction, Pixel The gradient value in the vertical direction.

6. The image recognition method for a pointer meter according to claim 1, characterized in that: Step S4 further comprises: S41: Establishing a first anchor frame as a pointer detection head and establishing a second anchor frame as a dial detection head; S42: Scanning the pointer of the meter to be identified by the pointer detection head to obtain a plurality of candidate pointer positions; based on a segmentation method, separating the dial of the meter to be identified by the dial detection head to obtain dial position information; S43: Based on the regression method, multiple candidate pointer positions are corrected and selected to obtain pointer position information.

7. The image recognition method for a pointer meter according to claim 6, characterized in that: The pointer detection head and the dial detection head in step S42 are parallel dual detection heads.

8. The image recognition method for a pointer meter according to claim 6, characterized in that: Step S5 further comprises: S51: obtaining a pointer straight line according to the pointer position information and obtaining a dial straight line corresponding to the central axis of the dial according to the dial position information by using a Hough transform method; S52: converting the pointer straight line and the dial straight line into unit vectors respectively, and obtaining the relative angle between the pointer straight line and the dial according to the unit vectors; S53: Calculate and obtain the dial reading according to the range information of the dial and the relative angle.

9. The image recognition method for a pointer meter according to claim 8, characterized in that: The relative angle in step S52 is expressed as: ; in, To calculate the relative angle, is the unit vector corresponding to the pointer line, is the unit vector corresponding to the dial line, is the modulus of the unit vector corresponding to the pointer line, is the modulus of the unit vector corresponding to the straight line of the dial.

10. An image recognition system for a pointer meter, characterized in that: include: Acquisition module: used to acquire the original image of the meter to be identified; Fusion module: used for fusing multiple consecutive frames of original images acquired by the acquisition module to obtain a fused image; Edge enhancement module: used for performing edge detection on the fused image obtained by the fusion module to obtain an edge enhanced image; Detection module: used to establish a dual detection head, and respectively detect the positions of the pointer and the dial in the edge enhanced image through the dual detection head to obtain coordinate information; Conversion module: used to calculate the relative angle between the pointer and the dial according to the coordinate information through the Hough transformation method and convert it into a reading.

Citation Information

Cited By

  • Recognition method and device for inspection and test of pressure gauge

    CN120833608A