Back propagation (BP) neural network-based degree identification method and system for dismantled ammeter
Through the BP neural network identification method, the problem of low management efficiency and low accuracy of dismantled electric meters has been solved, efficient and accurate automatic identification has been achieved, the burden of manual operations has been reduced, and management efficiency has been improved.
Patent Information
- Application Number
- CN202410455805.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-16
- Publication Date
- 2024-09-17
AI Technical Summary
The existing management methods for dismantling electricity meters are inefficient and error-prone, resulting in long manual data entry and low accuracy, consuming a lot of manpower and material resources, and affecting information management.
A dismantled electric meter degree identification method based on BP neural network is adopted. Through image collection, preprocessing, barcode and degree area recognition, feature extraction and fusion, the BP neural network classifier is used to achieve automatic identification and improve identification accuracy and efficiency.
It achieves efficient and high-precision automated identification of dismantled electric meters, reduces the intensity of manual work, reduces work error rates, improves work efficiency, and facilitates data statistics and information management.
Smart Images

Figure CN118658165A
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of electric meters, and in particular to a method and system for identifying the reading of a dismantled electric meter based on a BP neural network. Background Art
[0002] Electricity metering management is an important part of enterprise management. It is related to the legitimate rights and interests of both power suppliers and users, and to the business level of enterprises. In order to ensure the accuracy and consistency of measurement, the power company needs to check and count the meter codes (indications, readings, and electricity kilowatt-hours) of the old meters removed from the power user's site and returned to the power supply company's warehouse, and save the relevant image information. Checking the meter readings of the removed energy meters is one of the tasks of energy metering management, and it is an important basis for both power suppliers and users to settle electricity consumption.
[0003] With the development of the national economy, the number of smart meters in operation within the jurisdiction of power supply companies at all levels is increasing, and the number of electric energy meters removed due to rotation, cancellation, failure and other reasons is huge. At present, the rotation and cancellation of power supply meters mainly involve the entry of meter readings, the shooting of bottom photos and the uploading of archive systems. All the reading verification and entry of the removed electric energy meters are completed manually through high-speed scanners. The entry of each meter requires checking the barcode, comparing user information, taking photos and renaming them through barcode information, saving them to the corresponding folder, and regularly transferring the data to the MIS system database. The average processing time for each meter is about 6 minutes, which is time-consuming and inefficient. In addition, employees have been repeating operations for a long time, the work intensity is too high, and it is easy to enter data errors. The removal and withdrawal management of smart meters has always troubled power supply companies at all levels, consuming a lot of manpower and material resources, and is not conducive to the advancement of the company's information management work. Summary of the invention
[0004] The present invention is mainly to solve the problems that the existing management methods of returned electric meters are inefficient and prone to errors. A method and system for identifying the degree of returned electric meters based on a BP neural network is provided. The returned electric meters are placed on an intelligent work platform, a high-speed scanner collects images of the returned electric meters, an image processing unit processes the images of the returned electric meters, an image recognition unit identifies the barcode area to obtain the meter code, character segmentation is performed on the degree area, statistical features and structural features are extracted and fused, and the fused features are input into a BP neural network classifier to obtain the meter degree, thereby realizing efficient and high-precision automatic recognition of the base number of returned electric meters, solving the problems of low efficiency and low accuracy of manual data entry, reducing the intensity of manual work, reducing the work error rate, improving work efficiency, facilitating later data statistics, and facilitating information management of returned electric meters.
[0005] In order to achieve the above object, the present invention adopts the following technical solutions.
[0006] A method for identifying the reading of a dismantled electric meter based on a BP neural network comprises the following steps: Step S1: The image of the disassembled electric meter is collected by an image acquisition module. The image acquisition module is a high-speed scanner on the intelligent working platform. The disassembled electric meter is placed on the intelligent working platform, and the high-speed scanner is controlled to collect images through the operation interface; Step S2: preprocessing the collected disassembled electric meter image, including grayscale processing, image enhancement and binarization processing; Step S3: Locate the barcode area and the degree area of the disassembled meter image, identify the barcode area to obtain the disassembled meter code, perform character segmentation on the degree area to obtain a single character image, perform four scans in sequence to obtain the left, right, upper and lower edges of the character, and then segment the character; Step S4: extracting statistical features and structural features of a single character image and fusing them to obtain fused features. Statistical features and structural features are two dimensional bases for character recognition. Taking into account both the statistical information and structural information of the character is conducive to improving the accuracy of character recognition. Step S5: input the fusion features into the trained BP neural network classifier, the BP neural network classifier outputs the character recognition result, constructs the BP neural network, obtains the BP neural network classifier through training, and uses the BP neural network classifier to recognize characters; Step S6: Combine the character recognition results corresponding to each single character image to obtain the meter reading. The reading area image is divided into several single character images. The character recognition results of several single character images are combined in sequence to obtain the meter reading recognition result corresponding to the reading area image.
[0007] The invention provides a method for recognizing the degree of a returned electric meter based on a BP neural network. The method comprises the following steps: collecting and processing an image of a returned electric meter, recognizing a barcode area to obtain an electric meter code, first performing character segmentation on the degree area to obtain a single character image, then extracting statistical features and structural features of the single character image and fusing them to obtain fused features, then inputting the fused features into a BP neural network classifier to obtain a character recognition result, and finally combining the character recognition results of the single character image in sequence to obtain the degree of the returned electric meter, thereby realizing efficient and highly accurate automatic recognition of the base number of the returned electric meter, solving the problems of low efficiency and low accuracy of manual data entry, reducing manual work intensity, reducing work error rate, improving work efficiency, facilitating later data statistics, and facilitating information management of the returned electric meter; obtaining a single character image through character segmentation and then performing feature extraction, thereby effectively reducing the difficulty of a feature extraction algorithm; extracting statistical features and structural features of the characters and fusing them to more comprehensively reflect the features of digital characters, thereby effectively improving the accuracy of character recognition; performing character recognition using a BP neural network classifier, and realizing intelligent and efficient character recognition based on an artificial neural network method in machine learning, thereby effectively improving the character recognition effect and character recognition accuracy.
[0008] Preferably, in step S5, the process of acquiring the BP neural network classifier comprises the following steps: Step A1: Collect a large number of disassembled electricity meter images as sample data; Step A2: preprocessing the sample data; Step A3: locate the degree area of the sample data, separate the degree area into characters, and obtain a single character image sample set; Step A4: extract the statistical features and structural features of the single character image sample set and fuse them to obtain a fusion feature training set; Step A5: construct a BP neural network, and use the fusion feature training set to train the BP neural network to obtain a BP neural network classifier.
[0009] The present invention utilizes a BP neural network classifier to perform character recognition, based on an artificial neural network method in machine learning, to achieve intelligent and efficient character recognition, and effectively improve the character recognition effect and character recognition accuracy.
[0010] Preferably, the specific process of step A5 includes the following steps: Step A51: Determine the input parameters and output parameters of the BP neural network; Step A52: Determine the number of hidden layers of the BP neural network; Step A53: Determine the number of nodes in the hidden layer of the BP neural network; Step A54: determining the activation function of each node and the overall learning function; Step A55: training the BP neural network model using the fusion feature training set; Step A56: Determine whether to return to step A52 based on the model test result. If the test result meets the requirement, do not return and proceed directly to the next step. Otherwise, return to step A52. Step A57: Output the BP neural network classifier.
[0011] BP neural network is an artificial neural network based on the error back propagation algorithm, and is also one of the most widely used neural network models. BP neural network does not need to provide empirical knowledge and discriminant functions about the pattern, but only needs to reveal the mapping relationship between the input and output models through its own learning mechanism to form a decision area. Since BP neural network has extremely strong nonlinear data processing capabilities, fault tolerance and autonomous learning capabilities, most neural network models use BP network and its variations. BP neural network is a topological type structure model, which usually includes input layer, hidden layer and output layer.
[0012] Preferably, the specific process of step S2 includes the following steps: Step S21: grayscale processing is performed on the collected disassembled electric meter image; Since the digital image output by the image acquisition module is in color, in order to make image processing more convenient and improve the accuracy of image recognition, it is first processed in grayscale. From a certain raster point (x, y) on the image, it is composed of three monochrome colors R, G, and B, and each monochrome is artificially divided into 256 levels from 0 to 255. According to different combinations of R, G, and B, the acquired color image can represent 256×256×256=16777216 colors. The formula for converting a color image to a grayscale image is as follows: Y=0.299R+0.587G+0.114B That is, the original f(x,y)={fred(x,y), fgreen(x,y), fblue(x,y)} is converted to f(x,y)={f(x,y), f(x,y), f(x,y)}, that is, the functions representing the three colors of red, green and blue are merged into a function with the same grayscale value, and the value range is from 0 to 255. This is grayscale processing of the color image, converting the color light intensity into light intensity on the grayscale; Step S22: image enhancement is performed on the collected disassembled meter image; Image enhancement refers to an image processing method that improves an image so that it looks better subjectively. It is one of the basic contents of digital image processing. Its purpose is to highlight the "useful" information in the image, expand the differences between the features of different objects in the image, and lay a good foundation for image information extraction and other image analysis techniques. Since there is no universal standard for measuring the quality of image enhancement, image enhancement is often highly correlated with the specific application background. There are two main purposes of image enhancement: one is to improve the visual effect of the image by enhancing useful information and suppressing useless information; the other is to facilitate manual and machine analysis.
[0013] Step S23: binarize the collected image of the disassembled electric meter.
[0014] Preferably, the specific process of step S23 is: identify the text color and background color of the disassembled meter image, set a threshold, traverse each pixel of the disassembled meter image, if the RGB three primary colors of the pixel are all less than the threshold, then set it to black, otherwise set it to white, and obtain a black and white image. The method of taking the threshold is as follows: use the histogram method (also called the bimodal method) to find the binarization threshold, and the histogram is an important characteristic of the image. The histogram method believes that the image is composed of foreground and background. On the grayscale histogram, the foreground and background both form peaks, and the lowest valley between the two peaks is where the threshold is.
[0015] Preferably, in step S3, the specific process of performing character segmentation on the black and white degree area image to obtain a single character image includes the following steps: Step B1: loading the black and white degree area image as a pixel matrix; Step B2: Perform a first scan to determine the left edge, perform a second scan to determine the right edge, perform a third scan to determine the upper edge, and perform a fourth scan to determine the lower edge, as follows: The first scan starts from the first pixel on the leftmost side of the pixel matrix, and traverses from left to right column by column. Each column is traversed vertically from top to bottom, and the first black pixel is determined as the first edge point. The first scan ends, and the column where the first edge point is located is the left edge. The second scan starts from the first edge point and traverses horizontally to the right in the row where the first edge point is located. When the number of continuously traversed white pixels exceeds a predetermined threshold or reaches the rightmost side of the pixel matrix, the last white pixel is determined to be the second edge point, and the second scan ends. The distance between the first edge point and the second edge point is taken as the width of a single character image, and the rows where the first edge point and the second edge point are located are marked, and the column where the second edge point is located is the right edge. The third scan starts from the marked row and traverses the valid pixels of each row upward row by row. The number of blank rows without valid pixels traversed continuously exceeds a predetermined threshold or reaches the uppermost side of the pixel matrix, and the third scan ends. The last row traversed is the upper edge. The fourth scan starts from the marked row and traverses the valid pixels of each row row by row. The fourth scan ends when the number of blank rows without valid pixels continuously traversed exceeds a predetermined threshold or reaches the bottom of the pixel matrix. The last row traversed is the bottom edge. Step B3: Segment the characters according to the left edge, the right edge, the upper edge and the lower edge to form a single character image, and set all positions where the characters are segmented in the pixel matrix as white pixels; Step B4: Determine whether all characters form a single character image. If so, end the segmentation process. If not, repeat steps B2-B3 until all characters form a single character image.
[0016] The present invention obtains a single character image through character segmentation and then performs feature extraction, which effectively reduces the difficulty of the feature extraction algorithm.
[0017] Preferably, in step S4, the statistical feature is a numerical vector of space formed by combining the ratio of the number of black / white pixels in each quadrant when the character is divided into four quadrants; the structural feature is obtained by thinning the thick strokes of the character into a single thin line, and then obtaining the number, position and stroke segments of the stroke endpoints and intersections of the character. The fusion feature mainly includes two parts. The first part is the structural feature, which can accurately reflect the shape of the digital character; the second part is the statistical feature, which mainly reflects the statistical characteristics of the digital character. The combination of the structural feature and the statistical feature is called a new feature, which can not only reflect the statistical characteristics of the digital character, but also reflect the shape and structure characteristics of the digital character, and more comprehensively reflect the characteristics of the digital character.
[0018] A system for identifying the reading of a returned electric meter based on a BP neural network adopts the above-mentioned method for identifying the reading of a returned electric meter based on a BP neural network, including an intelligent working platform and operating software, wherein the intelligent working platform includes a working platform body, a vertical pole is provided on the working platform body, a high-speed scanner is installed on the vertical pole, a returned electric meter placement area is provided on the working platform body corresponding to the position of the high-speed scanner, and an operating interface is provided next to the returned electric meter placement area; the operating software includes an image processing unit and an image recognition unit connected in sequence, and the image processing unit is connected to the high-speed scanner.
[0019] The present invention also provides a system for identifying the reading of a returned electric meter based on a BP neural network, including an intelligent work platform and operating software. The intelligent work platform includes a work platform body, a vertical pole with a high-speed scanner installed on the work platform body, and a placement area for the returned electric meter at the projection position of the high-speed scanner on the table of the work platform body, and an operating interface, i.e., a touch screen display, is provided next to it to provide human-computer interaction; the operating software includes an image processing unit and an image recognition unit, which are used to process and recognize the images of the returned electric meters collected by the high-speed scanner to obtain the codes and readings of the returned electric meters; and also includes a data storage unit and a data statistics unit. This system integrates all functions of the meter, such as barcode recognition, reading recognition, photographing, archiving, automatic data aggregation, and generation of statistical reports.
[0020] Preferably, the image processing unit includes a grayscale processing module, an image enhancement module, a binarization processing module and a region positioning module connected in sequence. The image processing unit pre-processes the image of the returned meter collected by the high-speed scanner, and locates the barcode area and the degree area of the image of the returned meter; the image recognition unit includes a barcode recognition module and a degree recognition module, and the degree recognition module includes a character segmentation submodule, a feature extraction submodule and a BP neural network classifier. The image recognition unit recognizes the barcode area to obtain the code of the returned meter, and recognizes the degree area to obtain the degree of the returned meter. The system processes and recognizes the image of the returned meter collected by the high-speed scanner through the image processing unit and the image recognition unit, and obtains the code and degree of the returned meter; the recognition results, collected images, etc. are stored and summarized through the data storage unit and the data statistics unit, and statistical reports are automatically generated.
[0021] Preferably, the working platform body is provided with a power supply for communication of the disassembled meter, an infrared detection module for detecting whether the disassembled meter is inserted, and a diffuse reflection light source for machine identification, and the infrared communication module and the 485 communication module are integrated on the intelligent working platform. The intelligent working platform provides a power supply system for the meter, which can provide power for communication; the infrared detection module detects whether the meter is inserted to switch the power supply system to avoid the risk of electric shock to the operator caused by the exposed ejector pin; the camera equipment is integrated to provide a special diffuse reflection light source for machine identification, and try to avoid the reflection on the organic glass of the meter caused by the fill light, which leads to abnormal image recognition effect; at the same time, the infrared communication module and the 485 communication module are integrated to read the real-time data of the meter and send control commands to the meter.
[0022] Therefore, the advantages of the present invention are: (1) It realizes efficient and high-precision automatic identification of the base number of dismantled and returned electricity meters, solves the problem of low efficiency and low accuracy of manual data entry, reduces the intensity of manual work, reduces the error rate, improves work efficiency, facilitates later data statistics, and facilitates the information management of dismantled and returned electricity meters; (2) Obtaining a single character image through character segmentation and then extracting features effectively reduces the difficulty of the feature extraction algorithm; (3) Extract the statistical features and structural features of characters and fuse them to more comprehensively reflect the characteristics of digital characters and effectively improve the accuracy of character recognition; (4) Using BP neural network classifier for character recognition, based on the artificial neural network method in machine learning, to achieve intelligent and efficient character recognition, effectively improving the character recognition effect and character recognition accuracy; (5) Integrate all functions of the meter, including barcode recognition, degree recognition, photo taking, archiving, automatic data aggregation, and generation of statistical reports. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 The present invention is a flowchart of a method for identifying the reading of a dismantled electric meter based on a BP neural network in an embodiment of the present invention.
[0024] Figure 2 It is a structural diagram of the intelligent working platform in an embodiment of the present invention.
[0025] Figure 3 It is a module diagram of the operating software in the embodiment of the present invention.
[0026] 1. Intelligent work platform 2. Operating software 3. Work platform body 4. Pole 5. High-speed scanner 6. Disassembled electric meter placement area 7. Disassembled electric meter 8. Operation interface 9. Image processing unit 10. Image recognition unit 11. Grayscale processing module 12. Image enhancement module 13. Binarization processing module 14. Area positioning module 15. Barcode recognition module 16. Degree recognition module 17. Character segmentation submodule 18. Feature extraction submodule 19. BP neural network classifier 20. Data storage unit 21. Data statistics unit. DETAILED DESCRIPTION
[0027] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments.
[0028] In order to achieve the above object, the present invention adopts the following technical solutions.
[0029] Embodiment 1.
[0030] A method for identifying the reading of dismantled electric meters based on BP neural network, such as Figure 1 As shown, the following steps are included: Step S1: The image of the disassembled electric meter is collected by an image acquisition module. The image acquisition module is a high-speed scanner on the intelligent working platform. The disassembled electric meter is placed on the intelligent working platform, and the high-speed scanner is controlled to collect images through the operation interface; Step S2: preprocessing the collected disassembled electric meter image, including grayscale processing, image enhancement and binarization processing; Step S3: Locate the barcode area and the degree area of the disassembled meter image, identify the barcode area to obtain the disassembled meter code, perform character segmentation on the degree area to obtain a single character image, perform four scans in sequence to obtain the left, right, upper and lower edges of the character, and then segment the character; Step S4: extracting statistical features and structural features of a single character image and fusing them to obtain fused features. Statistical features and structural features are two dimensional bases for character recognition. Taking into account both the statistical information and structural information of the character is conducive to improving the accuracy of character recognition. Step S5: input the fusion features into the trained BP neural network classifier, the BP neural network classifier outputs the character recognition result, constructs the BP neural network, obtains the BP neural network classifier through training, and uses the BP neural network classifier to recognize characters; Step S6: Combine the character recognition results corresponding to each single character image to obtain the meter reading. The reading area image is divided into several single character images. The character recognition results of several single character images are combined in sequence to obtain the meter reading recognition result corresponding to the reading area image.
[0031] The invention provides a method for recognizing the degree of a returned electric meter based on a BP neural network. The method comprises the following steps: collecting and processing an image of a returned electric meter, recognizing a barcode area to obtain an electric meter code, first performing character segmentation on the degree area to obtain a single character image, then extracting statistical features and structural features of the single character image and fusing them to obtain fused features, then inputting the fused features into a BP neural network classifier to obtain a character recognition result, and finally combining the character recognition results of the single character image in sequence to obtain the degree of the returned electric meter, thereby realizing efficient and highly accurate automatic recognition of the base number of the returned electric meter, solving the problems of low efficiency and low accuracy of manual data entry, reducing manual work intensity, reducing work error rate, improving work efficiency, facilitating later data statistics, and facilitating information management of the returned electric meter; obtaining a single character image through character segmentation and then performing feature extraction, thereby effectively reducing the difficulty of a feature extraction algorithm; extracting statistical features and structural features of the characters and fusing them to more comprehensively reflect the features of digital characters, thereby effectively improving the accuracy of character recognition; performing character recognition using a BP neural network classifier, and realizing intelligent and efficient character recognition based on an artificial neural network method in machine learning, thereby effectively improving the character recognition effect and character recognition accuracy.
[0032] In step S5, the process of obtaining the BP neural network classifier includes the following steps: Step A1: Collect a large number of disassembled electricity meter images as sample data; Step A2: preprocessing the sample data; Step A3: locate the degree area of the sample data, separate the degree area into characters, and obtain a single character image sample set; Step A4: extract the statistical features and structural features of the single character image sample set and fuse them to obtain a fusion feature training set; Step A5: construct a BP neural network, and use the fusion feature training set to train the BP neural network to obtain a BP neural network classifier.
[0033] The present invention utilizes a BP neural network classifier to perform character recognition, based on an artificial neural network method in machine learning, to achieve intelligent and efficient character recognition, and effectively improve the character recognition effect and character recognition accuracy.
[0034] The specific process of step A5 includes the following steps: Step A51: Determine the input parameters and output parameters of the BP neural network; Step A52: Determine the number of hidden layers of the BP neural network; Step A53: Determine the number of nodes in the hidden layer of the BP neural network; Step A54: determining the activation function of each node and the overall learning function; Step A55: training the BP neural network model using the fusion feature training set; Step A56: Determine whether to return to step A52 based on the model test result. If the test result meets the requirement, do not return and proceed directly to the next step. Otherwise, return to step A52. Step A57: Output the BP neural network classifier.
[0035] BP neural network is an artificial neural network based on the error back propagation algorithm, and is also one of the most widely used neural network models. BP neural network does not need to provide empirical knowledge and discriminant functions about the pattern, but only needs to reveal the mapping relationship between the input and output models through its own learning mechanism to form a decision area. Since BP neural network has extremely strong nonlinear data processing capabilities, fault tolerance and autonomous learning capabilities, most neural network models use BP network and its variations. BP neural network is a topological type structure model, which usually includes input layer, hidden layer and output layer.
[0036] The specific process of step S2 includes the following steps: Step S21: grayscale processing is performed on the collected disassembled electric meter image; Since the digital image output by the image acquisition module is in color, in order to make image processing more convenient and improve the accuracy of image recognition, it is first processed in grayscale. From a certain raster point (x, y) on the image, it is composed of three monochrome colors R, G, and B, and each monochrome is artificially divided into 256 levels from 0 to 255. According to different combinations of R, G, and B, the acquired color image can represent 256×256×256=16777216 colors. The formula for converting a color image to a grayscale image is as follows: Y=0.299R+0.587G+0.114B That is, the original f(x,y)={fred(x,y), fgreen(x,y), fblue(x,y)} is converted to f(x,y)={f(x,y), f(x,y), f(x,y)}, that is, the functions representing the three colors of red, green and blue are merged into a function with the same grayscale value, and the value range is from 0 to 255. This is grayscale processing of the color image, converting the color light intensity into light intensity on the grayscale; Step S22: image enhancement is performed on the collected disassembled meter image; Image enhancement refers to an image processing method that improves an image so that it looks better subjectively. It is one of the basic contents of digital image processing. Its purpose is to highlight the "useful" information in the image, expand the differences between the features of different objects in the image, and lay a good foundation for image information extraction and other image analysis techniques. Since there is no universal standard for measuring the quality of image enhancement, image enhancement is often highly correlated with the specific application background. There are two main purposes of image enhancement: one is to improve the visual effect of the image by enhancing useful information and suppressing useless information; the other is to facilitate manual and machine analysis.
[0037] Step S23: binarize the collected image of the disassembled electric meter.
[0038] The specific process of step S23 is: identify the text color and background color of the disassembled meter image, set the threshold, traverse each pixel of the disassembled meter image, if the RGB three primary colors of the pixel are all less than the threshold, then set it to black, otherwise set it to white, and obtain a black and white image. The method of taking the threshold is as follows: use the histogram method (also called the bimodal method) to find the binarization threshold. The histogram is an important characteristic of the image. The histogram method believes that the image is composed of foreground and background. On the grayscale histogram, the foreground and background both form peaks, and the lowest valley between the bimodal is where the threshold is.
[0039] In step S3, the specific process of performing character segmentation on the black and white degree area image to obtain a single character image includes the following steps: Step B1: Load the black and white degree area image as a pixel matrix; Step B2: Perform a first scan to determine the left edge, perform a second scan to determine the right edge, perform a third scan to determine the upper edge, and perform a fourth scan to determine the lower edge, as follows: The first scan starts from the first pixel on the leftmost side of the pixel matrix, and traverses from left to right column by column. Each column is traversed vertically from top to bottom, and the first black pixel is determined as the first edge point. The first scan ends, and the column where the first edge point is located is the left edge. The second scan starts from the first edge point and traverses horizontally to the right in the row where the first edge point is located. When the number of continuously traversed white pixels exceeds a predetermined threshold or reaches the rightmost side of the pixel matrix, the last white pixel is determined to be the second edge point, and the second scan ends. The distance between the first edge point and the second edge point is taken as the width of a single character image, and the rows where the first edge point and the second edge point are located are marked, and the column where the second edge point is located is the right edge. The third scan starts from the marked row and traverses the valid pixels of each row upward row by row. The number of blank rows without valid pixels traversed continuously exceeds a predetermined threshold or reaches the uppermost side of the pixel matrix, and the third scan ends. The last row traversed is the upper edge. The fourth scan starts from the marked row and traverses the valid pixels of each row row by row. The fourth scan ends when the number of blank rows without valid pixels continuously traversed exceeds a predetermined threshold or reaches the bottom of the pixel matrix. The last row traversed is the bottom edge. Step B3: Segment the characters according to the left edge, the right edge, the upper edge and the lower edge to form a single character image, and set all positions of the segmented characters in the pixel matrix to white pixels; Step B4: Determine whether all characters form a single character image. If so, end the segmentation process. If not, repeat steps B2-B3 until all characters form a single character image.
[0040] The present invention obtains a single character image through character segmentation and then performs feature extraction, which effectively reduces the difficulty of the feature extraction algorithm.
[0041] In step S4, the statistical feature is a numerical vector formed by combining the ratio of the number of black / white pixels in each quadrant when the character is divided into four quadrants; the structural feature is obtained by thinning the thick strokes of the character into a single thin line, and then obtaining the number, position and stroke segments of the stroke endpoints and intersections of the character. The fusion feature mainly includes two parts. The first part is the structural feature, which can accurately reflect the shape of the digital character; the second part is the statistical feature, which mainly reflects the statistical characteristics of the digital character. The combination of structural features and statistical features is called a new feature, which can not only reflect the statistical characteristics of the digital character, but also reflect the shape and structure characteristics of the digital character, and more comprehensively reflect the characteristics of the digital character.
[0042] Embodiment 2.
[0043] A system for identifying the readings of dismantled electric meters based on a BP neural network, using the above-mentioned method for identifying the readings of dismantled electric meters based on a BP neural network, comprises an intelligent working platform 1 and operating software 2, such as Figure 2 As shown, the intelligent work platform 1 includes a work platform body 3, a vertical pole 4 is provided on the work platform body 3, a high-speed scanner 5 is installed on the vertical pole 4, a disassembled electric meter placement area 6 is provided on the work platform body 3 at a position corresponding to the high-speed scanner 5, and an operation interface 8 is provided next to the disassembled electric meter placement area 6; Figure 3 As shown, the operating software 2 includes an image processing unit 9 and an image recognition unit 10 which are connected in sequence, and the image processing unit 9 is connected to the high-speed scanner 5 .
[0044] The present invention also provides a system for identifying the reading of a returned electric meter based on a BP neural network, comprising an intelligent work platform 1 and operating software 2, wherein the intelligent work platform 1 comprises a work platform body 3, a vertical pole 4 with a high-speed scanner 5 installed on the work platform body 3, a returned electric meter placement area 6 is provided at the projection position of the high-speed scanner 5 on the table of the work platform body 3, and an operating interface 8, i.e., a touch screen display, is provided next to it to provide human-computer interaction; the operating software 2 comprises an image processing unit 9 and an image recognition unit 10, which are used to process and recognize the image of the returned electric meter 7 collected by the high-speed scanner 5, and obtain the code and reading of the returned electric meter 7; and also comprises a data storage unit 20 and a data statistics unit 21. This system integrates all functions of the meter, such as barcode recognition, reading recognition, photographing, archiving, automatic data aggregation, and generation of statistical reports.
[0045] like Figure 3As shown, the image processing unit 9 includes a grayscale processing module 11, an image enhancement module 12, a binarization processing module 13 and a region positioning module 14 connected in sequence. The image processing unit 9 pre-processes the image of the returned meter 7 collected by the high-speed scanner 5, and locates the barcode area and the degree area of the image of the returned meter 7; the image recognition unit 10 includes a barcode recognition module 15 and a degree recognition module 16, and the degree recognition module 16 includes a character segmentation submodule 17, a feature extraction submodule 18 and a BP neural network classifier 19. The image recognition unit 10 recognizes the barcode area to obtain the code of the returned meter 7, and recognizes the degree area to obtain the degree of the returned meter 7. The system processes and recognizes the image of the returned meter 7 collected by the high-speed scanner 5 through the image processing unit 9 and the image recognition unit 10, and obtains the code and degree of the returned meter 7; the recognition results, the collected images, etc. are stored and summarized through the data storage unit 20 and the data statistics unit 21, and statistical reports are automatically generated.
[0046] The work platform body 3 is provided with a power supply for the communication of the disassembled electric meter 7, an infrared detection module for detecting whether the disassembled electric meter 7 is inserted, and a diffuse reflection light source for machine identification. The infrared communication module and the 485 communication module are integrated on the intelligent work platform 1. The intelligent work platform 1 provides a power supply system for the electric meter, which can provide power for communication; the infrared detection module detects whether the electric meter is inserted to switch the power supply system to avoid the risk of electric shock to the operator caused by the exposed ejector pin; the camera equipment is integrated to provide a special diffuse reflection light source for machine identification to try to avoid the reflection on the organic glass of the electric meter caused by the fill light, which leads to abnormal image recognition effect; at the same time, the infrared communication module and the 485 communication module are integrated to read the real-time data of the electric meter and send control commands to the electric meter.
[0047] Embodiment three.
[0048] A method for identifying the reading of a dismantled electric meter based on a BP neural network comprises the following steps: Step S1: The image of the disassembled electric meter is collected by an image acquisition module. The image acquisition module is a high-speed scanner on the intelligent working platform. The disassembled electric meter is placed on the intelligent working platform, and the high-speed scanner is controlled to collect images through the operation interface; Step S2: preprocessing the collected disassembled electric meter image, including grayscale processing, image enhancement and binarization processing; Step S3: Locate the barcode area and the degree area of the disassembled meter image, identify the barcode area to obtain the disassembled meter code, perform character segmentation on the degree area to obtain a single character image, perform four scans in sequence to obtain the left, right, upper and lower edges of the character, and then segment the character; Step S4: extracting statistical features and structural features of a single character image and fusing them to obtain fused features. Statistical features and structural features are two dimensional bases for character recognition. Taking into account both the statistical information and structural information of the character is conducive to improving the accuracy of character recognition. Step S5: input the fusion features into the trained BP neural network classifier, the BP neural network classifier outputs the character recognition result, constructs the BP neural network, obtains the BP neural network classifier through training, and uses the BP neural network classifier to recognize characters; Step S6: combining the character recognition results corresponding to the single character images to obtain the meter reading, dividing the reading area image into a number of single character images, and combining the character recognition results of the single character images in order to obtain the meter reading recognition result corresponding to the reading area image; Step S1 specifically includes sampling and quantization, which are as follows: Sampling is the discretization of the image space coordinates, which determines the spatial resolution of the image. Simply put, it is to cover the image to be processed with a grid, and then take the average of the brightness of the simulated image on each small square as the value of the midpoint of the small square; or take the brightness value of the simulated image at the intersection of the square as the value at the intersection of the square. In this way, an analog image becomes a discrete value image represented only by the value of the midpoint of the small square, or a discrete value image represented only by the value of the intersection of the square. This grid is called a sampling grid; Sampling discretizes continuous images in space, but the pixel values (i.e., grayscale values) obtained by sampling are still continuous quantities. The conversion of the grayscale values of each pixel obtained after sampling from analog quantity to discrete quantity is called the quantization of image grayscale. Simply put, quantization is the discretization of the grayscale coordinates of the image, which determines the grayscale resolution of the image. If the continuous grayscale value is represented by z, all z values that satisfy zi≤z≤zi+1 are quantized to integers qi. qi is called the grayscale value of the pixel, and the difference between z and qi is called the quantization error. After the pixel value is quantized, it is represented by a word 8b. The grayscale value that continuously changes from black-gray-white is quantized into 256 grayscale values from 0 to 255. The range of grayscale values is 0 to 255, indicating that the brightness ranges from dark to light, and the corresponding color in the image ranges from black to white. There are two methods to quantize continuous grayscale values into grayscale levels, one is equal interval quantization, and the other is non-equal interval quantization.
[0049] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for identifying the reading of a dismantled electric meter based on a BP neural network, characterized in that: The following steps are involved: Step S1: collecting the disassembled electric meter image through the image acquisition module; Step S2: pre-processing the collected disassembled electric meter image; Step S3: Locate the barcode area and the degree area of the recovered meter image, identify the barcode area to obtain the recovered meter code, and perform character segmentation on the degree area to obtain a single character image; Step S4: extracting statistical features and structural features of a single character image and fusing them to obtain fused features; Step S5: input the fusion features into the trained BP neural network classifier, and the BP neural network classifier outputs the character recognition result; Step S6: Combine the character recognition results corresponding to the single character images to obtain the meter reading.
2. The method for identifying the reading of a dismantled electric meter based on a BP neural network according to claim 1 is characterized in that: In step S5, the process of acquiring the BP neural network classifier includes the following steps: Step A1: Collect a large number of disassembled electricity meter images as sample data; Step A2: preprocessing the sample data; Step A3: locate the degree area of the sample data, separate the degree area into characters, and obtain a single character image sample set; Step A4: extracting statistical features and structural features of a single character image sample set and fusing them to obtain a fused feature training set; Step A5: Construct a BP neural network, and use the fusion feature training set to train the BP neural network to obtain a BP neural network classifier.
3. The method for identifying the reading of a dismantled electric meter based on a BP neural network according to claim 2 is characterized in that: The specific process of step A5 includes the following steps: Step A51: Determine the input parameters and output parameters of the BP neural network; Step A52: Determine the number of hidden layers of the BP neural network; Step A53: Determine the number of nodes in the hidden layer of the BP neural network; Step A54: determining the activation function of each node and the overall learning function; Step A55: training the BP neural network model using the fusion feature training set; Step A56: Determine whether to return to step A52 based on the model test result. If the test result meets the requirement, do not return and proceed directly to the next step. Otherwise, return to step A52. Step A57: Output the BP neural network classifier.
4. The method for identifying the reading of a dismantled electric meter based on a BP neural network according to claim 1 is characterized in that: The specific process of step S2 includes the following steps: Step S21: grayscale processing is performed on the collected disassembled electric meter image; Step S22: performing image enhancement on the collected image of the disassembled electric meter; Step S23: binarize the collected image of the disassembled electric meter.
5. The method for identifying the reading of a dismantled electric meter based on a BP neural network according to claim 4 is characterized in that: The specific process of step S23 is: identify the text color and background color of the returned meter image, set a threshold, traverse each pixel of the returned meter image, and if the RGB three primary colors of the pixel are all less than the threshold, set it to black, otherwise set it to white to obtain a black and white image.
6. The method for identifying the reading of a dismantled electric meter based on a BP neural network according to claim 5 is characterized in that: In step S3, the specific process of performing character segmentation on the black and white degree area image to obtain a single character image includes the following steps: Step B1: loading the black and white degree area image as a pixel matrix; Step B2: Perform a first scan to determine the left edge, perform a second scan to determine the right edge, perform a third scan to determine the upper edge, and perform a fourth scan to determine the lower edge; Step B3: Segment the characters according to the left edge, the right edge, the upper edge and the lower edge to form a single character image, and set all the positions where the characters are segmented in the pixel matrix as white pixels; Step B4: Determine whether all characters form a single character image. If so, end the segmentation process. If not, repeat steps B2-B3 until all characters form a single character image.
7. A method for identifying the reading of a dismantled electric meter based on a BP neural network according to claim 1 or 2 or 3 or 4 or 5 or 6, characterized in that: In step S4, the statistical feature is a numerical vector in space formed by combining the ratio of the number of black / white pixels in each quadrant when the character is divided into four quadrants; the structural feature is obtained by thinning the thick strokes of the character into a single thin line, thereby obtaining the number, position and stroke segments of the stroke endpoints and intersections of the character.
8. A system for identifying the readings of a dismantled electric meter based on a BP neural network, using a method for identifying the readings of a dismantled electric meter based on a BP neural network as claimed in any one of claims 1 to 7, characterized in that: It includes an intelligent working platform and operating software. The intelligent working platform includes a working platform body. A vertical pole is provided on the working platform body. A high-speed scanner is installed on the vertical pole. A disassembled electric meter placement area is provided on the working platform body corresponding to the position of the high-speed scanner. An operating interface is provided next to the disassembled electric meter placement area. The operating software includes an image processing unit and an image recognition unit connected in sequence. The image processing unit is connected to the high-speed scanner.
9. The system for identifying the reading of a dismantled electric meter based on a BP neural network according to claim 8 is characterized in that: The image processing unit includes a grayscale processing module, an image enhancement module, a binarization processing module and a region positioning module which are connected in sequence. The image processing unit pre-processes the image of the returned electric meter collected by the high-speed scanner, and locates the barcode area and the degree area of the returned electric meter image; the image recognition unit includes a barcode recognition module and a degree recognition module, and the degree recognition module includes a character segmentation submodule, a feature extraction submodule and a BP neural network classifier. The image recognition unit recognizes the barcode area to obtain the returned electric meter code, and recognizes the degree area to obtain the degree of the returned electric meter.
10. A system for identifying the reading of a dismantled electric meter based on a BP neural network according to claim 8 or 9, characterized in that: The work platform body is provided with a power supply for communication with the removed meter, an infrared detection module for detecting whether the removed meter is inserted, and a machine recognition diffuse reflection light source. The intelligent work platform is integrated with an infrared communication module and a 485 communication module.
Citation Information
Patent Citations
Character feature extraction method based on stroke shape of boundary point and application thereof
CN102629322A
Real-time handwritten digital recognition method based on multi-feature fusion
CN103996057A
Method for recognizing digital code on PCB based on BP neural network
CN104463209A
Withdrawn meter management method based on image recognition
CN110688900A
Electrical meter image collecting and code automatic recognizing apparatus
CN201152894Y
Cited By
Intelligent electricity meter recycling method and system
CN119904878A
Electric meter intelligent recycling method and system
CN119904878B
