A water meter dial reading recognition method and system
By performing preliminary segmentation and recognition of water meter images on the local side and combining it with local or global model recognition on the server side, the resource shortage and real-time issues caused by cloud processing are solved, and efficient water meter dial reading recognition is achieved.
Patent Information
- Application Number
- CN202411920260.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2044-12-25
AI Technical Summary
The existing water meter dial reading recognition relies on cloud processing, resulting in large network bandwidth consumption and insufficient computing resources, unable to meet real-time requirements and low recognition efficiency.
Image segmentation and preliminary recognition are performed locally. Segmentation rules are determined by comparing the feature point set with the pre-stored feature mapping table. When the boundary is clear, it is directly recognized. When the boundary is unclear, part of the data is sent to the server for local or global model recognition. Readings are filled in or manually input based on the recognition accuracy.
Reasonable use of local and remote resources improves the efficiency of water meter dial reading recognition, meets real-time requirements, and saves resources.
Smart Images

Figure CN119942506B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the field of water meter image processing, and particularly relates to a water meter dial reading recognition method and system. BACKGROUND
[0002] With the development of artificial intelligence technology, applying big data algorithms to water meter dial reading recognition is currently the mainstream technical path. However, the existing water meter dial reading recognition process often involves complex image processing and recognition algorithms, which require certain computing resources and time to complete. In actual application, since water meters are usually distributed in various locations and the number is large, local recognition cannot be realized, and all work involving big data algorithms is processed by a cloud server. Cloud processing requires the image data of the water meter dial to be uploaded to the cloud server first, and then the cloud server processes and recognizes it. In this process, not only a large amount of network bandwidth and transmission time are consumed, but also the computing resources of the cloud server are limited. When the number of water meters to be processed is large, the cloud server may not be able to process all the recognition tasks in time due to insufficient resources, resulting in a decrease in recognition efficiency.
[0003] In some scenarios that require real-time data acquisition, this method of relying on cloud server resources has low real-time performance and reduces work efficiency. SUMMARY
[0004] To solve the above problems in the prior art, the present application provides a water meter dial reading recognition method and system. The technical problems to be solved by the present application are solved by the following technical solutions:
[0005] A water meter dial reading recognition method, comprising:
[0006] In response to a reading request instruction, an original water meter image is collected;
[0007] Feature points of the original water meter image are extracted, the feature points of the original water meter image are compared with a pre-stored feature mapping table to determine a dial image segmentation rule, and the original water meter image is segmented according to the corresponding dial image segmentation rule to obtain a plurality of image block data;
[0008] When it is determined that the boundary of each image block data is clear and the boundary of valid information in each image block data is clear, the valid information in each image block data is directly identified to obtain the water meter dial reading; or when it is determined that the boundary of each image block data is clear and the boundary of valid information in at least one image block data is not clear, the image block data whose boundary of valid information is not clear is sent to the server end according to a predetermined rule, so that the server end performs image recognition according to a first mode to obtain the water meter dial reading; or when it is determined that the boundary of any image block data is not clear, the original water meter image is sent to the server end, so that the server end performs image recognition according to a second mode to obtain the water meter dial reading and the recognition accuracy.
[0009] In response to only receiving the water meter dial reading sent by the server end, the water meter dial reading is filled in the corresponding position; or in response to receiving the water meter dial reading and the recognition accuracy sent by the server end, it is determined according to the recognition accuracy whether to automatically fill the water meter dial reading or manually input the water meter dial reading.
[0010] In one specific embodiment, feature points of the original water meter image are extracted, and the feature points of the original water meter image are compared with a pre-stored feature mapping table to determine a dial image segmentation rule, including:
[0011] The original water meter image is processed so that the image boundary is a water meter contour image;
[0012] Feature extraction is performed on the water meter contour image to obtain a preset set of original water meter image feature points, wherein each feature element in the set of original water meter image feature points is used to represent whether a corresponding position has a preset feature, the feature element includes position number coding and feature coding, and the number of the preset set of original water meter image feature points is determined according to the type of water meter;
[0013] The preset set of original water meter image feature points is compared with a pre-stored feature mapping table respectively, and if there is a set of original water meter image feature points consistent with a set of data in the pre-stored feature mapping table, a segmentation rule corresponding to the set of data in the feature mapping table is used as the dial image segmentation rule.
[0014] In one specific embodiment, feature extraction is performed on the water meter contour image to obtain a preset set of original water meter image feature points, including:
[0015] According to the corresponding feature point set of the type of water meter, a plurality of pixel points are selected at the corresponding position in the water meter contour image;
[0016] calculating an average value of pixel gray scales of the pixels, and when the average value of the pixel gray scales of the pixels is less than the average value of the gray scales of the water meter profile image, marking the feature code of the corresponding element of the position as 1, and when the average value of the pixel gray scales of the pixels is greater than the average value of the gray scales of the water meter profile image, marking the feature code of the corresponding element of the position as 0;
[0017] combining each feature code and a position number code of the corresponding position to form a position feature element to obtain the original water meter image feature point set;
[0018] sequentially selecting each water meter type to obtain a preset group of original water meter image feature point sets.
[0019] In one specific embodiment, the corresponding position is a range of pixels centered on the point; and the elements in the pre-stored feature mapping table include elements with a preset feature in the corresponding position and elements without the preset feature in the corresponding position.
[0020] In one specific embodiment, the image block data with unclear boundaries of the effective information is sent to the server end according to a predetermined rule to enable the server end to perform image recognition according to a first mode to obtain a water meter dial reading, including:
[0021] generating a first reading request data frame and sending the first reading request data frame to the server end, the first reading request data frame including a first mode identification field, an image block sequence field, an image sequence number field of the image block data with unclear boundaries of the effective information, an image reading interval of the image block data with clear boundaries of the effective information, and image block data;
[0022] Correspondingly, the server end performs first mode identification on the corresponding image block data according to the image sequence number field of the image block data with unclear boundaries of the effective information, and combines to obtain a water meter dial reading according to the image reading interval of the image block data with clear boundaries of the effective information, where the first mode is local model image recognition.
[0023] In one specific embodiment, the original water meter image is sent to the server end to enable the server end to perform image recognition according to a second mode to obtain a water meter dial reading and an identification accuracy rate, including:
[0024] generating a second reading request data frame and sending the second reading request data frame to the server end, the second reading request data frame including a second mode identification field, an identification accuracy rate field, and original water meter image data;
[0025] Correspondingly, the server end performs second mode identification on the original water meter image data to obtain a water meter dial reading, and obtains an identification accuracy rate according to the second mode.
[0026] The application also provides a water meter dial reading recognition system, comprising:
[0027] an image acquisition module, configured to acquire an original water meter image in response to a trigger reading request instruction;
[0028] an image segmentation module, configured to extract a set of original water meter image feature points, compare the set of original water meter image feature points with a pre-stored feature mapping table to determine a dial image segmentation rule, and segment the original water meter image according to the corresponding dial image segmentation rule to obtain a plurality of image block data;
[0029] an image recognition module, configured to, when the boundaries of each image block data are clear and the boundaries of valid information in each image block data are clear, directly recognize the valid information in each image block data to obtain a water meter dial reading; or, when the boundaries of each image block data are clear and the boundaries of valid information in at least one image block data are unclear, send the image block data with unclear boundaries of valid information to a server end according to a predetermined rule to enable the server end to recognize the image according to a first mode to obtain a water meter dial reading; or, when the boundaries of any image block data are unclear, send the original water meter image to the server end to enable the server end to recognize the image according to a second mode to obtain a water meter dial reading and a recognition accuracy rate;
[0030] a reading feedback module, configured to, when only a water meter dial reading sent by the server end is received, fill the water meter dial reading in a corresponding position; or, when a water meter dial reading and a recognition accuracy rate sent by the server end are received, determine whether to automatically fill the water meter dial reading or manually input the water meter dial reading according to the recognition accuracy rate.
[0031] In one specific embodiment, the image segmentation module comprises:
[0032] a contour processing unit, configured to process the original water meter image so that the image boundaries are water meter contour images;
[0033] a feature extraction unit, configured to extract features of the water meter contour images to obtain a preset set of original water meter image feature points, wherein each feature element in the set of original water meter image feature points is used to represent whether a corresponding position has a preset feature, the feature element comprises a position number code and a feature code, and the number of the preset set of original water meter image feature points is determined according to a water meter type;
[0034] an image segmentation unit, configured to compare each set of original water meter image feature points with a pre-stored feature mapping table, and if a set of original water meter image feature points is consistent with a set of data in the pre-stored feature mapping table, use a segmentation rule corresponding to the set of data in the feature mapping table as a dial image segmentation rule.
[0035] In one embodiment, the feature extraction unit comprises:
[0036] The pixel point selection subunit is configured to select a plurality of pixel points according to the corresponding positions of the feature point set of the water meter type in the water meter contour image.
[0037] The feature encoding subunit is configured to calculate the average value of the pixel gray scale of the plurality of pixel points, mark the feature encoding of the corresponding element of the position as 1 when the average value of the pixel gray scale of the plurality of pixel points is less than the average value of the gray scale of the water meter contour image, and mark the feature encoding of the corresponding element of the position as 0 when the average value of the pixel gray scale of the plurality of pixel points is greater than the average value of the gray scale of the water meter contour image.
[0038] The feature point set generation subunit is configured to combine each feature encoding and the position number encoding of the corresponding position to form the position feature element to obtain the original water meter image feature point set.
[0039] The feature extraction subunit is configured to sequentially select each water meter type to obtain a preset group of original water meter image feature point sets.
[0040] In one embodiment, the image recognition module is specifically configured to generate a first reading request data frame and send the first reading request data frame to the server end, wherein the first reading request data frame comprises a first mode recognition field, an image block sequence field, an image sequence number field of unclear boundary of valid information, an image reading interval of clear boundary of valid information, and image block data.
[0041] Correspondingly, the server end is specifically configured to perform first mode recognition on the corresponding image block data according to the image sequence number field of unclear boundary of valid information, and combine the image reading interval of clear boundary of valid information to obtain the water meter dial reading, wherein the first mode is local model image recognition.
[0042] Alternatively, the image recognition module is specifically configured to generate a second reading request data frame and send the second reading request data frame to the server end, wherein the second reading request data frame comprises a second mode recognition field, an identification accuracy field, and original water meter image data.
[0043] Correspondingly, the server end is specifically configured to obtain the water meter dial reading after performing second mode recognition on the original water meter image data, and obtain the identification accuracy of the second mode.
[0044] The present application has the following advantages:
[0045] The water meter dial reading recognition method of the present application responds to a trigger reading request instruction, collects an original water meter image, extracts a feature point set of the original water meter image, compares the feature point set of the original water meter image with a pre-stored feature mapping table to determine a dial image segmentation rule, and segments the original water meter image according to the corresponding dial image segmentation rule to obtain a plurality of image block data. When the boundary of each image block data is clear and the boundary of the valid information in each image block data is clear, the valid information in each image block data is directly recognized to obtain the water meter dial reading. Or, when the boundary of each image block data is clear and the boundary of the valid information in at least one image block data is not clear, the image block data with the unclear boundary of the valid information is sent to the server end according to a predetermined rule to enable the server end to perform image recognition according to a first mode to obtain the water meter dial reading. Or, when the boundary of any image block data is not clear, the original water meter image is sent to the server end to enable the server end to perform image recognition according to a second mode to obtain the water meter dial reading and the recognition accuracy. When only the water meter dial reading sent by the server end is received, the water meter dial reading is filled in the corresponding position. Or, when the water meter dial reading and the recognition accuracy sent by the server end are received, the water meter dial reading is automatically filled or the water meter dial reading is manually input according to the recognition accuracy. In this way, by judging different water meter image qualities, the water meter image recognition is performed on the local end or the server end according to the corresponding conditions, the local device resources and the remote device resources can be reasonably utilized, thereby saving resources, improving the recognition efficiency, and meeting the recognition scene with high real-time requirement.
[0046] The present application will be further described in detail below with reference to the accompanying drawings and embodiments. BRIEF DESCRIPTION OF DRAWINGS
[0047] Figure 1 is a water meter dial reading recognition method flowchart provided by an embodiment of the present application;
[0048] Figure 2 is a water meter dial reading recognition system module block diagram provided by an embodiment of the present application;
[0049] Figure 3 is an electronic device schematic diagram provided by an embodiment of the present application. DETAILED DESCRIPTION
[0050] The present application will be further described in detail below with reference to the accompanying drawings and embodiments.
[0051] Embodiment One
[0052] Please refer to Figure 1 , Figure 1It is a kind of water meter dial reading recognition method flow chart provided by the embodiment of the application, comprising:
[0053] S1, in response to the trigger reading request instruction, the original water meter image is collected;
[0054] In the embodiment, the trigger reading request instruction can be realized by clicking the corresponding entity of the key or touching the corresponding virtual icon in the identification interface, for example.When the key is pressed or the touch operation is identified, the image acquisition interface is jumped through the corresponding feedback, so that the original water meter image is collected.
[0055] S2, the original water meter image feature point set is extracted, the original water meter image feature point set is compared with the pre-stored feature mapping table to determine the dial image segmentation rule, and a plurality of image block data are obtained according to the corresponding dial image segmentation rule.
[0056] This step specifically includes:
[0057] S21, the original water meter image is processed so that the image boundary is a water meter contour image;It should be noted that due to the shooting angle and shooting distance of the photographer, the original water meter image is irregular, which increases the difficulty of subsequent identification, so preliminary processing is needed, that is, the background part of the original water meter image is removed, and only the water meter contour image is retained.In this step, image orientation correction, angle correction, size correction and other operations are usually needed to keep the water meter contour image in a normal state without inclination angle, so as to facilitate pixel and resolution standardization processing, that is, the water meter contour image processed has the same pixel density and resolution, so that the pixel positioning is consistent.
[0058] S22, the water meter contour image is processed to obtain a preset group of original water meter image feature point sets, wherein each feature element in the original water meter image feature point set is used to represent whether the corresponding position has a preset feature, the feature element includes position number coding and feature coding, and the number of the preset group of original water meter image feature point sets is determined according to the type of water meter;
[0059] Because the types of water meters are different, but the number of water meter types is determined, and the layout of each type of water meter is also determined and unique, therefore, in this step, the feature point extraction is carried out on the obtained water meter contour image according to the layout of each dial, so that the model and type of the dial can be judged, and the reading recognition is facilitated;In addition, the scheme of the embodiment is only for pointer dial or digital+pointer dial, and when the feature extraction is carried out, only the position of the pointer is taken as the extraction and judgment basis, the position number coding is the row and column coordinates of the feature point in the image, the feature coding is determined according to the average value of pixel gray scale, and the preset feature is the feature of the position with the pointer.
[0060] The step specifically further comprises:
[0061] S221, selecting a plurality of pixel points in the corresponding position of the feature point set corresponding to the water meter type in the water meter contour image;
[0062] S222, calculating the average value of the pixel gray scale of the plurality of pixel points, when the average value of the pixel gray scale of the plurality of pixel points is less than the average value of the gray scale of the water meter contour image, marking the feature code of the corresponding element of the position as 1, when the average value of the pixel gray scale of the plurality of pixel points is greater than the average value of the gray scale of the water meter contour image, marking the feature code of the corresponding element of the position as 0;
[0063] S223, combining each feature code and the position number code of the corresponding position to form the position feature element to obtain the original water meter image feature point set; for example, if 16 bits are used to represent the position number code and 2 bits are used to represent the feature code, a group of original water meter image feature point set is (001101100100011101), that is, the pixel feature code of the position of the 57th column and the 71st row in the image is 1, indicating that the position has the feature. It should be noted that, in order to reduce errors, in the embodiment, the corresponding position is the average value of a plurality of pixel points centered on the point, for example, the average value of 9 pixel points centered on the point (00110110, 01000111); the elements in the pre-stored feature mapping table include elements with the preset feature in the corresponding position and elements without the preset feature in the corresponding position. It should be noted that, since different meter dial feature points may be repeated, in order to ensure that a unique meter dial feature is obtained, elements with the preset feature in the corresponding position and elements without the preset feature in the corresponding position need to be selected.
[0064] S224, sequentially selecting each type of water meter to obtain a preset group of original water meter image feature point sets.
[0065] S23, comparing the preset group of original water meter image feature point sets with the pre-stored feature mapping table respectively, if a group of original water meter image feature point sets is consistent with a group of data in the pre-stored feature mapping table, using the segmentation rule corresponding to the group of data in the feature mapping table as the meter dial image segmentation rule. The pre-stored feature mapping table is a standard feature point set and a unique corresponding relationship of the corresponding water meter obtained in advance according to the layout of each meter dial.
[0066] S3, when judging that the boundary of each image block data is clear and the boundary of the valid information in each image block data is clear, directly identifying the valid information in each image block data to obtain the water meter dial reading; or, when judging that the boundary of each image block data is clear and the boundary of the valid information in at least one image block data is not clear, sending the image block data with the boundary of the valid information not clear to the server end according to a predetermined rule to enable the server end to perform image recognition according to a first mode to obtain the water meter dial reading; or, when judging that the boundary of any image block data is not clear, sending the original water meter image to the server end to enable the server end to perform image recognition according to a second mode to obtain the water meter dial reading and the identification accuracy;
[0067] In the embodiment, sending the image block data with the boundary of the valid information not clear to the server end according to a predetermined rule to enable the server end to perform image recognition according to a first mode to obtain the water meter dial reading includes:
[0068] generating a first reading request data frame and sending the first reading request data frame to the server end, the first reading request data frame including a first mode identification field, an image block sequence field, an image sequence number field of the valid information with the boundary not clear, an image reading interval of the valid information with the boundary clear, and image block data;
[0069] Correspondingly, the server end performs first mode identification on the corresponding image block data according to the image sequence number field of the valid information with the boundary not clear and obtains the water meter dial reading by combining the image reading interval of the valid information with the boundary clear, wherein the first mode is local model image recognition.
[0070] In the embodiment, sending the original water meter image to the server end to enable the server end to perform image recognition according to a second mode to obtain the water meter dial reading and the identification accuracy includes:
[0071] generating a second reading request data frame and sending the second reading request data frame to the server end, the second reading request data frame including a second mode identification field, an identification accuracy field, and original water meter image data;
[0072] Correspondingly, the server end obtains the water meter dial reading by performing second mode identification on the original water meter image data, and obtains the identification accuracy according to the second mode.
[0073] It should be noted that in the process, for the case that the data boundary of each image block is clear and the boundary of the valid information in each image block is clear, it is not necessary to identify through a large data algorithm such as a neural network, but can be easily judged through a traditional template matching method or shape recognition and texture recognition method, so the local end can quickly complete the identification with only a small amount of resources without sending to the server end. For the case that the data boundary of the image block is clear and the boundary of the valid information in at least one image block is not clear, in the case that the traditional identification method cannot effectively identify, since it is only a local identification difficulty, the server end does not need to identify as a whole, but only needs to identify the local individual image block, so it still only needs to occupy a small amount of server resources. Since it is a local identification, the data amount is small, the convergence speed of the model is also fast, and therefore the overall identification speed is also fast. For the case that the data boundary of the image block is not clear, since the image block boundary is not clear, the identification result cannot be obtained comprehensively and completely by only the local individual image block, and the identification needs to be combined with other image blocks as a whole, therefore, through a second way, i.e., global model image identification, the original water meter image is identified. However, since the image block boundary is not clear, when the neural network model is identified, the convergence speed can be relatively slow. In the case that the convergence speed is slow, in order to improve the identification efficiency, a stop condition needs to be set, so the identification accuracy can be reduced, and therefore when the water meter dial reading is sent, the identification accuracy needs to be provided at the same time, so that the on-site staff can further judge according to the on-site situation.
[0074] S4, in response to only receiving the water meter dial reading sent by the server end, filling the water meter dial reading in the corresponding position; or, in response to receiving the water meter dial reading and the identification accuracy sent by the server end, determining whether to automatically fill the water meter dial reading or manually input the water meter dial reading according to the identification accuracy.
[0075] In this way, by judging different water meter image qualities, the water meter image identification is selected on the local end or the server end according to the corresponding conditions, so that the local device resources and the remote device resources can be reasonably utilized, thereby saving resources, improving the identification efficiency, and meeting the identification scene with high real-time requirement.
[0076] Please refer to Figure 2 The application also provides a water meter dial reading identification system, comprising:
[0077] An image acquisition module is configured to acquire an original water meter image in response to a trigger reading request instruction.
[0078] an image segmentation module configured to extract a set of feature points of the original water meter image, compare the set of feature points of the original water meter image with a pre-stored feature mapping table to determine a meter dial image segmentation rule, and segment the original water meter image according to the corresponding meter dial image segmentation rule to obtain a plurality of image block data;
[0079] an image recognition module configured to, when the boundaries of each of the image block data are clear and the boundaries of the valid information in each of the image block data are clear, directly recognize the valid information in each of the image block data to obtain a water meter dial reading; or, when the boundaries of each of the image block data are clear and the boundaries of the valid information in at least one of the image block data are not clear, send the image block data in which the boundaries of the valid information are not clear to a server end according to a predetermined rule to enable the server end to recognize the image according to a first mode to obtain a water meter dial reading; or, when the boundaries of any of the image block data are not clear, send the original water meter image to the server end to enable the server end to recognize the image according to a second mode to obtain a water meter dial reading and a recognition accuracy rate;
[0080] a reading feedback module configured to, in response to only receiving the water meter dial reading sent by the server end, fill the water meter dial reading in a corresponding position; or, in response to receiving the water meter dial reading and the recognition accuracy rate sent by the server end, determine whether to automatically fill the water meter dial reading or manually input the water meter dial reading according to the recognition accuracy rate.
[0081] In one specific embodiment, the image segmentation module comprises:
[0082] a contour processing unit configured to process the original water meter image so that the image boundaries are water meter contour images;
[0083] a feature extraction unit configured to extract features of the water meter contour images to obtain a preset set of original water meter image feature points, wherein each feature element in the set of original water meter image feature points is used to represent whether a corresponding position has a preset feature, the feature element comprises a position number code and a feature code, and the number of the preset set of original water meter image feature points is determined according to a water meter type;
[0084] an image segmentation unit configured to compare the preset set of original water meter image feature points with a pre-stored feature mapping table respectively, and if there is a set of original water meter image feature points consistent with a set of data in the pre-stored feature mapping table, use a segmentation rule corresponding to the set of data in the feature mapping table as a meter dial image segmentation rule.
[0085] In one specific embodiment, the feature extraction unit comprises:
[0086] A pixel point selection subunit is used to select a number of pixel points at corresponding positions in the water meter contour image according to a feature point set corresponding to the water meter type;
[0087] a feature coding subunit, configured to calculate an average value of the pixel grayscales of the plurality of pixel points, and when the average value of the pixel grayscales of the plurality of pixel points is less than the average value of the grayscales of the water meter contour image, mark the feature code of the element corresponding to the corresponding position as 1; and when the average value of the pixel grayscales of the plurality of pixel points is greater than the average value of the grayscales of the water meter contour image, mark the feature code of the element corresponding to the corresponding position as 0;
[0088] The feature point set generating subunit is used to combine each feature code and the position number code of the corresponding position to form the feature element of the position to obtain the feature point set of the original water meter image;
[0089] The feature extraction subunit is used to sequentially select each water meter type to obtain a preset group of original water meter image feature point sets.
[0090] In a specific embodiment, the image recognition module is specifically configured to: generate a first reading request data frame and send the first reading request data frame to the server, wherein the first reading request data frame includes a first mode identification field, an image block sequence field, an image sequence number field with unclear boundaries of valid information, an image reading interval with clear boundaries of valid information, and image block data;
[0091] Accordingly, the server is specifically configured to perform a first method of identifying the corresponding image block data based on the image sequence number field of the valid information with unclear boundaries, and to obtain the water meter dial reading based on the image reading interval combination with clear boundaries of the valid information, wherein the first method is local model image recognition;
[0092] Alternatively, the image recognition module is specifically configured to: generate a second reading request data frame and send the second reading request data frame to the server, wherein the second reading request data frame includes a second mode identification field, an identification accuracy field, and original water meter image data;
[0093] Correspondingly, the server is specifically configured to obtain a water meter dial reading after performing a second recognition method on the original water meter image data, and obtain a recognition accuracy rate according to the second method.
[0094] The embodiment of the present invention further provides an electronic device, such as Figure 3 As shown, it includes a processor 31, a communication interface 32, a memory 33 and a communication bus 34, wherein the processor 31, the communication interface 32, and the memory 33 communicate with each other through the communication bus 34.
[0095] Memory 33, for storing computer programs;
[0096] The processor 31, when executing the program stored in the memory 33, implements the following steps:
[0097] S1, in response to a trigger reading request instruction, collecting an original water meter image;
[0098] S2, extracting a set of feature points of the original water meter image, comparing the set of feature points of the original water meter image with a pre-stored feature mapping table to determine a meter image segmentation rule, and segmenting the original water meter image according to the corresponding meter image segmentation rule to obtain a plurality of image block data;
[0099] S3, when the boundary of each image block data is clear and the boundary of the valid information in each image block data is clear, directly identifying the valid information in each image block data to obtain the water meter dial reading; or, when the boundary of each image block data is clear and the boundary of the valid information in at least one image block data is not clear, sending the image block data with the unclear boundary of the valid information to the server end according to a predetermined rule to enable the server end to obtain the water meter dial reading by image recognition according to a first mode; or, when the boundary of any image block data is not clear, sending the original water meter image to the server end to enable the server end to obtain the water meter dial reading and the recognition accuracy by image recognition according to a second mode;
[0100] S4, in response to only receiving the water meter dial reading sent by the server end, filling the water meter dial reading in the corresponding position; or, in response to receiving the water meter dial reading and the recognition accuracy sent by the server end, determining to automatically fill the water meter dial reading or manually input the water meter dial reading according to the recognition accuracy.
[0101] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For convenience of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0102] The communication interface is used for communication between the above electronic device and other devices.
[0103] The memory can include a random access memory (RAM) and can also include a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory can also be at least one storage device located away from the aforementioned processor.
[0104] The processor described above can be a general processor, including a central processing unit (CPU), a network processor (NP), etc. It can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component.
[0105] The method provided by the embodiments of the present application can be applied to an electronic device. Specifically, the electronic device can be a portable computer, a smart mobile terminal, etc. Herein, no limitation is made, and any electronic device that can implement the present application falls within the protection scope of the present application.
[0106] For the system / electronic device / memory medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the part of the description of the method embodiments.
[0107] In addition, the terms "first", "second" are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with "first", "second" can explicitly or implicitly include one or more of the features. In the description of the present application, the meaning of "a plurality of" is two or more, unless otherwise specifically limited.
[0108] In the description of the specification, the description of the terms "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In the specification, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any appropriate manner in one or more embodiments or examples. In addition, those skilled in the art can combine and integrate different embodiments or examples described in the specification.
[0109] Although the present application is described herein in conjunction with various embodiments, it is understood that other variations of the disclosed embodiments can be understood and effected by those skilled in the art in practicing the claimed application, from an inspection of the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other elements or steps, and the indefinite articles "a" or "an" do not exclude a plurality. A single processor or other unit can fulfill the functions of several items recited in the claims. The mere fact that certain measures are recited in mutually different dependent claims does not indicate that a combination of these measures cannot be used to an advantage.
[0110] Those skilled in the art will appreciate that embodiments of the present application can be devised for a method, a system (device), or a computer program product. Accordingly, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects all generally referred to herein as a "module" or "system". Furthermore, the present application can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, and the like) embodying computer readable program code. The computer program product can be for use in implementing the techniques described and can be distributed over the network coupled computer systems so that the computer program product is stored on a
[0111] The present application is described with reference to the flowcharts and / or block diagrams of the methods, systems (devices) and computer program products according to embodiments of the present application. It is understood that each flow and / or block in the flowcharts and / or block diagrams, and combinations of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processing system or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions of the flows and / or blocks in the flowcharts and / or block diagrams. Figure 1 one flow or multiple flows and / or blocksFigure 1 means for performing the function specified in the block or blocks.
[0112] These computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture including instructions which implement the flow Figure 1 flow or flows and / or blocks Figure 1 means for performing the function specified in the block or blocks.
[0113] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the flow Figure 1 flow or flows and / or blocks Figure 1 steps of means for performing the function specified in the block or blocks.
[0114] The above description is further to combine the specific preferred embodiments of the present application, and cannot be considered as the specific implementation of the present application only limited to these descriptions. For those skilled in the art to which the present application belongs, without departing from the concept of the present application, a number of simple deductions or replacements can also be made, which should be considered as falling within the scope of protection of the present application.
Claims
1. A method for identifying water meter dial readings, characterized in that: include: In response to a trigger reading request instruction, collecting an original water meter image; Extracting a feature point set of an original water meter image, comparing the feature point set of the original water meter image with a pre-stored feature mapping table to determine a dial image segmentation rule, and segmenting the original water meter image according to the corresponding dial image segmentation rule to obtain a plurality of image block data; When it is determined that the boundaries of each image block data are clear and the boundaries of valid information in each image block data are clear, the valid information in each image block data is directly recognized to obtain the water meter dial reading; when it is determined that the boundaries of each image block data are clear and the boundaries of valid information in at least one image block data are unclear, the image block data with unclear boundaries of valid information is sent to the server side according to a predetermined rule so that the server side performs image recognition according to a first method to obtain the water meter dial reading; when it is determined that the boundaries of any image block data are unclear, the original water meter image is sent to the server side so that the server side performs image recognition according to a second method to obtain the water meter dial reading and the recognition accuracy rate; In response to only receiving the water meter dial reading sent by the server, the water meter dial reading is filled in the corresponding position; in response to receiving the water meter dial reading and recognition accuracy sent by the server, it is determined according to the recognition accuracy whether to automatically fill in the water meter dial reading or manually enter the water meter dial reading.
2. The water meter dial reading recognition method according to claim 1, characterized in that: Extracting a feature point set of an original water meter image, and comparing the feature point set of the original water meter image with a pre-stored feature mapping table to determine a dial image segmentation rule, including: Processing the original water meter image so that the image boundary is a water meter contour image; Performing feature extraction on the water meter contour image to obtain a preset set of original water meter image feature point sets, wherein each feature element in the original water meter image feature point set is used to characterize whether a corresponding position has a preset feature, the feature element including a position number code and a feature code, and the number of the preset set of original water meter image feature point sets is determined according to the water meter type; The preset group of original water meter image feature point sets are compared with the pre-stored feature mapping table respectively. If there is a group of original water meter image feature point sets that is consistent with a group of data in the pre-stored feature mapping table, the segmentation rule corresponding to the group of data in the feature mapping table is used as the dial image segmentation rule.
3. The water meter dial reading recognition method according to claim 2, characterized in that: Feature extraction is performed on the water meter contour image to obtain a preset set of original water meter image feature points, including: Selecting a number of pixel points at corresponding positions in the water meter contour image according to a feature point set corresponding to the water meter type; Calculating an average value of the pixel grayscales of the plurality of pixel points; when the average value of the pixel grayscales of the plurality of pixel points is less than the average value of the grayscales of the water meter contour image, marking the feature code of the element corresponding to the corresponding position as 1; and when the average value of the pixel grayscales of the plurality of pixel points is greater than the average value of the grayscales of the water meter contour image, marking the feature code of the element corresponding to the corresponding position as 0; Combining each feature code with the position number code of the corresponding position to form the feature element of the position to obtain the feature point set of the original water meter image; Each water meter type is selected in turn to obtain a preset group of original water meter image feature point sets.
4. The water meter dial reading recognition method according to claim 2, characterized in that: The corresponding position is a range of several pixels centered at the point; the elements in the pre-stored feature mapping table include elements with preset features at the corresponding position and elements without preset features at the corresponding position.
5. The water meter dial reading recognition method according to claim 1, characterized in that: The image block data with unclear boundaries of the valid information is sent to the server side according to a predetermined rule so that the server side performs image recognition according to a first method to obtain a water meter dial reading, including: Generate a first reading request data frame and send the first reading request data frame to the server, wherein the first reading request data frame includes a first mode identification field, an image block sequence field, an image sequence number field with unclear valid information boundaries, an image reading interval with clear valid information boundaries, and image block data; Correspondingly, the server side identifies the corresponding image block data in a first manner based on the image serial number field with unclear boundaries of the valid information and obtains the water meter dial reading based on the image reading interval combination with clear boundaries of the valid information, wherein the first manner is local model image recognition.
6. The water meter dial reading recognition method according to claim 1, characterized in that: The original water meter image is sent to the server so that the server performs image recognition according to the second method to obtain the water meter dial reading and recognition accuracy, including: Generate a second reading request data frame and send the second reading request data frame to the server, wherein the second reading request data frame includes a second mode identification field, an identification accuracy field, and original water meter image data; Correspondingly, the server obtains the water meter dial reading after performing the second recognition based on the original water meter image data, and obtains the recognition accuracy rate according to the second method.
7. A water meter dial reading recognition system, characterized in that: include: An image acquisition module, configured to acquire an original water meter image in response to a trigger reading request instruction; An image segmentation module is configured to extract a set of feature points from an original water meter image, compare the set of feature points with a pre-stored feature mapping table to determine a dial image segmentation rule, and segment the original water meter image according to the corresponding dial image segmentation rule to obtain a plurality of image block data; The image recognition module is configured to, when determining that the boundaries of each image block data are clear and the boundaries of valid information in each image block data are clear, directly recognize the valid information in each image block data to obtain the water meter dial reading; when determining that the boundaries of each image block data are clear and the boundaries of valid information in at least one image block data are unclear, send the image block data with unclear boundaries of valid information to a server end according to a predetermined rule so that the server end performs image recognition according to a first method to obtain the water meter dial reading; and when determining that the boundaries of any image block data are unclear, send the original water meter image to the server end so that the server end performs image recognition according to a second method to obtain the water meter dial reading and the recognition accuracy rate; The reading feedback module is used to fill the corresponding position with the water meter dial reading in response to only receiving the water meter dial reading sent by the server; in response to receiving the water meter dial reading and recognition accuracy sent by the server, determine whether to automatically fill in the water meter dial reading or manually enter the water meter dial reading based on the recognition accuracy.
8. The water meter dial reading recognition system according to claim 7, characterized in that: The image segmentation module includes: A contour processing unit, configured to process the original water meter image so that the image boundary becomes a water meter contour image; a feature extraction unit, configured to extract features from the water meter contour image to obtain a preset set of original water meter image feature point sets, wherein each feature element in the original water meter image feature point set is used to characterize whether a corresponding position has a preset feature, the feature element including a position number code and a feature code, and the number of the preset set of original water meter image feature point sets is determined according to the water meter type; An image segmentation unit is used to compare the preset group of original water meter image feature point sets with the pre-stored feature mapping table respectively. If there is a group of original water meter image feature point sets that is consistent with a group of data in the pre-stored feature mapping table, the segmentation rule corresponding to the group of data in the feature mapping table is used as the dial image segmentation rule.
9. The water meter dial reading recognition system according to claim 8, characterized in that: Feature extraction unit, including: A pixel point selection subunit is used to select a number of pixel points at corresponding positions in the water meter contour image according to a feature point set corresponding to the water meter type; a feature coding subunit, configured to calculate an average value of the pixel grayscales of the plurality of pixel points, and when the average value of the pixel grayscales of the plurality of pixel points is less than the average value of the grayscales of the water meter contour image, mark the feature code of the element corresponding to the corresponding position as 1; and when the average value of the pixel grayscales of the plurality of pixel points is greater than the average value of the grayscales of the water meter contour image, mark the feature code of the element corresponding to the corresponding position as 0; The feature point set generating subunit is used to combine each feature code and the position number code of the corresponding position to form the feature element of the position to obtain the feature point set of the original water meter image; The feature extraction subunit is used to sequentially select each water meter type to obtain a preset group of original water meter image feature point sets.
10. The water meter dial reading recognition system according to claim 7, characterized in that: The image recognition module is specifically configured to generate a first reading request data frame and send the first reading request data frame to the server, wherein the first reading request data frame includes a first mode identification field, an image block sequence field, an image sequence number field with unclear boundaries of valid information, an image reading interval with clear boundaries of valid information, and image block data; Accordingly, the server is specifically configured to perform a first method of identifying the corresponding image block data based on the image sequence number field of the valid information with unclear boundaries, and to obtain the water meter dial reading based on the image reading interval combination with clear boundaries of the valid information, wherein the first method is local model image recognition; The image recognition module is specifically configured to: generate a second reading request data frame and send the second reading request data frame to the server, wherein the second reading request data frame includes a second mode identification field, an identification accuracy field, and original water meter image data; Correspondingly, the server is specifically configured to obtain a water meter dial reading after performing a second recognition method on the original water meter image data, and obtain a recognition accuracy rate according to the second method.
Citation Information
Patent Citations
Method and device for recognizing images
CN104239909A
Image recognition facilitation using remotely sourced content
US20060133642A1
Cited By
A visual recognition method and system for reading a water meter dial
CN120472439B