Water meter dial reading identification method and system
By extracting the feature point set and segmentation rules of the water meter image, and selecting it to be recognized on the local side or server side, the problems of low efficiency and insufficient real-time recognition of water meter dial readings in the prior art are solved, and an efficient and real-time recognition process is achieved.
Patent Information
- Application Number
- CN202411920260.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2044-12-25
AI Technical Summary
In the process of identifying the existing water meter dial reading, a large amount of computing resources and time is required, and the computing resources of cloud servers are limited, resulting in a decrease in recognition efficiency. Especially in real-time data acquisition scenarios, the real-time performance is low, which reduces work efficiency.
By collecting the original water meter image, extracting the feature point set and comparing it with the pre-stored feature map table, the dial image segmentation rules are determined, and the data is divided into several image blocks. According to the clarity of the image block data, choose to identify it on the local side or server side, and make reasonable use of local and remote resources.
Through local or server-side identification methods, we save resources, improve identification efficiency, and meet the recognition scenarios with high real-time requirements.
Smart Images

Figure CN119942506A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of water meter image processing, and in particular relates to a water meter dial reading recognition method and system. Background Art
[0002] With the development of artificial intelligence technology, applying big data algorithms to water meter dial reading recognition is the current 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 practical applications, since water meters are usually distributed in various locations and in large numbers, local recognition cannot be achieved, and all work involving big data algorithms is processed by cloud servers. Cloud processing requires uploading the image data of the water meter dial to the cloud server first, and then processing and recognizing it by the cloud server. 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 recognition tasks in time due to insufficient resources, resulting in a decrease in recognition efficiency.
[0003] However, in some scenarios where real-time data acquisition is required, for meter readers, this method of relying on cloud server resources has low real-time performance and reduces work efficiency. Summary of the invention
[0004] In order to solve the above problems existing in the prior art, the present invention provides a water meter dial reading recognition method and system. The technical problem to be solved by the present invention is achieved through the following technical solutions:
[0005] A method for identifying water meter dial readings, comprising:
[0006] In response to a trigger reading request instruction, collecting an original water meter image;
[0007] 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;
[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 unclear, the image block data with unclear boundary 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; or, when it is determined that the boundary of any image block data is 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;
[0009] In response to only receiving the water meter dial reading sent by the server, fill the water meter dial reading in the corresponding position; or, 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 input the water meter dial reading based on the recognition accuracy.
[0010] In a specific implementation, extracting feature points of an original water meter image and comparing the feature points of the original water meter image with a pre-stored feature mapping table to determine a dial image segmentation rule includes:
[0011] Processing the original water meter image so that the image boundary is a water meter contour image;
[0012] Extracting features from the water meter contour image 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 characterize whether the corresponding position has a preset feature, and the feature element includes a position number code and a feature code, and the number of the preset group of original water meter image feature point sets is determined according to the water meter type;
[0013] The preset group of original water meter image feature point sets are compared with the pre-stored feature mapping tables 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.
[0014] In a specific implementation, feature extraction is performed on the water meter contour image to obtain a preset group of original water meter image feature point sets, including:
[0015] 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;
[0016] Calculate the 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;
[0017] 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;
[0018] Each water meter type is selected in turn to obtain a preset group of original water meter image feature point sets.
[0019] In a specific implementation, the corresponding position is a range of several pixel points 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.
[0020] In a specific implementation, 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 the first method to obtain the water meter dial reading, including:
[0021] 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;
[0022] Correspondingly, the server side identifies the corresponding image block data in a first manner according to the image serial number field whose boundary of valid information is unclear, and obtains the water meter dial reading according to the image reading interval combination with clear boundary of valid information, wherein the first manner is local model image recognition.
[0023] In a specific implementation, the original water meter image is sent to a server so that the server performs image recognition according to a second method to obtain a water meter dial reading and a recognition accuracy rate, including:
[0024] 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;
[0025] Correspondingly, the server obtains the water meter dial reading after performing the second method recognition based on the original water meter image data, and obtains the recognition accuracy rate according to the second method.
[0026] The present invention also provides a water meter dial reading recognition system, comprising:
[0027] An image acquisition module, used for acquiring an original water meter image in response to a trigger reading request instruction;
[0028] An image segmentation module is used to extract a feature point set of an original water meter image, compare 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 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 is used to directly recognize the valid information in each image block data to obtain the water meter dial reading 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; 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 unclear, send the image block data with unclear boundary of valid information 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; or, when it is determined that the boundary of any image block data is unclear, send the original water meter image 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 recognition accuracy;
[0030] A reading feedback module is used to fill the corresponding position with the water meter dial reading in response to receiving only the water meter dial reading sent by the server; or, 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 input the water meter dial reading according to the recognition accuracy.
[0031] In a specific embodiment, the image segmentation module includes:
[0032] A contour processing unit, used for processing the original water meter image so that the image boundary is a water meter contour image;
[0033] A feature extraction unit, used for performing feature extraction on the water meter contour image 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 characterize whether the corresponding position has a preset feature, and the feature element includes a position number code and a feature code, and the number of the preset group of original water meter image feature point sets is determined according to the water meter type;
[0034] The 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 are 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.
[0035] In a specific embodiment, the feature extraction unit includes:
[0036] 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;
[0037] A feature coding subunit is used to calculate the 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, the feature coding of the corresponding element at the corresponding position is marked as 1; 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, the feature coding of the corresponding element at the corresponding position is marked as 0;
[0038] The feature point set generating subunit is used to combine 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;
[0039] The feature extraction subunit is used to select each water meter type in turn to obtain a preset group of original water meter image feature point sets.
[0040] In a specific embodiment, the image recognition module is specifically used 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;
[0041] Correspondingly, the server is specifically used to identify the corresponding image block data in a first manner according to the image sequence number field with unclear boundaries of the valid information and obtain the water meter dial reading according to the image reading interval combination with clear boundaries of the valid information, wherein the first manner is local model image recognition;
[0042] Alternatively, the image recognition module is specifically used 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;
[0043] Correspondingly, the server is specifically used to obtain the water meter dial reading after performing the second method recognition based on the original water meter image data, and obtain the recognition accuracy rate according to the second method.
[0044] Beneficial effects of the present invention:
[0045] The water meter dial reading recognition method of the present invention 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 number of image block data; 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, directly recognizes the valid information in each image block data 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 unclear, the valid information in the image block data is directly recognized to obtain the water meter dial reading. The image block data with unclear information boundaries is sent to the server side according to a predetermined rule so that the server side performs image recognition according to the first method to obtain the water meter dial reading; or, when it is determined that the boundary of any image block data is unclear, the original water meter image is sent to the server side so that the server side performs image recognition according to the second method to obtain the water meter dial reading and the recognition accuracy; in response to receiving only the water meter dial reading sent by the server side, 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 side, it is determined according to the recognition accuracy whether to automatically fill in the water meter dial reading or manually input the water meter dial reading. In this way, by judging the quality of different water meter images and selecting to perform water meter image recognition at the local end or the server end according to corresponding conditions, local device resources and remote device resources can be reasonably utilized, thereby saving resources, improving recognition efficiency, and meeting recognition scenarios with high real-time requirements.
[0046] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 It is a schematic diagram of a flow chart of a method for identifying a water meter dial reading provided by an embodiment of the present invention;
[0048] Figure 2 It is a module block diagram of a water meter dial reading recognition system provided by an embodiment of the present invention;
[0049] Figure 3 It is a schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0050] The present invention is further described in detail below with reference to specific embodiments, but the embodiments of the present invention are not limited thereto.
[0051] Embodiment 1
[0052] See also Figure 1 , Figure 1The present invention provides a method for identifying a water meter dial reading, which includes:
[0053] S1, in response to a trigger reading request instruction, collecting an original water meter image;
[0054] In this embodiment, triggering a reading request instruction can be achieved, for example, by clicking a corresponding entity of a button or touching a corresponding virtual icon in the identification interface. When it is recognized that the button is pressed or touched, the corresponding feedback jumps to the image acquisition interface to acquire the original water meter image.
[0055] S2, 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;
[0056] This step specifically includes:
[0057] S21, process the original water meter image so that the image boundary is a water meter contour image; it should be noted that, due to the different shooting angles and shooting distances of the photographers, the original water meter image is irregular, which will increase the difficulty of subsequent recognition, so preliminary processing is required to first remove the background part of the original water meter image and only retain the water meter contour image. In this step, it is usually necessary to perform operations such as image orientation correction, angle correction, and size correction to keep the water meter contour image in a positive state without tilt angles, so as to facilitate pixel and resolution standardization processing, that is, the processed water meter contour images all have the same pixel density and resolution, so that the pixel positioning is consistent.
[0058] S22, extracting features from the water meter contour image 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 characterize whether the corresponding position has a preset feature, and the feature element includes a position number code and a feature code, and the number of the preset group of original water meter image feature point sets is determined according to the water meter type;
[0059] Since there are different types of water meters, but the number of types of water meters is fixed, and the layout of each water meter is also fixed and unique, this step extracts feature points from the obtained water meter contour image according to the layout of each dial, so that the model and type of the dial can be determined, which is convenient for reading identification; in addition, the scheme of this embodiment is only for pointer dials, or digital + pointer dials, and when performing feature extraction, only the position of the pointer is used as the basis for extraction and judgment, and the position number is encoded as the row and column coordinates of the feature point in the image, and the feature code is determined according to the average grayscale value of the pixel, and the preset feature is the feature of the pointer at that position.
[0060] This step specifically includes:
[0061] S221, 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;
[0062] S222, calculating the 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;
[0063] S223, 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; for example, if 16 bits are used to represent the position number code and 2 bits are used to represent the feature code, then a set of feature points of the original water meter image is represented as (001101100100011101), that is, the feature code of the pixel at the 57th column and 71st row in the image is 1, indicating that the position has the feature. It should be noted that in order to reduce the error, the corresponding position in this embodiment is the range of several pixel points centered on the point, such as 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 preset features at the corresponding position and elements without preset features at the corresponding position. It should be noted that since different dial feature points may be repeated, in order to ensure that a unique dial feature is obtained, it is necessary to select elements with preset features at the corresponding position and elements without preset features at the corresponding position.
[0064] S224. Select each water meter type in turn 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 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, then using the segmentation rule corresponding to the group of data in the feature mapping table as the dial image segmentation rule. The pre-stored feature mapping table is the unique correspondence between the standard feature point set pre-obtained according to the layout of each dial and the corresponding water meter.
[0066] S3. 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, directly identify the valid information in each image block data 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 unclear, send the image block data with unclear boundary of valid information 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; or, when it is determined that the boundary of any image block data is unclear, send the original water meter image 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;
[0067] In this embodiment, 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 the first method to obtain the water meter dial reading, including:
[0068] 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;
[0069] Correspondingly, the server side identifies the corresponding image block data in a first manner according to the image serial number field whose boundary of valid information is unclear, and obtains the water meter dial reading according to the image reading interval combination with clear boundary of valid information, wherein the first manner is local model image recognition.
[0070] In this embodiment, 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:
[0071] 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;
[0072] Correspondingly, the server obtains the water meter dial reading after performing the second method recognition based on the original water meter image data, and obtains the recognition accuracy rate according to the second method.
[0073] It should be noted that in this process, for situations where the boundaries of each image block data are clear and the boundaries of the effective information in each image block data are clear, it is not necessary to use big data algorithms such as neural networks for identification. It can be easily judged only by traditional template matching methods or shape recognition and texture recognition methods. Therefore, only a small amount of resources is needed on the local side to quickly complete the identification without sending it to the server side. For situations where the boundaries of image block data are clear and the boundaries of the effective information in at least one image block data are unclear, when traditional identification methods cannot be used for effective identification, since only local identification is difficult, there is no need for overall server-side identification. Only local individual image blocks can be identified. Therefore, only a small amount of server resources are needed. Since it is local identification, the amount of data is small, the convergence speed of the model is also fast, and therefore the overall identification speed is also fast. In the case where the boundaries of image block data are unclear, it is impossible to obtain a comprehensive and complete recognition result only through individual local image blocks, and it is necessary to combine other image blocks for overall recognition. Therefore, the second method and global model image recognition are used to recognize the original water meter image. However, due to the unclear boundaries of the image blocks, the convergence speed may be slow when recognizing through the neural network model. In the case of slow convergence, in order to improve the recognition efficiency, it is necessary to set a stop condition, so the recognition accuracy may be reduced. Therefore, when sending the water meter dial reading, it is necessary to provide the recognition accuracy at the same time so that the on-site staff can make further judgments based on the on-site situation.
[0074] S4. In response to receiving only the water meter dial reading sent by the server, fill the water meter dial reading in the corresponding position; or, in response to receiving the water meter dial reading and the recognition accuracy rate sent by the server, determine whether to automatically fill in the water meter dial reading or manually input the water meter dial reading according to the recognition accuracy rate.
[0075] In this way, by judging the quality of different water meter images and choosing to perform water meter image recognition on the local or server side according to corresponding conditions, local device resources and remote device resources can be reasonably utilized, thereby saving resources, improving recognition efficiency, and meeting recognition scenarios with high real-time requirements.
[0076] See also Figure 2 The present invention also provides a water meter dial reading recognition system, comprising:
[0077] An image acquisition module, used for acquiring an original water meter image in response to a trigger reading request instruction;
[0078] An image segmentation module is used to extract a feature point set of an original water meter image, compare 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 segment the original water meter image according to the corresponding dial image segmentation rule to obtain a plurality of image block data;
[0079] An image recognition module is used to directly recognize the valid information in each image block data to obtain the water meter dial reading 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; 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 unclear, send the image block data with unclear boundary of valid information 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; or, when it is determined that the boundary of any image block data is unclear, send the original water meter image 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 recognition accuracy;
[0080] A reading feedback module is used to fill the corresponding position with the water meter dial reading in response to receiving only the water meter dial reading sent by the server; or, 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 input the water meter dial reading according to the recognition accuracy.
[0081] In a specific embodiment, the image segmentation module includes:
[0082] A contour processing unit, used for processing the original water meter image so that the image boundary is a water meter contour image;
[0083] A feature extraction unit, used for performing feature extraction on the water meter contour image 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 characterize whether the corresponding position has a preset feature, and the feature element includes a position number code and a feature code, and the number of the preset group of original water meter image feature point sets is determined according to the water meter type;
[0084] The 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 are 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.
[0085] In a specific embodiment, the feature extraction unit includes:
[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 is used to calculate the 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, the feature coding of the corresponding element at the corresponding position is marked as 1; 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, the feature coding of the corresponding element at the corresponding position is marked as 0;
[0088] The feature point set generating subunit is used to combine 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;
[0089] The feature extraction subunit is used to select each water meter type in turn to obtain a preset group of original water meter image feature point sets.
[0090] In a specific embodiment, the image recognition module is specifically used 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] Correspondingly, the server is specifically used to identify the corresponding image block data in a first manner according to the image sequence number field with unclear boundaries of the valid information and obtain the water meter dial reading according to the image reading interval combination with clear boundaries of the valid information, wherein the first manner is local model image recognition;
[0092] Alternatively, the image recognition module is specifically used 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 used to obtain the water meter dial reading after performing the second method recognition based on the original water meter image data, and obtain the 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] A memory 33, for storing computer programs;
[0096] The processor 31 is used to execute the program stored in the memory 33, and implements the following steps:
[0097] S1, in response to a trigger reading request instruction, collecting an original water meter image;
[0098] S2, 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;
[0099] S3. 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, directly identify the valid information in each image block data 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 unclear, send the image block data with unclear boundary of valid information 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; or, when it is determined that the boundary of any image block data is unclear, send the original water meter image 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;
[0100] S4. In response to receiving only the water meter dial reading sent by the server, fill the water meter dial reading in the corresponding position; or, in response to receiving the water meter dial reading and the recognition accuracy rate sent by the server, determine whether to automatically fill in the water meter dial reading or manually input the water meter dial reading according to the recognition accuracy rate.
[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 ease 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 may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0104] The above-mentioned processor can be a general-purpose 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 devices, discrete gate or transistor logic devices, discrete hardware components.
[0105] The method provided in the embodiment of the present invention can be applied to an electronic device. Specifically, the electronic device can be a portable computer, a smart mobile terminal, etc. This is not limited here, and any electronic device that can implement the present invention belongs to the protection scope of the present invention.
[0106] As for the system / electronic device / storage medium embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0107] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0108] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification.
[0109] Although the present application is described herein in conjunction with various embodiments, in the process of implementing the claimed application, those skilled in the art may understand and implement other variations of the disclosed embodiments by viewing the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "one" or "an" does not exclude multiple situations. A single processor or other unit may implement several functions listed in a claim. Certain measures are recorded in different dependent claims, but this does not mean that these measures cannot be combined to produce good results.
[0110] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems (equipment), or computer program products. Therefore, the present application may adopt the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware, which are collectively referred to as "modules" or "systems" herein. Moreover, the present application may adopt the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program codes. The computer program is stored / distributed in a suitable medium, provided together with other hardware or as a part of hardware, or may adopt other distribution forms, such as by Internet or other wired or wireless telecommunication systems.
[0111] The present application is described with reference to the flowcharts and / or block diagrams of the methods, systems (devices) and computer program products of the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0112] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0113] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0114] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.
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 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 identified to obtain the water meter dial reading; Alternatively, 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 unclear, the image block data with unclear boundary of valid information is sent to the server side according to a predetermined rule so that the server side performs image recognition according to the first method to obtain the water meter dial reading; or, when it is determined that the boundary of any image block data is unclear, the original water meter image is sent to the server side so that the server side performs image recognition according to the second method to obtain the water meter dial reading and the recognition accuracy; In response to only receiving the water meter dial reading sent by the server, fill the water meter dial reading in the corresponding position; or, 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 input the water meter dial reading based on the recognition accuracy.
2. The water meter dial reading recognition method according to claim 1, characterized in that: Extracting feature points of the original water meter image, and comparing the feature points 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; Extracting features from the water meter contour image 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 characterize whether the corresponding position has a preset feature, and the feature element includes a position number code and a feature code, and the number of the preset group 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 tables 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: The water meter contour image is subjected to feature extraction to obtain a preset group of original water meter image feature point sets, 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; Calculate the 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; 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 pixel points 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 boundaries of valid information, an image reading interval with clear boundaries of valid information, and image block data; Correspondingly, the server side identifies the corresponding image block data in a first manner according to the image serial number field whose boundary of valid information is unclear, and obtains the water meter dial reading according to the image reading interval combination with clear boundary of 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 method 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, used for acquiring an original water meter image in response to a trigger reading request instruction; An image segmentation module is used to extract a feature point set of an original water meter image, compare 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 segment the original water meter image according to the corresponding dial image segmentation rule to obtain a plurality of image block data; An image recognition module, used for directly recognizing the valid information in each image block data to obtain the water meter dial reading 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; Alternatively, 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 unclear, the image block data with unclear boundary of valid information is sent to the server side according to a predetermined rule so that the server side performs image recognition according to the first method to obtain the water meter dial reading; or, when it is determined that the boundary of any image block data is unclear, the original water meter image is sent to the server side so that the server side performs image recognition according to the second method to obtain the water meter dial reading and the recognition accuracy; A reading feedback module is used to fill the corresponding position with the water meter dial reading in response to receiving only the water meter dial reading sent by the server; or, 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 input the water meter dial reading according to the recognition accuracy.
8. The water meter dial reading recognition system according to claim 7, characterized in that: The image segmentation module comprises: A contour processing unit, used for processing the original water meter image so that the image boundary is a water meter contour image; A feature extraction unit, used for performing feature extraction on the water meter contour image 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 characterize whether the corresponding position has a preset feature, and the feature element includes a position number code and a feature code, and the number of the preset group of original water meter image feature point sets is determined according to the water meter type; The 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 are 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 is used to calculate the 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, the feature coding of the corresponding element at the corresponding position is marked as 1; 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, the feature coding of the corresponding element at the corresponding position is marked as 0; The feature point set generating subunit is used to combine 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; The feature extraction subunit is used to select each water meter type in turn 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 used 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; Correspondingly, the server is specifically used to identify the corresponding image block data in a first manner according to the image sequence number field with unclear boundaries of the valid information and obtain the water meter dial reading according to the image reading interval combination with clear boundaries of the valid information, wherein the first manner is local model image recognition; Alternatively, the image recognition module is specifically used 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 used to obtain the water meter dial reading after performing the second method recognition based on the original water meter image data, and obtain the recognition accuracy rate according to the second method.
Citation Information
Patent Citations
Method and device for recognizing images
CN104239909A
Remote meter reading method and system based on image recognition technology and NB-IoT technology
CN109360396A
Dial plate identification method and device, electronic equipment and storage medium
CN116229474A
Image recognition facilitation using remotely sourced content
US20060133642A1
Cited By
Visual identification method and system for water meter dial reading
CN120472439A