A water meter quality defect detection method and device based on machine vision

By collecting, cropping and optimizing water meter image data through machine vision devices, and combining manual marking and similarity comparison, the problem of manual reliance on manual inspection for appearance quality defects in water meters after assembly is solved, efficient and accurate automated inspection is achieved, and labor costs are reduced.

CN120489301BActive Publication Date: 2025-10-24QUANZHOU WATER AFFAIRS WATER METER INSPECTION CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the prior art, the detection of appearance quality defects of water meters after assembly relies on manual inspection, resulting in low detection accuracy and high cost, and a large impact of human factors.

Method used

A water meter quality defect detection device based on machine vision is used to collect, crop and optimize water meter image data through multi-source high-definition industrial cameras, and combine manual marking and similarity comparison to achieve automated detection.

Benefits of technology

The accuracy and robustness of water meter quality inspection have been improved, the cost of manual inspection has been reduced, and efficient automated inspection has been achieved. The inspection efficiency has been increased by 8 times, and the yield rate has been increased to 99.5%.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120489301B_ABST
    Figure CN120489301B_ABST
Patent Text Reader

Abstract

The application discloses a kind of water meter quality defect detection method and device based on machine vision, it is related to product detection field, comprising: multi-source acquisition module, for collecting water meter image data in assembly process, water meter image data is stored;Marking module, for manually marking water meter image data as qualified and unqualified;Extraction and inspection module, for receiving the latest water meter image data collected by multi-source acquisition module in real time, and the water meter image data marked as qualified in marking module, the foreground extraction is carried out to water meter image data, and with the latest water meter image data and the water meter image data marked as qualified comparison, whether the latest water meter image data source water meter is qualified is inspected;The application is by collecting water meter image data, water meter image is cropped, optimized, and cooperates artificial detection selects qualified water meter image, with the water meter image data collected subsequently comparison, the water meter quality produced in water meter assembly production process is inspected.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application relates to the technical field of product detection, in particular to a water meter quality defect detection method and device based on machine vision. BACKGROUND

[0002] A water meter is an instrument for measuring water flow, which is usually installed on a water pipe. According to the measurement principle, there are mechanical water meters and intelligent water meters. It is commonly used in household, industrial and other scenes, and can accurately record water consumption, which is an important tool for water resource management and billing.

[0003] The application number 202110762779.0 discloses a method for detecting quality grading of components, which comprises: the production line system in the system obtains picture information of components at the pre-layer stage, post-layer stage and final inspection stage; each picture information contains the serial number corresponding to the component; the quality detection platform in the system matches the corresponding picture information based on the serial number of the component, and the algorithm model in the system analyzes the quality defects and / or appearance abnormalities; according to the analysis result of the algorithm model in the system, combined with the quality determination grading rule of the component, the quality detection platform in the system determines the quality of the component: if the quality determination result in the final inspection stage is defective, combined with the adjustment result of the component in the re-inspection adjustment platform, the quality detection platform in the system determines the quality grading of the component; the quality grading includes at least four levels, one of which is scrap; wherein the serial number of the component is associated with the quality determination grading rule of the component; the picture information includes two types of pictures for quality defect and / or appearance abnormality analysis, the picture for quality defect analysis is taken by an EL electroluminescent camera, and the picture for appearance abnormality analysis is taken by an optical camera; if the quality determination result in the final inspection stage is defective, this application aims to solve the problem that "at present, photovoltaic component production enterprises have almost all put into operation machine vision detection systems, the system is generally integrated by hardware manufacturers, the detection accuracy of quality defects is acceptable, the detection accuracy of appearance abnormalities is relatively low, and due to the existence of a certain false positive rate and false negative rate in the AI detection process, the AI detection algorithm model needs to be upgraded regularly for the current production line end or factory end system, and the defect samples after manual re-inspection are difficult to realize automatic collection and classification, which increases the pre-workload and difficulty of algorithm upgrading. In addition, the current quality grading work almost relies on quality inspectors, and human subjective factors will lead to differences in quality grading, and false grading will also cause pricing loss for production enterprises or downstream customers".

[0004] However, for the whole process of automatic production of water meters, the existing technology can automatically assemble the components of the water meter, but after assembly, the detection of the appearance quality defects of the water meter still relies heavily on manual inspection;

[0005] To this end, a water meter quality defect detection method and device based on machine vision are provided. SUMMARY

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

[0007] To achieve the above-mentioned purposes, the present application is implemented by the following technical solutions.

[0008] The present application discloses a water meter quality defect detection device based on machine vision, comprising:

[0009] A multi-source acquisition module is used to acquire water meter image data in the assembly process and store the water meter image data; a marking module is used to manually mark the water meter image data as qualified or unqualified; an extraction and inspection module is used to receive the latest water meter image data acquired by the multi-source acquisition module and the water meter image data marked as qualified in the marking module in real time, extract the foreground of the water meter image data, and compare the latest water meter image data with the water meter image data marked as qualified to inspect whether the water meter of the latest water meter image data is qualified; a sorting module is used to receive the inspection result of whether the water meter of the water meter image data in the extraction and inspection module is qualified, and sort the qualified and unqualified water meters based on the inspection result; a jump module is used to end the operation of all modules in the system except the message module, and jump to the running stage of the multi-source acquisition module for resetting the operation; and a message module is used to acquire 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.

[0010] Further, 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 a water meter automated assembly production line.

[0011] When each high-definition industrial camera acquires water meter image data, the camera faces the image data acquisition surface of the water meter, and after each time the water meter image data acquisition is completed, the water meter image data is synchronously cropped 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 a storage operation is performed.

[0012] The water meter image data acquired by the two adjacent high-definition industrial cameras in sequence is directed to the same water meter, and the water meter assembly included in the water meter image data acquired later is at least one or a group of water meter assembly elements or components compared with the water meter assembly included in the water meter image data acquired earlier.

[0013] 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;

[0014] 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;

[0015] The optimization logic of the water meter image data is expressed as follows:

[0016] ;

[0017] 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;

[0018] in, In the calculation, as the calculation target.

[0019] Furthermore, the fused multi-scale enhanced image The logic for obtaining is expressed as:

[0020] 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. ;

[0021] Median filter: , is the median filter window size;

[0022] Gaussian filtering: , is the standard deviation of the Gaussian distribution;

[0023] Construct a Gaussian pyramid:

[0024] , is the number of Gaussian pyramid layers; For the Layer Gaussian filter standard deviation;

[0025] Feature Enhancement: , For the Layer enhancement factor; For the A horizontal direction gradient value of the layer image; For the A vertical direction gradient value of the layer image;

[0026] .

[0027] Further, the marking module runs in the phase, the terminal staff manually detects the completed water meter in the water meter assembly line, and when the water meter is detected to be qualified, the corresponding water meter image data stored in the multi-source collection module is marked by the marking module, and 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 collection module is deleted and refreshed, and the next set of water meter image data is collected, until the marking module marks the qualified water meter image data, triggering the extraction and inspection module to run.

[0028] Further, the extraction and inspection module is internally provided with a demarcation unit, which is used to demarcate a water meter assembly qualified judgment interval;

[0029] The extraction and inspection module extracts the foreground image, i.e., the water meter image, in the water meter image data by threshold segmentation method;

[0030] The extraction and inspection module compares the newly collected water meter image data with the water meter image data marked as qualified, i.e., compares the similarity of the newly collected water meter image data with the water meter image data marked as qualified, and the similarity comparison operation is respectively performed based on the corresponding water meter image data of each foreground image by the high-definition industrial camera, so that:

[0031] .

[0032] Further, the similarity comparison operation logic of the newly collected water meter image data and the water meter image data marked as qualified is:

[0033] The corresponding foreground images of the newly collected water meter image data and the water meter image data marked as qualified are respectively converted into gray images, and the contour images of the two are extracted in the gray images, and the gray image similarity and the contour image similarity of the two are respectively calculated, the gray image similarity is configured with a weight of 0.4, and the contour image similarity is configured with a weight of 0.6, and the product of the gray image similarity and the corresponding configured weight and the product of the contour image similarity and the corresponding configured weight are added, and the total similarity of the newly collected water meter image data and the water meter image data marked as qualified is recorded as .

[0034] The total similarity of the newly collected water meter image data and the water meter image data marked as qualified is:

[0035] ;

[0036] In the formula: is the number of groups of newly collected water meter image data for performing similarity comparison with water meter image data marked as qualified; is the similarity of the corresponding foreground image of the s-th group of newly collected water meter image data and the corresponding foreground image of the water meter image data marked as qualified; is the value of the proportion weight;

[0037] wherein the values of the proportion weights are all positive non-zero numbers, and and are subject to The greater the right subscript value of is, the greater the value of is, and the smaller the value of

[0038] Further, the generated water meter production message content generated by the message module includes:

[0039] Based on the running results of the marking module, the number of times of refreshing the running of the multi-source collection module is refreshed, that is, the number of unqualified water meters corresponding to the water meter image data marked as unqualified in succession;

[0040] Based on the unqualified water meter detected by the extraction and inspection module, the number of qualified water meters before the inspection result is obtained.

[0041] Further, the multi-source collection module is connected to the marking module and the extraction and inspection module through a wireless network, the extraction and inspection module is connected to the demarcation unit through a wireless network, the multi-source collection module and the extraction and inspection module are connected to the sorting module through a wireless network, the sorting module is connected to the jump module and the message module through a wireless network, and the jump module is connected to the multi-source collection module through a wireless network.

[0042] On the other hand, a water meter quality defect detection method based on machine vision includes the following steps:

[0043] Collecting water meter image data in the assembly process, collecting, optimizing and storing the water meter image data; the user manually checks whether the water meter is qualified, and when the checking result is qualified, the stored water meter image data corresponding to the qualified water meter is retained, otherwise discarded, and the collection of the image data corresponding to the next water meter is performed again until the retention operation of the water meter image data is performed; collecting the image data of the next assembled water meter, obtaining the retained water meter image data, extracting the foreground of the two groups of water meter image data, and comprehensively testing the comprehensive similarity of the foreground images corresponding to the two groups of water meter image data; defining a water meter assembly qualified judgment interval, obtaining a comprehensive similarity test result, comparing the comprehensive similarity test result with the water meter assembly qualified judgment interval, determining whether the water meter is qualified, and sorting the qualified and unqualified water meters according to the determination result; if the determination result is yes, continue to perform the collection and testing of the continuous assembly water meter image data, and if the determination result is no, end and jump to the collection and manual testing stage of the water meter image data; and generating a water meter production message.

[0044] Compared with the known prior art, the technical scheme provided by the present application has the following beneficial effects:

[0045] The present application provides a water meter quality defect detection method and device based on machine vision. In the running process, water meter image data is collected, the water meter image is cropped and optimized, and qualified water meter images are selected with the help of manual detection. The water meter image data collected subsequently is compared, and the quality of the water meter produced in the water meter assembly process is tested. The testing process refers to the water meter image data at different stages of the water meter assembly process, has high testing accuracy, greatly reduces the cost of manual testing with the help of manual testing, and achieves higher intelligent degree and better robustness of water meter quality detection with little manual cost. BRIEF DESCRIPTION OF DRAWINGS

[0046] In order to more clearly illustrate the technical scheme in the embodiments of the present application or the prior art, the drawings needed in the following embodiment or prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0047] Figure 1 It is a structural schematic diagram of a water meter quality defect detection device based on machine vision.

[0048] Figure 2 It is a flowchart of a water meter quality defect detection method based on machine vision. DETAILED DESCRIPTION

[0049] In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0050] The present application will be further described below in conjunction with the embodiments. Embodiment 1

[0051] A water meter quality defect detection device based on machine vision in the embodiment comprises, as shown in the figure, the following: Figure 1

[0052] A multi-source acquisition module for acquiring water meter image data in the assembly process and storing the water meter image data;

[0053] 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 a water meter automatic assembly production line;

[0054] Each high-definition industrial camera acquires water meter image data with the image data acquisition surface of the water meter surface directly opposite, and after each time the water meter image data acquisition is completed, the water meter image data is synchronously cropped to make 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 a storage operation is performed;

[0055] The water meter image data acquired by the adjacent two high-definition industrial cameras in sequence points to the same water meter, and the water meter assembly components contained in the water meter image data acquired later are at least one or a group of water meter assembly elements or components compared with the water meter assembly components contained in the water meter image data acquired earlier;

[0056] When the multi-source acquisition module stores the water meter image data, the water meter image data is stored based on the high-definition industrial cameras as the source, and the water meter image data stored in each separate storage area is stored in sequence based on the acquisition time sequence;

[0057] When the multi-source acquisition module stores the water meter image data, the water meter image data performing the storage operation is optimized synchronously, and then the storage operation is performed;

[0058] The optimization logic of the water meter image data is represented as:

[0059] ;

[0060] In the formula: is the output water meter image data after optimization; ​To fuse the multi-scale enhanced image; For the target average brightness; For the water meter image data average brightness;

[0061] Wherein, In the calculation, take As the calculation target;

[0062] Fusion multi-scale enhanced image The calculation logic is represented as:

[0063] The original water meter image data is denoted as , and Divide into several sub-blocks, limit the contrast adaptive histogram equalization for each sub-block, and then merge all sub-blocks to obtain the image after preliminary gray scale adjustment ;

[0064] Median filter: , The window size of the median filter is

[0065] Gaussian filter: , The standard deviation of the Gaussian distribution is

[0066] Constructing a Gaussian pyramid:

[0067] , The number of layers of the Gaussian pyramid is The standard deviation of the Gaussian filter of the layer is

[0068] Feature enhancement: , The enhancement coefficient of the layer is The horizontal direction gradient value of the image of the layer is The vertical direction gradient value of the image of the layer is

[0069] ;

[0070] The marking module is used for manually marking the water meter image data as qualified and unqualified;

[0071] Through the above logical formula, the water meter image data is optimized, so that the system running application data in this embodiment is more accurate, thereby improving the accuracy of the final running output result of the system;

[0072] The marking module runs a stage, and the terminal staff on the water meter assembly line manually detects the completed water meter. When the water meter is detected to be qualified, the marking module marks the corresponding water meter image data stored in the multi-source collection module, and 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 collection module is deleted and refreshed, and the collection of the next set of water meter image data is performed until the marking module marks the qualified water meter image data, triggering the extraction and inspection module to run;

[0073] It should be noted that:

[0074] The marking module mainly undertakes the function of manual detection and marking of the corresponding image data of the completed water meter by the terminal staff on the water meter assembly line in the entire water meter quality defect detection process. The staff manually detects whether the water meter is qualified. If it is qualified, the marking module marks the corresponding image data of the water meter stored in the multi-source collection module as "qualified". This marking triggers the extraction and inspection module to run. If it is unqualified, it is marked as "unqualified". At this time, the multi-source collection module deletes the corresponding image data and refreshes the operation to continue collecting the image data of the next assembled water meter until the qualified image data is marked. The running data is also obtained by the message module to provide a basis for generating a water meter production message. It is the key link connecting manual detection and subsequent automatic detection process, which not only ensures the accuracy of the initial qualified samples by relying on manual judgment, but also ensures the effectiveness of the system data by timely processing of unqualified data.

[0075] The extraction and inspection module is used to receive the latest water meter image data collected by the multi-source collection module and the water meter image data marked as qualified in the marking module in real time, extract the foreground of 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 source water meter of the latest collected water meter image data is qualified.

[0076] The extraction and inspection module is internally provided with a demarcation unit, which is used to demarcate a water meter assembly qualified determination interval.

[0077] The extraction and inspection module extracts the foreground image in the water meter image data by threshold segmentation method, i.e. the water meter image in the water meter image data.

[0078] The operation of comparing the latest collected water meter image data with the water meter image data marked as qualified by the extraction and inspection module is the operation of comparing the similarity of the latest collected water meter image data with the water meter image data marked as qualified, and the similarity comparison operation is based on the respective water meter image data source high-definition industrial camera.

[0079] ;

[0080] The latest water meter image data and the labeled qualified water meter image data similarity comparison operation logic is:

[0081] The corresponding foreground image of the latest water meter image data and the corresponding foreground image of the labeled qualified water meter image data are respectively converted into gray images, and the contour images of the two are extracted in the gray images. The gray image similarity and the contour image similarity of the two are calculated respectively. The gray image similarity is configured with a weight of 0.4, and the contour image similarity is configured with a weight of 0.6. The product of the gray image similarity and the corresponding configured weight and the product of the contour image similarity and the corresponding configured weight are added, and the latest water meter image data and the labeled qualified water meter image data similarity is recorded as: ;

[0082] Then the overall similarity of the latest water meter image data and the labeled qualified water meter image data is:

[0083] ;

[0084] In the formula: is the number of groups of the latest water meter image data and the labeled qualified water meter image data for performing similarity comparison; is the similarity of the corresponding foreground image of the s-th group of the latest water meter image data and the corresponding foreground image of the labeled qualified water meter image data; is the value proportion weight;

[0085] Wherein, the value proportion weight is a non-zero positive number, and , and is subject to The greater the right subscript value of , the greater the value, When the water meter assembly qualified determination interval is determined, the jump module triggers the running;

[0086] Through the above logic and formula, the similarity of the latest water meter image data and the labeled qualified water meter image data is quantitatively output, so that based on the quantitatively output result, the water meter image data source water meter is qualified determined;

[0087] The sorting module is used for receiving the test result of whether the water meter image data source water meter is qualified in the extraction and test module, and sorting the qualified and unqualified water meters based on the test result;

[0088] The jump module is used for ending the running of all modules in the system except the message module, and jumping to the multi-source collection module running stage reset running;

[0089] The message module is configured to obtain the running data of the marking module and the extraction and inspection module, and generate a water meter production message based on the running data of the extraction and inspection module.

[0090] The water meter production message generated by the message module includes:

[0091] The number of times of refreshing the running of the multi-source acquisition module based on the running result of the marking module is the number of unqualified water meters corresponding to the unqualified water meter image data of the continuous marking result;

[0092] When the extraction and inspection module detects an unqualified water meter, the number of qualified water meters before the detection result is unqualified;

[0093] The multi-source acquisition module is connected to the marking module and the extraction and inspection module through a wireless network, the extraction and inspection module is connected to the demarcation unit through a wireless network, the multi-source acquisition module and the extraction and inspection module are connected to the sorting module through a wireless network, the sorting module is connected to the jump module and the message module through a wireless network, and the jump module is connected to the multi-source acquisition module through a wireless network.

[0094] In this embodiment, the multi-source acquisition module collects water meter image data during the assembly process, stores the water meter image data, and manually marks the water meter image data as qualified or unqualified after the marking module. 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, performs foreground extraction on the water meter image data, compares the latest water meter image data with the water meter image data marked as qualified, checks whether the source water meter of the latest water meter image data is qualified, synchronously demarcates the water meter assembly qualified determination interval by the demarcation unit, receives the detection result of whether the source water meter of the water meter image data in the extraction and inspection module is qualified by the sorting module, sorts the qualified and unqualified water meters based on the detection result, and ends the running of all modules in the system except the message module through the jump module, and jumps to the running stage of the multi-source acquisition module for resetting. Finally, the running data of the marking module and the extraction and inspection module is obtained by the message module, and a water meter production message is generated based on the running data of the extraction and inspection module.

[0095] Through the system in the above embodiment, through the multi-source image acquisition mechanism, the components at different assembly stages can be continuously and dynamically photographed during the automatic assembly process of the water meter. Combined with the image cropping and source storage technology, the fine data retention of the whole assembly process of the water meter is realized, and a stereoscopic data source is provided for quality tracing. The innovative image optimization algorithm significantly improves the image clarity and feature recognition by combining technologies such as multi-scale enhancement, median filtering, Gaussian pyramid construction and gradient feature enhancement, which is expected to improve the defect recognition accuracy by more than 30% compared with traditional visual detection.

[0096] Based on the similarity comparison model of gray and contour two dimensions, through the differential weight configuration, the artificial detection logic is effectively simulated, which can accurately capture structural deviation and identify surface defects. Through testing, the detection efficiency is more than 200 pieces per minute, which is 8 times higher than that of artificial detection;

[0097] In addition, the dynamic data-driven sorting mechanism can respond to the detection results in real time, automatically delete and reset the process function combined with unqualified data, realize zero missed detection of defective products, and provide quantitative data support for process optimization through production message generation technology, and help the production line yield to improve to more than 99.5%. Embodiment 2

[0098] In the specific implementation level, on the basis of embodiment 1, the embodiment refers to Figure 2 Further specific description is made to the water meter quality defect detection device based on machine vision in embodiment 1:

[0099] A water meter quality defect detection method based on machine vision, comprising the following steps:

[0100] Step 1: Collecting water meter image data in the assembly process, collecting, optimizing and storing the water meter image data;

[0101] Step 2: User manually checks whether the water meter is qualified, and 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 collection of the next water meter is executed again until the retention operation of the water meter image data is executed;

[0102] Step 3: Collecting the next set of water meter image data, obtaining the retained water meter image data, extracting the foreground of the two sets of water meter image data, and comprehensively testing the comprehensive similarity of the foreground images corresponding to the two sets of water meter image data;

[0103] Step 4: Draw 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, and determine whether the water meter is qualified, and sort the qualified and unqualified water meters according to the determination result;

[0104] Step 5: If the determination result is yes, continue to execute the collection and testing of the continuous assembly water meter image data, and if the determination result is no, end and jump to the collection and manual testing stage of the water meter image data;

[0105] Step 6: Generating water meter production message.

[0106] To sum up, in the running process of the method and device in the above embodiment, by collecting water meter image data, the water meter image is cropped and optimized, and the qualified water meter image is selected by manual detection. The water meter image data collected subsequently is compared, and the quality of the water meter produced in the water meter assembly process is tested. The test process refers to the water meter image data at different stages in the water meter assembly process, and the test accuracy is high. With manual inspection, the labor cost of manual inspection will be greatly reduced, and the water meter quality detection benefit with higher intelligence and better robustness is obtained at a small cost of manual cost.

[0107] The above embodiments are only used to illustrate the technical solutions of the present application, but not limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part of the technical features; and these modifications or replacements will not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A machine vision based water meter quality defect detection apparatus, characterized by, The utility model relates to a kind of water meter production line quality inspection system, including: Multi-source acquisition module, for collecting water meter image data in assembly process, water meter image data is stored; The multi-source acquisition module is integrated by several high-definition industrial cameras, and the several high-definition industrial cameras are continuously distributed on the water meter automatic assembly production line; When each high-definition industrial camera collects water meter image data, it is opposite to the image data collection surface of water meter surface, and after each time completing water meter image data collection, it is synchronized to carry out cutting processing to water meter image data, so that the edge of water meter image data intersects with at least one edge pixel of water meter image in water meter image data, and then storage operation is executed; The water meter image data collected by the adjacent two high-definition industrial cameras in succession points to the same water meter, and in the two water meter image data collected in succession, the water meter assembly included in the water meter image data collected later includes at least one or a group of water meter assembly elements or components compared to the water meter assembly included in the water meter image data collected first; Labeling module, for manually labeling water meter image data as qualified and unqualified; Extraction and inspection module, for receiving the latest water meter image data collected by multi-source acquisition module in real time, and the water meter image data labeled as qualified in labeling module, carrying out foreground extraction on water meter image data, and comparing the latest water meter image data with the water meter image data labeled as qualified to verify whether the water meter of the latest water meter image data is qualified; The extraction and inspection module is provided with a delimiting unit inside, and the delimiting unit is used to delimit a water meter assembly qualified determination interval; The extraction and inspection module extracts the foreground image in water meter image data, i.e. water meter image, by threshold segmentation method; The operation of comparing the latest water meter image data with the water meter image data labeled as qualified by the extraction and inspection module is the operation of comparing the similarity of the latest water meter image data with the water meter image data labeled as qualified, and the similarity comparison operation is carried out based on the corresponding high-definition industrial camera of each foreground image when comparing, so that: ; The similarity comparison operation logic of the latest water meter image data and the water meter image data labeled as qualified is: The newly collected water meter image data corresponding foreground image and the labeled qualified water meter image data corresponding foreground image are respectively converted into gray scale images, and the contour images of the two are extracted in the gray scale images, the gray scale image similarity and the contour image similarity of the two are respectively calculated, the gray scale image similarity is configured with a weight of 0.4, the contour image similarity is configured with a weight of 0.6, the product of the gray scale image similarity and the corresponding configured weight and the product of the contour image similarity and the corresponding configured weight are added, and the newly collected water meter image data and the labeled qualified water meter image data similarity is recorded as ; The overall similarity of the latest water meter image data and the water meter image data labeled as qualified is: ; In the formula, n is the number of sets of newly collected water meter image data and marked qualified water meter image data for performing similarity comparison; is the similarity of the foreground image corresponding to the s-th set of newly collected water meter image data and the foreground image corresponding to the marked qualified water meter image data; is the value proportion weight; Wherein, the value proportion weight is a non-zero positive number, and And subject to The greater the right subscript value of the right subscript value, The greater the value, When the water meter assembly qualified determination interval is determined, the jump module triggers the operation; Sorting module, for receiving the test result of whether the water meter of water meter image data in extraction and inspection module is qualified, sorting the qualified and unqualified water meters based on the test result; Jump module, for ending the operation of all modules in the system except message module, and jumping to the running stage of multi-source acquisition module to reset operation; Message module, for obtaining the running data of labeling module and extraction and inspection module, generating water meter production message based on the running data of extraction and inspection module. The marking module runs the phase, the terminal worker of water meter assembly line manually detects the completed water meter, when detecting the qualified water meter, the corresponding water meter image data stored in the multi-source collection module is marked by the marking 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 collection module is deleted and refreshed, the next assembled water meter image data collection is executed, until the qualified water meter image data is marked by the marking module, the extraction and inspection module is triggered to run.

2. The machine vision based water meter quality defect detection apparatus as claimed in claim 1, wherein, When the multi-source collection module stores the water meter image data, the high-definition industrial camera based on the water meter image data source is stored in different storage areas, and the water meter image data stored in each different storage area is sorted and stored based on the collection time sequence; When the multi-source collection module stores the water meter image data, the water meter image data executing the storage operation is optimized synchronously, and then the storage operation is executed; The optimization logic of the water meter image data is represented as: ; In the formula: to optimize the output water meter image data; to fuse multi-scale enhanced images; target average luminance; water meter image data average luminance; wherein At the time of calculation, as a calculation target is calculated.

3. The machine vision based water meter quality defect detection apparatus as claimed in claim 2, wherein, The fused multi-scale enhanced image The evaluation logic is represented 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 filtering: , is the median filter window size; Gaussian filter: , is the standard deviation of the Gaussian distribution; A Gaussian pyramid is constructed: , is the number of Gaussian pyramid layers; is the number of the layer Gaussian filter standard deviation; Feature enhancement: , is the enhancement coefficient of the first layer; is the enhancement coefficient of the first layer; is the horizontal direction gradient value of the first layer image; is the horizontal direction gradient value of the first layer image; is the vertical direction gradient value of the first layer image; is the vertical direction gradient value of the first layer image; 。 4. The machine vision based water meter quality defect detection apparatus as claimed in claim 1, wherein, The content of the water meter production message generated by the message module includes: The number of unqualified water meters corresponding to the unqualified water meter image data is refreshed based on the number of times that the multi-source collection module runs based on the marking module running result; When the extraction and inspection module runs and inspects the unqualified water meter, the number of water meters with qualified inspection results before this time.

5. The machine vision based water meter quality defect detection apparatus as claimed in claim 1, wherein, The multi-source collection module is connected with the marking module and the extraction and inspection module through a wireless network, the extraction and inspection module is connected with the demarcation unit through a wireless network, the multi-source collection module and the extraction and inspection module are connected with the sorting module through a wireless network, the sorting module is connected with the jump module and the message module through a wireless network, and the jump module is connected with the multi-source collection module through a wireless network.

6. A method for detecting quality defects of water meters based on machine vision, which is a method for implementing the device for detecting quality defects of water meters based on machine vision according to any one of claims 1-5, characterized in that, The steps include: Step 1: collecting water meter image data in the assembly process, collecting, optimizing and storing the water meter image data; Step 2: the user manually inspects whether the water meter is qualified, if the inspection result is qualified, the stored water meter image data corresponding to the qualified water meter is retained, otherwise, it is discarded, and the next water meter image data collection is executed again until the water meter image data retention operation is executed; Step 3: collecting the next assembled water meter image data, obtaining the retained water meter image data, extracting the foreground of the two groups of water meter image data, and comprehensively inspecting the comprehensive similarity of the foreground images corresponding to the two groups of water meter image data; Step 4: demarcate the water meter assembly qualified judgment interval, obtain the comprehensive similarity inspection result, compare the comprehensive similarity inspection 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 determination result; Step 5: if the determination result is yes, continue to execute the collection and inspection of the continuous assembled water meter image data, if the determination result is no, end, and jump to the collection and manual inspection phase of the water meter image data; Step 6: generate a 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

  • Rapid inspection system for port container

    CN119534465A

  • Method and system for monitoring liquid level of chemical storage tank in real time based on image recognition

    CN120147975A