Method for realizing intelligent reading of electric meter data

文档序号:1521504 发布日期:2020-02-11 浏览:8次 中文

阅读说明:本技术 一种实现电表数据智能读取的方法 (Method for realizing intelligent reading of electric meter data ) 是由 孙乐平 秦丽娟 杨艺云 韩帅 陈卫东 吴宛潞 郭小璇 肖静 林溪桥 吴宁 于 2019-10-17 设计创作,主要内容包括:本发明公开了一种实现电表数据智能读取的方法,涉及计算机视觉和图像识别技术领域,根据电表图像的HSV模型相应的色调、饱和度、亮度和边缘检测处理电表图像,再进行形态学处理和联通量处理,并根据处理后的电表图像的数据显示部分区域的固定长宽比,筛除不符合的区域,完成电表图像中的数据区域的定位得到数据图像;然后运用Radon变换对二值化后的所述数据图像进行倾斜矫正等处理获取数据字符图像;最后数据字符图像的提取特征输入到BP神经网络进行识别,从而得到相应的电表数据。本发明方法易于实现,能够对电表数据快速读取;本发明得到的数据结果更为快速、准确,便于电表读数人员理解和使用。(The invention discloses a method for realizing intelligent reading of ammeter data, which relates to the technical field of computer vision and image recognition, and comprises the steps of processing an ammeter image according to hue, saturation, brightness and edge detection corresponding to an HSV (hue, saturation, brightness) model of the ammeter image, performing morphological processing and communication quantity processing, screening out non-conforming areas according to a fixed length-width ratio of a data display part area of the processed ammeter image, and positioning a data area in the ammeter image to obtain the data image; then, carrying out inclination correction and other processing on the binarized data image by using Radon transformation to obtain a data character image; and finally, inputting the extracted features of the data character image into a BP neural network for identification, thereby obtaining corresponding electric meter data. The method is easy to realize, and can quickly read the data of the electric meter; the data result obtained by the invention is faster and more accurate, and is convenient for the reading personnel of the electric meter to understand and use.)

1. A method for realizing intelligent reading of electric meter data is characterized by comprising the following steps: the method comprises the following steps:

s1, obtaining an ammeter image, processing the ammeter image according to hue, saturation, brightness and edge detection corresponding to an HSV model of the ammeter image, performing morphological processing and traffic processing, screening out non-conforming areas according to a fixed length-width ratio of a data display part area of the processed ammeter image, and completing positioning of a data area in the ammeter image to obtain a data image;

s2, performing inclination correction on the binarized data image by using Radon transformation;

s3, obtaining a vertical projection according to the image corrected in the S2 to obtain a histogram, wherein the histogram is provided with 'peaks' and 'valleys', the 'peaks' correspond to characters, the 'valleys' are low parts, and space gaps among the characters are correspondingly formed; acquiring the area corresponding to each 'peak' from left to right of the histogram once, thereby obtaining a data character image in the ammeter image;

s4, constructing a BP (back propagation) neural network for identifying numbers, extracting features of the data character images, and identifying the data of the extracted features through the BP neural network for identifying the numbers to obtain electric meter data of the electric meter images; the method comprises the following steps:

s41, setting the BP neural network as a 3-layer network: the neuron number of the input layer is 20; the output result of the output layer has 10 numbers of '0' to '9', the BCD coding is adopted for the number coding, and the number of output neurons is set to be 4; the number of hidden layer neurons is set to 32;

s42, extracting the characteristics of the digital images in the standard character library, storing the digital images into a P matrix as an input matrix, setting an output matrix T according to the BCD coding result of the corresponding numbers, finally establishing a BP neural network, and training the BP neural network;

and S43, extracting the features of the data character images, inputting the extracted feature vectors into the BP neural network trained in the S42 to obtain corresponding vector results, binarizing the vector results, and decoding to obtain corresponding ammeter data.

2. The method for realizing intelligent reading of meter data as claimed in claim 1, wherein the step of correcting the tilt in S2 is to perform binary transformation on the data image to obtain a binary image, to express the pixel value of the binary image by a function f (x, y), and then to perform multi-directional projection on the binary image by performing linear integration on the function f (x, y) in the projection direction to obtain a maximum projection value, wherein the maximum projection value corresponds to the tilt angle α of the meter image, and to correct the data image by performing rotation in the opposite direction according to the tilt angle.

3. The method for realizing intelligent reading of meter data according to claim 1, characterized in that: in S1, the image obtained before the fixed aspect ratio screening is performed is processed into an RGB image.

4. The method for realizing intelligent reading of meter data according to claim 1, characterized in that: and the method is realized by adopting MATLAB language programming.

5. The method for realizing intelligent reading of meter data according to claim 1, characterized in that: in S41, the input layer activation function of the BP neural network is also set to be a tansig function, and the hidden layer activation function is set to be a logsig function.

Technical Field

The invention belongs to the technical field of computer vision and image recognition, and particularly relates to a method for intelligently reading electric meter data.

Background

In the license plate image recognition system based on the neural network, the artificial neural network is a model for solving complex problems by simulating the reaction mechanism of the neural network of organisms. Because the artificial neural network has the capability of processing a plurality of complex events simultaneously, the learning capability is strong, the error is small, the information can be processed and stored, and the self-adaptive capability is realized.

In the license plate recognition technology research based on the convolutional neural network, the convolutional neural network is a new artificial neural network, combines a deep learning technology, has the characteristics of a local receptive field, global training and the like, and can obtain effective representation of an original image.

However, the existing electric meter data identification methods are complex, the identification process is long, and the accuracy of the identification result needs to be improved. Therefore, how to design a faster and more accurate method for reading the meter data is a problem to be solved.

Disclosure of Invention

The invention aims to provide a method for realizing intelligent reading of electric meter data, thereby overcoming the defects of complex identification method, long identification process and correct rate of identification result of the existing electric meter data.

In order to achieve the purpose, the invention provides a method for realizing intelligent reading of electric meter data, which comprises the following steps:

s1, obtaining an ammeter image, processing the ammeter image according to hue, saturation, brightness and edge detection corresponding to an HSV model of the ammeter image, performing morphological processing and traffic processing, screening out non-conforming areas according to a fixed length-width ratio of a data display part area of the processed ammeter image, and completing positioning of a data area in the ammeter image to obtain a data image;

s2, performing inclination correction on the binarized data image by using Radon transformation;

s3, obtaining a vertical projection according to the image corrected in the S2 to obtain a histogram, wherein the histogram is provided with 'peaks' and 'valleys', the 'peaks' correspond to characters, the 'valleys' are low parts, and space gaps among the characters are correspondingly formed; acquiring the area corresponding to each 'peak' from left to right of the histogram once, thereby obtaining a data character image in the ammeter image;

s4, constructing a BP (back propagation) neural network for identifying numbers, extracting features of the data character images, and identifying the data of the extracted features through the BP neural network for identifying the numbers to obtain electric meter data of the electric meter images; the method comprises the following steps:

s41, setting the BP neural network as a 3-layer network: the neuron number of the input layer is 20; the output result of the output layer has 10 numbers of '0' to '9', the BCD coding is adopted for the number coding, and the number of output neurons is set to be 4; the number of hidden layer neurons is set to 32;

s42, extracting the characteristics of the digital images in the standard character library, storing the digital images into a P matrix as an input matrix, setting an output matrix T according to the BCD coding result of the corresponding numbers, finally establishing a BP neural network, and training the BP neural network;

and S43, extracting the features of the data character images, inputting the extracted feature vectors into the BP neural network trained in the S42 to obtain corresponding vector results, binarizing the vector results, and decoding to obtain corresponding ammeter data.

Further, the step of correcting the tilt in S2 is to perform binary transformation on the data image to obtain a binary image, express the pixel value of the binary image by a function f (x, y), perform multi-directional projection on the binary image as a result of performing linear integration on the function f (x, y) in the projection direction, select a maximum projection value, the angle corresponding to the maximum projection value is the tilt angle α of the electricity meter image, and correct the data image by rotating the data image in the opposite direction according to the tilt angle.

Further, in S1, the image obtained before the fixed aspect ratio screening is performed is processed into an RGB image.

Further, the method is realized by adopting MATLAB language programming.

Further, in S41, the input layer activation function of the BP neural network is set to be a tansig function, and the hidden layer activation function is set to be a logsig function.

Compared with the prior art, the invention has the following beneficial effects: the method for intelligently reading the electric meter data comprises the steps of preprocessing an electric meter image, namely processing the electric meter image according to hue, saturation, brightness and edge detection corresponding to an HSV (hue, saturation, brightness) model of the electric meter image, performing morphological processing and communication quantity processing, screening out non-conforming areas according to the fixed length-width ratio of a data display part area of the processed electric meter image, and positioning a data area in the electric meter image to obtain the data image; then, carrying out inclination correction and other processing on the binarized data image by using Radon transformation to obtain a data character image; and finally, inputting the extracted features of the data character image into a BP neural network for identification, thereby obtaining corresponding electric meter data. The method is easy to realize, and can quickly read the data of the electric meter; the data result obtained by the invention is faster and more accurate, and is convenient for the reading personnel of the electric meter to understand and use.

Drawings

In order to more clearly illustrate the technical solution of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only one embodiment of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.

Fig. 1 is a flow chart of a method for realizing intelligent reading of electric meter data according to the invention.

Detailed Description

The technical solutions in the present invention are clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

As shown in fig. 1, the method for realizing intelligent reading of electric meter data provided by the present invention is realized by using MATLAB language programming, and includes the following steps:

s1, obtaining an electric meter image, processing the electric meter image according to hue (H), saturation (S), brightness (V) and edge detection corresponding to an HSV model of the electric meter image, performing morphological processing and communication quantity processing, converting the electric meter image into the HSV image, screening out non-conforming areas according to the fixed length-width ratio of the data display part area of the processed electric meter image, completing positioning of the data area in the electric meter image, and obtaining the data image.

S2, performing inclination correction on the binarized data image by using Radon transformation, specifically, performing binary transformation on the data image to obtain a binary image, representing the pixel value of the binary image by using a function f (x, y), performing multi-direction projection on the binary image by performing linear integration on the function f (x, y) in the projection direction according to the projection result of the pixel value of the binary image, selecting the maximum projection value, wherein the angle corresponding to the maximum projection value is the inclination angle α of the ammeter image, and performing opposite-direction rotation correction on the data image according to the inclination angle.

S3, acquiring a vertical projection according to the image corrected in the S2 to obtain a histogram, and performing character cutting by using a method for acquiring each 'peak', wherein the histogram has 'peaks' and 'valleys' similar to a waveform diagram, the 'peaks' correspond to characters, the 'valleys' are low parts, and spaces between the corresponding characters are blank; and acquiring the area corresponding to each peak from the histogram from left to right once, thereby obtaining a data character image in the electric meter image.

S4, constructing a BP neural network for identifying numbers, extracting features of the data character images, and identifying the data of the extracted features through the BP neural network for identifying the numbers to obtain electric meter data of the electric meter images; the method comprises the following steps:

s41, setting the BP neural network as a 3-layer network: the neuron number of the input layer is 20; the output result of the output layer has 10 numbers of '0' to '9', the BCD coding is adopted for the number coding, and the number of output neurons is set to be 4; the number of hidden layer neurons is set to 32; setting an input layer activation function of the BP neural network as a tansig function, and setting a hidden layer activation function as a logsig function;

s42, extracting the characteristics of the digital images in the standard character library, storing the digital images into a P matrix as an input matrix, setting an output matrix T according to the BCD coding result of the corresponding numbers, finally establishing a BP neural network, and training the BP neural network;

and S43, extracting the features of the data character image, inputting the extracted feature vector into the BP neural network trained in the S42 to obtain a corresponding vector result, binarizing the vector result, and decoding to obtain corresponding electric meter data.

The above disclosure is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of changes or modifications within the technical scope of the present invention, and shall be covered by the scope of the present invention.

6页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:基于图像处理的文本检测方法、装置、介质及电子设备

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!