Water meter quality defect detection method and device based on machine vision

Through machine vision technology, water meter images are collected and optimized, combined with manual marking and similarity comparison, the problem of artificial defect detection of appearance quality after water meter assembly is solved, and high-precision and efficient automated detection is achieved.

CN120489301AActive Publication Date: 2025-08-15QUANZHOU WATER AFFAIRS WATER METER INSPECTION CO LTD

Patent Information

Application Number
CN202510946898.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-10
Publication Date
2025-08-15
Estimated Expiration
2045-07-10

AI Technical Summary

Technical Problem

In the prior art, the detection of appearance quality defects after water meter assembly relies on manual inspection, resulting in low detection accuracy and great influence of human factors, making it difficult to achieve full process automation.

Method used

Using a water meter quality defect detection device based on machine vision, water meter image data is collected, cropped and optimized through multi-source high-definition industrial cameras, and combined with manual marking and similarity comparison, automated detection is achieved.

Benefits of technology

It improves the accuracy and robustness of water meter quality inspection, reduces manual inspection costs, and realizes intelligent and efficient automatic inspection of water meter assembly process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120489301A_ABST
    Figure CN120489301A_ABST
Patent Text Reader

Abstract

The invention discloses a water meter quality defect detection method and device based on machine vision, and relates to the field of product detection.The water meter quality defect detection device comprises a multi-source collection module used for collecting water meter image data in the assembling process and storing the water meter image data; the marking module is used for manually marking the water meter image data as qualified or unqualified; the extraction and inspection module is used for receiving the water meter image data newly acquired by the multi-source acquisition module and the water meter image data marked as qualified in the marking module in real time, performing foreground extraction on the water meter image data, and comparing the newly acquired water meter image data with the water meter image data marked as qualified; checking whether the newly collected water meter image data source water meter is qualified or not; according to the method, the water meter image data are collected, the water meter image is cut and optimized, the qualified water meter image is selected in cooperation with manual detection, the qualified water meter image is compared with the subsequently collected water meter image data, and the quality of the water meter produced in the water meter assembly production process is inspected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of product detection, and in particular to a method and device for detecting quality defects of water meters based on machine vision. Background Art

[0002] A water meter is an instrument that measures water flow and is typically installed on water pipes. Based on the measurement principle, it can be divided into mechanical water meters and smart water meters. Commonly used in homes and industries, these meters accurately record water consumption and are crucial tools for water resource management and billing.

[0003] The invention patent application with application number 202110762779.0 discloses a method for quality grading of component defect detection, including: the production line system in the system obtains image information of the component in the pre-layer stage, post-layer stage and final inspection stage; wherein, each of the image information contains the serial number corresponding to the component; based on the quality inspection platform in the system, the algorithm model in the system matches the corresponding image information according to the serial number of the component, and analyzes the quality defects and / or appearance abnormalities; according to the analysis results of the algorithm model in the system, combined with the quality judgment and rating rules of the component, the quality inspection platform in the system makes a quality judgment on the component: if the quality judgment result in the final inspection stage is that there is a defect, combined with the adjustment result of the re-inspection and adjustment platform in the system, the quality inspection platform in the system determines the quality grade of the component; the quality grading includes at least four levels, one of which is scrapped; wherein, the serial number of the component is associated with the quality judgment and rating rules of the component: the The image information includes two types of images for analysis of quality defects and / or appearance anomalies. The images for quality defect analysis are taken by an EL electroluminescent camera, and the images for appearance anomaly analysis are taken by an optical camera. If the quality judgment result in the final inspection stage is that there are defects, this application aims to solve the problem that "at present, almost all photovoltaic module manufacturers have put into operation machine vision inspection systems. The systems are generally integrated by hardware manufacturers. The detection accuracy of quality defects is acceptable, but the detection accuracy of appearance anomalies is low. In addition, due to a certain false alarm rate and missed alarm rate in the AI detection process, it is necessary to regularly upgrade the AI detection algorithm model for the current production line or factory system. However, it is difficult to automatically collect and classify defective samples after manual re-inspection, which increases the initial workload and difficulty of the algorithm upgrade. In addition, the current quality grading work is almost completed by quality inspectors. Human subjective factors will lead to differences in quality grading. Incorrect ratings will also cause pricing losses to manufacturers or downstream customers."

[0004] However, for the fully automated production of water meters, existing technologies are already capable of automatically assembling water meter components. However, after assembly, the detection of water meter appearance quality defects still relies heavily on manual inspection. Therefore, a water meter quality defect detection method and device based on machine vision are proposed. Summary of the Invention

[0005] In view of the above-mentioned shortcomings of the prior art, the present invention provides a water meter quality defect detection method and device based on machine vision, which can effectively solve the problems of the prior art.

[0006] To achieve the above objectives, the present invention is implemented through the following technical solutions: The present invention discloses a water meter quality defect detection device based on machine vision, comprising: The multi-source acquisition module is used to acquire water meter image data during the assembly process and store the water meter image data; the marking module is used to manually mark the water meter image data as qualified or unqualified; the extraction and inspection module is used to receive the latest water meter image data collected by the multi-source acquisition module and the water meter image data marked as qualified in the marking module in real time, perform foreground extraction on the water meter image data, and compare the latest collected water meter image data with the water meter image data marked as qualified to verify whether the water meter from which the latest collected water meter image data comes is qualified; the sorting module is used to receive the inspection result of whether the water meter from which the water meter image data comes is qualified in the extraction and inspection module, and sort the qualified and unqualified water meters based on the inspection result; the jump module is used to end the operation of all modules except the message module in the system, and jump to the multi-source acquisition module operation stage to reset the operation; the message module is used to obtain the operation data of the marking module and the extraction and inspection module, and generate a water meter production message based on the operation data of the extraction and inspection module.

[0007] Furthermore, the multi-source acquisition module is integrated by a plurality of high-definition industrial cameras, and the plurality of high-definition industrial cameras are continuously distributed on the water meter automatic assembly production line; When each of the high-definition industrial cameras collects water meter image data, it faces the image data collection surface of the water meter surface, and after each completion of water meter image data collection, it synchronously crops the water meter image data so that the edges of the water meter image data intersect with at least one edge pixel of the water meter image in the water meter image data, and then performs a storage operation; The water meter image data captured successively by two adjacent high-definition industrial cameras point to the same water meter, and in the two water meter image data captured successively, the water meter components contained in the later captured water meter image data are at least one more or one more group of water meter assembly elements or components than the water meter components contained in the earlier captured water meter image data.

[0008] Furthermore, when the multi-source acquisition module stores the water meter image data, it performs differentiated storage based on the source of the water meter image data, the high-definition industrial camera, and the water meter image data stored in each differentiated storage area are sorted and stored based on the acquisition time sequence; When the multi-source acquisition module stores the water meter image data, it simultaneously optimizes the water meter image data on which the storage operation is performed, and then performs the storage operation; The optimization logic of the water meter image data is expressed as follows: ; Where: The water meter image data is output after optimization; To fuse multi-scale enhanced images; is the average brightness of the target; is the average brightness of the water meter image data; in, In the calculation, as the calculation target.

[0009] Furthermore, the fused multi-scale enhanced image The logic for obtaining is expressed as: The original water meter image data is recorded as ,right Divide the image into several sub-blocks, perform contrast-limited adaptive histogram equalization on each sub-block, and then merge all sub-blocks to obtain the image after preliminary grayscale adjustment. ; Median filter: , is the median filter window size; Gaussian filtering: , is the standard deviation of the Gaussian distribution; Construct a Gaussian pyramid: , is the number of Gaussian pyramid layers; For the Layer Gaussian filter standard deviation; Feature Enhancement: , For the Layer enhancement factor; For the The horizontal gradient value of the layer image; For the The vertical gradient value of the layer image; .

[0010] Furthermore, during the operation stage of the marking module, the terminal staff on the water meter assembly line manually inspects the assembled water meters. When the water meter is detected to be qualified, the corresponding water meter image data stored in the multi-source acquisition module is marked by the marking module, and the marked content is qualified. Otherwise, the marked content is unqualified. When the marked content is unqualified, the corresponding water meter image data stored in the multi-source acquisition module is deleted and refreshed to execute the acquisition of the corresponding image data of the next assembled water meter. Until the marking module marks the qualified water meter image data, the extraction and inspection module is triggered to run.

[0011] Furthermore, a demarcation unit is provided inside the extraction and inspection module, and the demarcation unit is used to demarcate the water meter assembly qualified judgment interval; The extraction and inspection module extracts the foreground image from the water meter image data, i.e. the water meter image in the water meter image data, by using a threshold segmentation method; The extraction and inspection module compares the latest collected water meter image data with the water meter image data marked as qualified, that is, compares the similarity between the latest collected water meter image data and the water meter image data marked as qualified, and the similarity comparison operation is performed based on the high-definition industrial camera corresponding to the water meter image data source of each foreground image, and then: .

[0012] Furthermore, the similarity comparison operation logic of the newly collected water meter image data and the water meter image data marked as qualified is as follows: The foreground image corresponding to the latest collected water meter image data and the foreground image corresponding to the qualified water meter image data are converted into grayscale images respectively, and the contour images of the two are extracted from the grayscale images. The grayscale image similarity and contour image similarity of the two are calculated respectively. The weight 0.4 is configured for the grayscale image similarity and the weight 0.6 is configured for the contour image similarity. The product of the grayscale image similarity and the corresponding configuration weight and the product of the contour image similarity and the corresponding configuration weight are added together to record the similarity between the latest collected water meter image data and the qualified water meter image data. ; The overall similarity between the latest collected water meter image data and the water meter image data marked as qualified is: ; Where: The number of water meter image data sets that are recently collected and marked as qualified for similarity comparison; is the similarity between the foreground image corresponding to the most recently collected water meter image data of group s and the foreground image corresponding to the water meter image data marked as qualified; is the value proportion weight; Among them, the value proportion weights are all non-zero positive numbers, and , and obey The larger the right subscript value, The larger the value, When the value is less than or equal to the defined water meter assembly qualification judgment interval, the jump module is triggered to run.

[0013] Furthermore, the water meter production message generated by the message module includes: The number of times the multi-source acquisition module is run is refreshed based on the result of the marking module operation, that is, the number of water meter image data with consecutive marking results as unqualified corresponds to the number of unqualified water meters; When an unqualified water meter is detected based on the extraction and inspection module, the number of water meters that had previously been inspected as qualified.

[0014] Furthermore, the multi-source acquisition module is interactively connected with the marking module and the extraction and inspection module through a wireless network, the extraction and inspection module is internally interactively connected with the demarcation unit through a wireless network, the multi-source acquisition module and the extraction and inspection module are interactively connected with the sorting module through a wireless network, the sorting module is interactively connected with the jump module and the message module through a wireless network, and the jump module is interactively connected with the multi-source acquisition module through a wireless network.

[0015] On the other hand, a method for detecting water meter quality defects based on machine vision includes the following steps: Collect water meter image data during the assembly process, collect, optimize and store the water meter image data; manually check whether the water meter is qualified on the user side. If the inspection result is qualified, retain the stored water meter image data corresponding to the qualified water meter; otherwise, discard it and execute the collection of the image data corresponding to the next water meter again until the retention operation of the water meter image data is executed; collect the water meter image data of the next assembly, obtain the retained water meter image data, perform foreground extraction on the two groups of water meter image data, and comprehensively check the comprehensive similarity of the foreground images corresponding to the two groups of water meter image data; define the water meter assembly qualified judgment interval, obtain the comprehensive similarity test result, compare the comprehensive similarity test result with the water meter assembly qualified judgment interval, determine whether the water meter is qualified, and sort the qualified and unqualified water meters according to the judgment result; if the judgment result is yes, continue to execute the collection and inspection of the continuous assembly water meter image data, if the judgment result is no, end and jump to the water meter image data collection and manual inspection stage; generate a water meter production message.

[0016] Compared with the prior art, the technical solution provided by the present invention has the following beneficial effects: The present invention provides a method and device for detecting water meter quality defects based on machine vision. During operation, the method and device collect water meter image data, crop and optimize the water meter image, select qualified water meter images in conjunction with manual inspection, and compare them with subsequently collected water meter image data to inspect the quality of water meters produced during the water meter assembly process. The inspection process refers to the water meter image data at different stages of the water meter assembly process, and the inspection accuracy is high. In conjunction with manual inspection, the manual inspection cost will be greatly reduced. In addition, this solution, in exchange for a minimal labor cost, achieves water meter quality inspection benefits with higher intelligence and better robustness. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] To more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. Those skilled in the art can also derive other drawings based on these drawings without inventive effort.

[0018] Figure 1 This is a schematic diagram of the structure of a water meter quality defect detection device based on machine vision; Figure 2 The figure is a flow chart of a water meter quality defect detection method based on machine vision. DETAILED DESCRIPTION

[0019] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0020] The present invention will be further described below with reference to the embodiments. Example 1

[0021] This embodiment is a water meter quality defect detection device based on machine vision, such as Figure 1 Shown, including: Multi-source acquisition module, used to collect water meter image data during the assembly process and store the water meter image data; The multi-source acquisition module is integrated by several high-definition industrial cameras, which are continuously distributed on the water meter automated assembly production line; When each high-definition industrial camera collects water meter image data, it faces the image data collection surface of the water meter surface. After each completion of water meter image data collection, the water meter image data is cropped synchronously so that the edges of the water meter image data intersect with at least one edge pixel of the water meter image in the water meter image data, and then the storage operation is performed; Water meter image data captured successively by two adjacent high-definition industrial cameras point to the same water meter, and in the two successively captured water meter image data, the water meter component contained in the later captured water meter image data is at least one more water meter assembly element or component than the water meter component contained in the earlier captured water meter image data; When the multi-source acquisition module stores water meter image data, it differentiates and stores the water meter image data based on the source high-definition industrial camera, and the water meter image data stored in each differentiated storage area are sorted and stored based on the acquisition time sequence; When the multi-source acquisition module stores the water meter image data, it simultaneously optimizes the water meter image data for which the storage operation is performed, and then performs the storage operation; The optimization logic of water meter image data is expressed as: ; Where: The water meter image data is output after optimization; To fuse multi-scale enhanced images; is the average brightness of the target; is the average brightness of the water meter image data; in, In the calculation, As a calculation target; Fusion of multi-scale enhanced images The logic for obtaining is expressed as: The original water meter image data is recorded as ,right Divide the image into several sub-blocks, perform contrast-limited adaptive histogram equalization on each sub-block, and then merge all sub-blocks to obtain the image after preliminary grayscale adjustment. ; Median filter: , is the median filter window size; Gaussian filtering: , is the standard deviation of the Gaussian distribution; Construct a Gaussian pyramid: , is the number of Gaussian pyramid layers; For the Layer Gaussian filter standard deviation; Feature Enhancement: , For the Layer enhancement factor; For the The horizontal gradient value of the layer image; For the The vertical gradient value of the layer image; ; A marking module is used to manually mark water meter image data as qualified or unqualified; By optimizing the water meter image data through the above logic formula, the system operation application data in this embodiment is made more accurate, thereby improving the accuracy of the system's final operation output results; During the marking module operation phase, the terminal staff on the water meter assembly line manually inspects the assembled water meters. When the water meter is detected to be qualified, the marking module marks the corresponding water meter image data stored in the multi-source acquisition module. The marking content is qualified. Otherwise, the marking content is unqualified. When the marking content is unqualified, the corresponding water meter image data stored in the multi-source acquisition module is deleted and refreshed to execute the acquisition of the corresponding image data of the next assembled water meter. When the marking module marks the qualified water meter image data, the extraction and inspection module is triggered to run. It should be stated that: In the entire water meter quality defect detection process, the marking module is mainly responsible for the terminal staff on the water meter assembly line to manually inspect the assembled water meters and mark the corresponding image data. The staff determines whether the water meter is qualified through manual inspection. If qualified, the marking module is used to mark the corresponding image data of the water meter stored in the multi-source acquisition module as "qualified". This mark will trigger the extraction and inspection module to run; if unqualified, it is marked as "unqualified". At this time, the multi-source acquisition module will delete the corresponding image data and refresh the operation, and continue to collect image data for the next assembled water meter until qualified image data is marked. Its operation data will also be obtained by the message module to provide a basis for generating water meter production messages. It is a key link connecting manual inspection and subsequent automated inspection processes. It relies on manual judgment to ensure the accuracy of the initial qualified samples, and ensures the validity of system data through timely processing of unqualified data. The extraction and verification module is used to receive in real time the latest water meter image data collected by the multi-source acquisition module and the water meter image data marked as qualified in the marking module, perform foreground extraction on the water meter image data, and compare the latest collected water meter image data with the water meter image data marked as qualified to verify whether the water meter from which the latest collected water meter image data comes is qualified; The extraction and inspection module is internally provided with a demarcation unit, which is used to demarcate the qualified judgment interval of the water meter assembly; The extraction and inspection module extracts the foreground image, i.e. the water meter image, from the water meter image data by using a threshold segmentation method; The extraction and inspection module compares the latest collected water meter image data with the water meter image data marked as qualified, that is, the similarity comparison operation between the latest collected water meter image data and the water meter image data marked as qualified is performed based on the similarity comparison operation performed on the high-definition industrial camera corresponding to the water meter image data source of each foreground image. The results are: ; The logic for comparing the similarity between the latest collected water meter image data and the qualified water meter image data is as follows: The foreground image corresponding to the latest collected water meter image data and the foreground image corresponding to the qualified water meter image data are converted into grayscale images respectively, and the contour images of the two are extracted from the grayscale images. The grayscale image similarity and contour image similarity of the two are calculated respectively. The weight 0.4 is configured for the grayscale image similarity and the weight 0.6 is configured for the contour image similarity. The product of the grayscale image similarity and the corresponding configuration weight and the product of the contour image similarity and the corresponding configuration weight are added together to record the similarity between the latest collected water meter image data and the qualified water meter image data. ; The overall similarity between the latest collected water meter image data and the water meter image data marked as qualified is: ; Where: The number of water meter image data sets that are recently collected and marked as qualified for similarity comparison; is the similarity between the foreground image corresponding to the most recently collected water meter image data of group s and the foreground image corresponding to the water meter image data marked as qualified; is the value proportion weight; Among them, the value proportion weights are all non-zero positive numbers, and , and obey The larger the right subscript value, The larger the value, When the value is less than or equal to the defined water meter assembly qualification judgment interval, the jump module is triggered to run; Through the above logic and formula, the similarity between the latest collected water meter image data and the water meter image data marked as qualified is quantified and output, so as to determine the quality of the water meter from which the water meter image data originated based on the quantified output result; A sorting module is used to receive the test results of whether the water meters from the water meter image data extraction and inspection module are qualified, and sort the qualified and unqualified water meters based on the test results; The jump module is used to end the operation of all modules except the message module in the system and jump to the multi-source acquisition module operation phase to reset the operation; A message module is used to obtain the operation data of the marking module and the extraction and verification module, and generate a water meter production message based on the operation data of the extraction and verification module; The water meter production message generated by the message module includes: The number of times the multi-source acquisition module is run is refreshed based on the result of the marking module operation, that is, the number of water meter image data with consecutive marking results as unqualified corresponds to the number of unqualified water meters; When an unqualified water meter is detected based on the extraction and inspection module, the number of water meters that had previously passed the inspection; The multi-source acquisition module is interactively connected with the marking module and the extraction and inspection module through a wireless network. The extraction and inspection module is interactively connected with the demarcation unit through a wireless network. The multi-source acquisition module and the extraction and inspection module are interactively connected with the sorting module through a wireless network. The sorting module is interactively connected with the jump module and the message module through a wireless network. The jump module is interactively connected with the multi-source acquisition module through a wireless network.

[0022] In this embodiment, the multi-source acquisition module operates to collect water meter image data during the assembly process and stores the water meter image data. The marking module is post-operated to manually mark the water meter image data as qualified or unqualified. The extraction and inspection module further receives the latest water meter image data collected by the multi-source acquisition module and the water meter image data marked as qualified in the marking module in real time, performs foreground extraction on the water meter image data, and compares the latest collected water meter image data with the water meter image data marked as qualified to verify whether the water meter from which the latest collected water meter image data comes is qualified. The demarcation unit synchronously demarcates the water meter assembly qualified judgment interval, and then the sorting module receives the inspection result of whether the water meter from which the water meter image data comes in the extraction and inspection module is qualified, sorts the qualified and unqualified water meters based on the inspection result, and ends the operation of all modules except the message module in the system through the jump module, and jumps to the multi-source acquisition module operation stage to reset the operation. Finally, the message module obtains the operation data of the marking module and the extraction and inspection module, and generates a water meter production message based on the operation data of the extraction and inspection module.

[0023] Through the system in the above embodiment, through the multi-source image acquisition mechanism, it is possible to continuously and dynamically capture components at different assembly stages during the automated assembly of water meters. Combined with image cropping and source storage technology, this achieves refined data retention of the entire water meter assembly process, providing a three-dimensional data source for quality traceability. The innovative image optimization algorithm significantly improves image clarity and feature recognition through a combination of technologies such as multi-scale enhancement, median filtering, Gaussian pyramid construction, and gradient feature enhancement. It is expected to increase defect recognition accuracy by more than 30% compared to traditional visual inspection. Based on a similarity comparison model in both grayscale and contour dimensions, this system effectively simulates manual inspection logic through differentiated weight configuration, accurately capturing structural deviations and identifying surface defects. Testing has shown an inspection efficiency of over 200 pieces per minute, an eight-fold improvement over manual inspection. In addition, the dynamic data-driven sorting mechanism can respond to test results in real time. Combined with the automatic deletion of unqualified data and the process reset function, it achieves zero missed detection of defective products. At the same time, through the production message generation technology, it provides quantitative data support for process optimization, helping to increase the production line yield to more than 99.5%. Example 2

[0024] In terms of specific implementation, based on Example 1, this example refers to Figure 2 The water meter quality defect detection device based on machine vision in Example 1 is further described in detail: A method for detecting water meter quality defects based on machine vision comprises the following steps: Step 1: Collect water meter image data during the assembly process, collect, optimize and store the water meter image data; Step 2: The user manually checks whether the water meter is qualified. If the test result is qualified, the stored water meter image data corresponding to the qualified water meter is retained. Otherwise, it is discarded and the image data corresponding to the next water meter is collected again until the water meter image data is retained. Step 3: Collect the water meter image data of the next assembly, obtain the retained water meter image data, perform foreground extraction on the two sets of water meter image data, and comprehensively test the comprehensive similarity of the foreground images corresponding to the two sets of water meter image data; Step 4: Define the water meter assembly qualification judgment interval, obtain the comprehensive similarity test results, compare the comprehensive similarity test results with the water meter assembly qualification judgment interval, determine whether the water meter is qualified, and sort the qualified and unqualified water meters according to the judgment results; Step 5: If the result is yes, continue to perform the collection and inspection of the continuous assembly water meter image data; if the result is no, end and jump to the water meter image data collection and manual inspection stage; Step 6: Generate water meter production message.

[0025] In summary, during the operation of the method and device in the above embodiments, water meter image data is collected, the water meter image is cropped and optimized, and qualified water meter images are selected in conjunction with manual inspection, and compared with the water meter image data collected subsequently, so as to inspect the quality of water meters produced during the water meter assembly production process. The inspection process refers to the water meter image data at different stages of the water meter assembly process, and the inspection accuracy is high. In conjunction with manual inspection, the cost of manual inspection will be greatly reduced. In addition, this solution, in exchange for a negligible labor cost, achieves the benefits of water meter quality inspection with higher intelligence and better robustness.

[0026] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements will not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A water meter quality defect detection device based on machine vision, characterized in that: include: Multi-source acquisition module, used to collect water meter image data during the assembly process and store the water meter image data; A marking module is used to manually mark water meter image data as qualified or unqualified; The extraction and verification module is used to receive in real time the latest water meter image data collected by the multi-source acquisition module and the water meter image data marked as qualified in the marking module, perform foreground extraction on the water meter image data, and compare the latest collected water meter image data with the water meter image data marked as qualified to verify whether the water meter from which the latest collected water meter image data comes is qualified; A sorting module is used to receive the test results of whether the water meters from the water meter image data extraction and inspection module are qualified, and sort the qualified and unqualified water meters based on the test results; The jump module is used to end the operation of all modules except the message module in the system and jump to the multi-source acquisition module operation phase to reset the operation; A message module is used to obtain the operation data of the marking module and the extraction and verification module, and generate a water meter production message based on the operation data of the extraction and verification module; During the operation phase of the marking module, the terminal staff on the water meter assembly line manually inspects the assembled water meters. When the water meter is detected to be qualified, the marking module marks the corresponding water meter image data stored in the multi-source acquisition module, and the marked content is qualified. Otherwise, the marked content is unqualified. When the marked content is unqualified, the corresponding water meter image data stored in the multi-source acquisition module is deleted and refreshed to execute the acquisition of the corresponding image data of the next assembled water meter. When the marking module marks the qualified water meter image data, the extraction and inspection module is triggered to run.

2. The device for detecting water meter quality defects based on machine vision according to claim 1, characterized in that: The multi-source acquisition module is integrated by a plurality of high-definition industrial cameras, and the plurality of high-definition industrial cameras are continuously distributed on the water meter automatic assembly production line; When each of the high-definition industrial cameras collects water meter image data, it faces the image data collection surface of the water meter surface, and after each completion of water meter image data collection, it synchronously crops the water meter image data so that the edges of the water meter image data intersect with at least one edge pixel of the water meter image in the water meter image data, and then performs a storage operation; The water meter image data captured successively by two adjacent high-definition industrial cameras point to the same water meter, and in the two water meter image data captured successively, the water meter components contained in the later captured water meter image data are at least one more or one more group of water meter assembly elements or components than the water meter components contained in the earlier captured water meter image data.

3. The device for detecting water meter quality defects based on machine vision according to claim 1, characterized in that: When the multi-source acquisition module stores the water meter image data, it performs differentiated storage based on the source of the water meter image data, the high-definition industrial camera, and the water meter image data stored in each differentiated storage area are sorted and stored based on the acquisition time sequence; When the multi-source acquisition module stores the water meter image data, it simultaneously optimizes the water meter image data on which the storage operation is performed, and then performs the storage operation; The optimization logic of the water meter image data is expressed as follows: ; Where: The water meter image data is output after optimization; To fuse multi-scale enhanced images; is the average brightness of the target; is the average brightness of the water meter image data; in, In the calculation, as the calculation target.

4. The device for detecting water meter quality defects based on machine vision according to claim 3, characterized in that: The fused multi-scale enhanced image The logic for obtaining is expressed as: The original water meter image data is recorded as ,right Divide the image into several sub-blocks, perform contrast-limited adaptive histogram equalization on each sub-block, and then merge all sub-blocks to obtain the image after preliminary grayscale adjustment. ; Median filter: , is the median filter window size; Gaussian filtering: , is the standard deviation of the Gaussian distribution; Construct a Gaussian pyramid: , is the number of Gaussian pyramid layers; For the Layer Gaussian filter standard deviation; Feature Enhancement: , For the Layer enhancement factor; For the The horizontal gradient value of the layer image; For the The vertical gradient value of the layer image; 。 5. The device for detecting water meter quality defects based on machine vision according to claim 1, characterized in that: The extraction and inspection module is internally provided with a demarcation unit for demarcating the qualified assembly judgment interval of the water meter; The extraction and inspection module extracts the foreground image from the water meter image data, i.e. the water meter image in the water meter image data, by using a threshold segmentation method; The extraction and inspection module compares the latest collected water meter image data with the water meter image data marked as qualified, that is, compares the similarity between the latest collected water meter image data and the water meter image data marked as qualified, and the similarity comparison operation is performed based on the high-definition industrial camera corresponding to the water meter image data source of each foreground image, and then: 。 6. The device for detecting water meter quality defects based on machine vision according to claim 5, characterized in that: The logic for the similarity comparison operation between the latest collected water meter image data and the water meter image data marked as qualified is as follows: The foreground image corresponding to the latest collected water meter image data and the foreground image corresponding to the qualified water meter image data are converted into grayscale images respectively, and the contour images of the two are extracted from the grayscale images. The grayscale image similarity and contour image similarity of the two are calculated respectively. The weight 0.4 is configured for the grayscale image similarity and the weight 0.6 is configured for the contour image similarity. The product of the grayscale image similarity and the corresponding configuration weight and the product of the contour image similarity and the corresponding configuration weight are added together to record the similarity between the latest collected water meter image data and the qualified water meter image data. ; The overall similarity between the latest collected water meter image data and the water meter image data marked as qualified is: ; Where: The number of water meter image data sets that are recently collected and marked as qualified for similarity comparison; is the similarity between the foreground image corresponding to the most recently collected water meter image data of group s and the foreground image corresponding to the water meter image data marked as qualified; is the value proportion weight; Among them, the value proportion weights are all non-zero positive numbers, and , and obey The larger the right subscript value, The larger the value, When the value is less than or equal to the defined water meter assembly qualification judgment interval, the jump module is triggered to run.

7. The device for detecting water meter quality defects based on machine vision according to claim 1, characterized in that: The water meter production message generated by the message module includes: The number of times the multi-source acquisition module is run is refreshed based on the result of the marking module operation, that is, the number of water meter image data with consecutive marking results as unqualified corresponds to the number of unqualified water meters; When an unqualified water meter is detected based on the extraction and inspection module, the number of water meters that had previously been inspected as qualified.

8. The device for detecting water meter quality defects based on machine vision according to claim 1, characterized in that: The multi-source acquisition module is interactively connected to the marking module and the extraction and inspection module through a wireless network. The extraction and inspection module is internally interactively connected to the demarcation unit through a wireless network. The multi-source acquisition module and the extraction and inspection module are interactively connected to the sorting module through a wireless network. The sorting module is interactively connected to the jump module and the message module through a wireless network. The jump module is interactively connected to the multi-source acquisition module through a wireless network.

9. A method for detecting quality defects of water meters based on machine vision, wherein the method is an implementation method of the device for detecting quality defects of water meters based on machine vision according to any one of claims 1 to 8, characterized in that: The following steps are involved: Step 1: Collect water meter image data during the assembly process, collect, optimize and store the water meter image data; Step 2: The user manually checks whether the water meter is qualified. If the test result is qualified, the stored water meter image data corresponding to the qualified water meter is retained. Otherwise, it is discarded and the image data corresponding to the next water meter is collected again until the water meter image data is retained. Step 3: Collect the water meter image data of the next assembly, obtain the retained water meter image data, perform foreground extraction on the two sets of water meter image data, and comprehensively test the comprehensive similarity of the foreground images corresponding to the two sets of water meter image data; Step 4: Define the water meter assembly qualification judgment interval, obtain the comprehensive similarity test results, compare the comprehensive similarity test results with the water meter assembly qualification judgment interval, determine whether the water meter is qualified, and sort the qualified and unqualified water meters according to the judgment results; Step 5: If the result is yes, continue to perform the collection and inspection of the continuous assembly water meter image data; if the result is no, end and jump to the water meter image data collection and manual inspection stage; Step 6: Generate water meter production message.

Citation Information

Patent Citations

  • Assembly defect detection quality grading method and system

    CN113567446A

  • Water meter visual inspection equipment

    CN109894376A

  • Drawing wire surface defect detection system and method based on artificial intelligence

    CN113176281A

  • Mechanical water meter reading method and system

    CN113255525A

  • Waterproof coiled material performance evaluation system based on machine vision

    CN119131421A

Cited By

  • Visual data acquisition system and method in water meter verification process

    CN120908102A

  • A visual data acquisition system and method in a water meter verification process

    CN120908102B

  • Water meter installation monitoring method, system and terminal

    CN121259798A

  • A method, system, and terminal for monitoring the installation of water meters.

    CN121259798B