Gasket assembly detection method and device, electronic equipment, system and program product

By extracting the gasket image of the gasket area from the image of the part to be tested and combining the similarity and center point position deviation methods, the problems of low gasket assembly detection efficiency and high misjudgment rate are solved, and fast and accurate detection results are achieved.

CN120726014APending Publication Date: 2025-09-30HANGZHOU DEEPVISION TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510916077.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-03
Publication Date
2025-09-30

AI Technical Summary

Technical Problem

In the existing technology, gasket assembly inspection has low efficiency, high cost and high misjudgment rate, especially due to the differences in surface imaging of parts from different batches, which requires long-term debugging to find a suitable area threshold.

Method used

By extracting the gasket image of the gasket area from the image of the part to be tested, and based on the similarity between the gasket image and the template image and the center point position deviation, the gasket assembly is quickly determined to be qualified. The image extraction model and the area array camera are combined with a perforated surface light source for detection.

Benefits of technology

It achieves fast and accurate gasket assembly inspection, reduces debugging costs, lowers the misjudgment rate, and ensures that defective parts are not missed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120726014A_ABST
    Figure CN120726014A_ABST
Patent Text Reader

Abstract

The invention relates to a gasket assembly detection method and device, electronic equipment, a system and a program product. The method comprises the steps of extracting a gasket image corresponding to a gasket area from an image of a to-be-detected part, and then determining whether gasket assembly is qualified or not according to the similarity between the gasket image and a template image and the position deviation between the center point of the gasket image and the center point of the template image. Wherein the template image is an image corresponding to the gasket area of the gasket assembly qualified part. According to the scheme provided by the invention, whether gasket assembly is qualified or not can be quickly determined only by extracting the gasket image, calculating the image similarity between the gasket image and the template image and calculating the position deviation between the center point of the gasket image and the center point of the template image, additional debugging is not needed, the debugging cost is reduced, and the efficiency is improved. And on the premise of ensuring zero leak detection of the defective part, a relatively low misjudgment rate is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of gasket assembly detection technology, and in particular to a gasket assembly detection method, device, electronic equipment, system and program product. Background Art

[0002] Some parts are fitted with gaskets for sealing and vibration reduction. For example, the head of the plunger rocker arm is fitted with a metal gasket. Quality inspection is required to ensure the gasket is installed in the correct direction and angle.

[0003] In related technologies, a camera is used to capture black and white images of parts. A binarization threshold is then adjusted to distinguish between light and dark areas on the part surface under a light source. An area threshold is then set to distinguish between acceptable and defective parts based on the size of these areas. However, due to production process limitations, surface imaging of parts varies from batch to batch. Finding the appropriate area threshold often requires weeks of debugging, resulting in a high rate of misjudgment. Summary of the Invention

[0004] In order to solve or partially solve the problems existing in the related technology, the present application provides a gasket assembly detection method, device, electronic equipment, system and program product, which can quickly determine whether the gasket assembly is qualified without the need for additional debugging, reducing debugging costs, and achieving a lower error rate while ensuring zero missed detection of defective parts.

[0005] A first aspect of the present application provides a gasket assembly detection method, comprising: Extracting a gasket image corresponding to the gasket area from the image of the part to be tested; Whether the gasket assembly of the part to be tested is qualified is determined based on the similarity between the gasket image and the template image, as well as the position deviation between the center point of the gasket image and the center point of the template image; wherein the template image is an image corresponding to the gasket area of ​​the part with qualified gasket assembly.

[0006] Furthermore, in the above method, the image of the part to be measured and the template image both include images obtained using at least two exposure values, and the exposure value used by the image of the part to be measured and the template image is the same; The determining whether the gasket assembly of the part to be tested is qualified according to the similarity between the gasket image and the template image, and the position deviation between the center point of the gasket image and the center point of the template image includes: If the image similarity between the gasket image and the template image at each exposure value is greater than the set similarity, and the position deviation between the center point of the gasket image and the center point of the template image is less than the set deviation distance, it means that the gasket is assembled qualified.

[0007] Furthermore, in the above method, extracting the gasket image corresponding to the gasket area from the image of the part to be measured includes: Extracting a detection image of a detection area of ​​the part to be tested from the image of the part to be tested; Controlling the template image to slide on the detection image, and intercepting a search image with the same size as the template image from the detection image after each slide; The similarity between the template image and each search image is calculated, and the search image corresponding to the highest similarity is selected as the gasket image.

[0008] Furthermore, in the above method, extracting the detection image of the detection area of ​​the part to be tested from the image of the part to be tested includes: Acquire an image of the part to be tested; the image of the part to be tested includes images corresponding to multiple parts to be tested in the same inspection batch; Based on the predetermined position information of the detection images of the parts to be tested, detection images of the detection areas of the parts to be tested are extracted from the images of the parts to be tested.

[0009] Furthermore, in the above method, the plurality of parts to be tested are placed in a material box, the material box includes a plurality of slots and each slot is used to place one of the parts to be tested, and the intervals between the slots are fixed; The process of determining the position information of the detection area of ​​each part to be tested includes: Determine the center point coordinates of the detection images of each part to be tested based on the spacing distance between adjacent parts to be tested, the number of parts to be tested that are spaced between each part to be tested and the specific slot, and the center point coordinates of the detection image of the part to be tested placed in the specific slot; According to the center point coordinates of each detection image of the part to be measured and the size of each detection image of the part to be measured, the coordinate range of each detection image of the part to be measured is determined as the position information of each detection image of the part to be measured.

[0010] Furthermore, in the above method, the step of obtaining an image of the part to be measured includes: Images of the parts to be measured are acquired by photographing with an area array camera disposed on one side of the detection area of ​​the parts to be measured; a surface light source with holes is disposed between the area array camera and the parts to be measured.

[0011] A second aspect of the present application provides a gasket assembly detection device, comprising: An extraction module, used for extracting a gasket image corresponding to the gasket area from the image of the part to be tested; A determination module is used to determine whether the gasket assembly of the part to be tested is qualified based on the similarity between the gasket image and the template image, and the position deviation between the center point of the gasket image and the center point of the template image; wherein the template image is an image corresponding to the gasket area of ​​the part with qualified gasket assembly.

[0012] A third aspect of the present application provides an electronic device, including: processor; and The memory stores executable codes thereon, and when the executable codes are executed by the processor, the processor is caused to execute the method described above.

[0013] A fourth aspect of the present application provides a gasket assembly detection system, comprising: A material box, wherein the material box comprises a plurality of slots and each slot is used to place a part to be tested; An area array camera and an area array light source are provided on one side of the detection area of ​​the part to be measured, wherein the area array camera is used to capture an image of the part to be measured through a hole in the area array light source; A processing device is used to obtain an image of the part to be tested, and extract a gasket image corresponding to the gasket area from the image of the part to be tested; based on the similarity between the gasket image and the template image, and the position deviation between the center point of the gasket image and the center point of the template image, determine whether the gasket assembly of the part to be tested is qualified; wherein the template image is an image corresponding to the gasket area of ​​a part with qualified gasket assembly.

[0014] A fifth aspect of the present application provides a computer program product, which includes computer instructions, and when the computer instructions are executed by a processor, implements the method described above.

[0015] The technical solution provided by this application may include the following beneficial results: The technical solution of the present application can extract a gasket image corresponding to the gasket area from the image of the part to be tested, and then determine whether the gasket assembly is qualified based on the similarity between the gasket image and the template image, as well as the positional deviation between the center point of the gasket image and the center point of the template image, wherein the template image is an image corresponding to the gasket area of ​​the part with qualified gasket assembly. With this arrangement, it is only necessary to extract the gasket image, calculate the image similarity between the gasket image and the template image, and the positional deviation between the center point of the gasket image and the center point of the template image to quickly determine whether the gasket assembly is qualified. No additional debugging is required, which reduces debugging costs and achieves a low error rate while ensuring zero missed detection of defective parts.

[0016] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The above and other objects, features and advantages of the present application will become more apparent by describing in more detail exemplary embodiments of the present application in conjunction with the accompanying drawings, wherein the same reference numerals generally represent the same components in the exemplary embodiments of the present application.

[0018] Figure 1 1 is a flow chart of a gasket assembly detection method according to an embodiment of the present application; Figure 2 1 is a schematic structural diagram of a gasket assembly detection device shown in an embodiment of the present application; Figure 3 is a schematic structural diagram of an electronic device shown in an embodiment of the present application; Figure 4 It is a structural schematic diagram of the gasket assembly detection system shown in an embodiment of the present application. DETAILED DESCRIPTION

[0019] The following describes embodiments of the present application in more detail with reference to the accompanying drawings. Although the accompanying drawings illustrate embodiments of the present application, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. Rather, these embodiments are provided to make the present application more thorough and complete, and to fully convey the scope of the present application to those skilled in the art.

[0020] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. As used in this application and the appended claims, the singular forms "a," "an," "the," and "the" are intended to include the plural forms, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.

[0021] It should be understood that although the terms "first", "second", "third", etc. may be used in this application to describe various information, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of this application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0022] Some parts are fitted with gaskets for sealing and shock absorption. For example, the plunger rocker arm, a compact, metallic-gray precision automotive component, is fitted with a similarly gray metal gasket at its head. During assembly, the gasket must be installed in the correct direction and angle. During mechanical production, strict quality control is applied to the gasket assembly at the plunger rocker arm head. Defective products resulting from assembly errors must be completely eliminated to prevent them from entering the automotive market and potentially posing serious safety risks.

[0023] Gasket assembly errors mainly include gaskets not being installed, too many gaskets being installed (generally two gaskets being installed repeatedly), gaskets being installed upside down, and gaskets being installed crookedly. In order to ensure that the direction and angle of the gasket installation are correct, quality inspection is required. In related technologies, manual methods are often used for quality inspection, but manual quality inspection has always had the problem of high efficiency and low cost. Existing visual inspection technology uses a camera to capture black and white images of parts, adjusts the binarization threshold to distinguish between light and dark areas on the surface of the part under the light source, and then sets the area threshold to distinguish between qualified products and defective products based on the size of the light and dark areas. Although this can solve the problem of high efficiency and low cost, due to production process reasons, there are differences in the surface imaging of parts from different batches. It often takes several weeks of debugging to find a suitable area threshold, and the misjudgment rate is high.

[0024] In response to the above problems, the embodiments of the present application provide a gasket assembly detection method, device, electronic equipment, system and program product, which can quickly determine whether the gasket assembly is qualified without the need for additional debugging, reducing debugging costs, and achieving a lower error rate while ensuring zero missed detection of defective parts.

[0025] The technical solutions of the embodiments of the present application are described in detail below with reference to the accompanying drawings.

[0026] The present application provides a gasket assembly detection method, which can be performed by an electronic device. The electronic device can be any device with data and instruction processing functions, such as a laptop computer, a tablet computer, a desktop computer, a mobile device (e.g., a mobile phone, a personal digital assistant, a dedicated messaging device), or a combination of any two or more of these electronic devices, or a server. Figure 1 As shown, the method includes: S101 . Extracting a gasket image corresponding to a gasket area from an image of a part to be measured.

[0027] The above-mentioned part to be tested refers to a part that is assembled with a gasket and needs to test the assembly quality of the gasket. The specific type of the part to be tested is not limited in the embodiments of the present application. For example, the part to be tested can be a plunger rocker arm frame.

[0028] In some embodiments, an image extraction model is used to extract a gasket image corresponding to the gasket area from an image of the part to be tested. Specifically, a large number of sample parts can be obtained, images of the sample parts can be taken as training samples, and the gasket images corresponding to the gasket area in the training samples can be marked as training labels. During training, the training samples are input into the image extraction model to obtain the extraction results output by the image extraction model. By comparing the training labels and the extraction results, the loss value of the image extraction model is determined, and the parameters of the image extraction model are adjusted with the goal of reducing the loss value of the image extraction model. The above training process is repeated until the various parameters of the image extraction model meet the requirements. It should be noted that the above image extraction model can be obtained by training based on any neural network model, or based on training based on a pre-trained model, such as a pre-trained large model similar to ChatGPT, which is not limited in this embodiment.

[0029] The image of the part to be tested is input into the trained image extraction model to obtain the gasket image output by the image extraction model.

[0030] S102 : Determine whether the gasket assembly of the part to be tested is qualified based on the similarity between the gasket image and the template image, and the position deviation between the center point of the gasket image and the center point of the template image.

[0031] The template image above refers to the image of the gasket area of ​​a part that has passed the gasket assembly test. Specifically, you can take some images of the part to be tested in advance. Then, using the interactive visualization function, use the mouse to select the gasket area of ​​the part that has passed the test from the image of the part to be tested. This template image can then be stored in the system template image directory.

[0032] The similarity between the gasket image and the template image is calculated. If the similarity between the gasket image and the template image is greater than the set similarity threshold, it means that the gasket image and the template image are successfully matched. The above-mentioned set similarity threshold can be set according to actual conditions and is not limited in this embodiment.

[0033] It should be noted that while a successful similarity match between the gasket image and the template image can filter out most cases of gasket assembly failure, it is often difficult to filter out crooked gaskets by similarity matching between the gasket image and the template image. Therefore, in the embodiments of the present application, the positional deviation between the center point of the gasket image and the center point of the template image is also calculated.

[0034] Specifically, when calculating the positional deviation between the center point of the gasket image and the center point of the template image, the absolute value of the difference between the horizontal coordinate of the center point of the gasket image and the horizontal coordinate of the center point of the template image can be calculated. If the absolute value is greater than the set horizontal coordinate deviation threshold, it indicates that the gasket assembly is unqualified. Alternatively, the absolute value of the difference between the vertical coordinate of the center point of the gasket image and the vertical coordinate of the center point of the template image is calculated. If the absolute value is greater than the set vertical coordinate deviation threshold, it indicates that the gasket assembly is unqualified. The above-mentioned set horizontal coordinate deviation threshold and set vertical coordinate deviation threshold can be set according to actual conditions and are not limited in this embodiment.

[0035] That is, when the similarity between the gasket image and the template image is greater than the set similarity threshold and the position deviation between the center point of the gasket image and the center point of the template image is less than the set deviation threshold, it indicates that the gasket is assembled properly.

[0036] In the above embodiment, a gasket image corresponding to the gasket area can be extracted from the image of the part to be tested. The gasket assembly is then determined to be qualified based on the similarity between the gasket image and the template image, as well as the positional deviation between the center point of the gasket image and the center point of the template image, where the template image is an image corresponding to the gasket area of ​​the part with qualified gasket assembly. With this arrangement, it is only necessary to extract the gasket image, calculate the image similarity between the gasket image and the template image, and calculate the positional deviation between the center point of the gasket image and the center point of the template image, to quickly determine whether the gasket assembly is qualified. This eliminates the need for additional debugging, reduces debugging costs, and achieves a low error rate while ensuring zero missed detection of defective parts.

[0037] As an optional embodiment, the image of the part to be tested and the template image in the above embodiment both include images obtained using at least two exposure values, and the exposure value used for the image of the part to be tested and the template image is the same; the above embodiment determines whether the gasket assembly of the part to be tested is qualified based on the similarity between the gasket image and the template image, and the positional deviation between the center point of the gasket image and the center point of the template image, specifically including the following steps: If the image similarity between the gasket image and the template image at each exposure value is greater than the set similarity, and the position deviation between the center point of the gasket image and the center point of the template image is less than the set deviation distance, it means that the gasket is assembled qualified.

[0038] Specifically, when acquiring an image of the part to be tested and a template image, at least two exposure values ​​are used for exposure, and the exposure values ​​used for the image of the part to be tested and the template image are the same. For example, the image of the part to be tested and the template image are both exposed twice, once using a first exposure value and once using a second exposure value.

[0039] For each exposure value of the gasket image and the template image, the similarity between the gasket image and the template image, as well as the positional deviation between the center point of the gasket image and the center point of the template image, are calculated. If the image similarity between the gasket image and the template image at each exposure value is greater than a set similarity, and the positional deviation between the center point of the gasket image and the center point of the template image is less than a set deviation distance, the gasket assembly is qualified. Here, the set similarity ∈ (0, 1). The values ​​corresponding to the above-mentioned set similarity and set deviation distance can be set according to actual conditions and are not limited in this embodiment.

[0040] In the above embodiment, by performing matching calculations on the gasket image and the template image under different exposures, it is possible to compensate for the information loss of a single exposure and retain more details. At the same time, by combining multiple features such as texture and color, the matching accuracy is improved, thereby improving the accuracy of the detection results.

[0041] As an optional implementation manner, the step of extracting the gasket image corresponding to the gasket area from the image of the part to be measured in the above embodiment includes the following specific steps: A detection image of the detection area of ​​the part to be tested is extracted from the image of the part to be tested; the template image is controlled to slide on the detection image, and a search image with the same size as the template image is intercepted from the detection image after each slide; the similarity between the template image and each search image is calculated, and the search image corresponding to the highest similarity is selected as the gasket image.

[0042] In addition to extracting the gasket image using the image extraction model as described in the above embodiment, in order to avoid the complicated model training process and improve the detection efficiency, the embodiments of the present application also provide another method for extracting the gasket image, which is as follows: The inspection area of ​​the part to be tested refers to the area corresponding to the side of the part to be tested on which the gasket is installed, and the inspection image refers to the image of the inspection area of ​​the part to be tested. In some embodiments, since a large number of parts to be tested need to be tested at one time, the parts to be tested of the same model are of the same size, and the parts to be tested are placed in a fixed position and photographed by a fixed camera. Therefore, the position information of the inspection images corresponding to parts to be tested that are in different inspection batches but located in the same position is consistent. Therefore, the coordinate range of the inspection image of the part to be tested can be set in advance. After obtaining the image of the part to be tested, the inspection image can be directly extracted from the image of the part to be tested based on the coordinate range of the inspection image of the part to be tested.

[0043] Using the template image I as a reference, a sliding window is applied to the inspection image of the part to be tested with pixel-level accuracy. After each sliding motion, a search image R with the same size as the template image I is captured from the inspection image. The similarity between the template image I and the search image R is calculated.

[0044] In some embodiments, the feature similarity α between the template image I and the search image R is calculated using the function α=φ(R, I). For example, the feature similarity of the part grayscale image is used as the similarity between the template image I and the search image R, and the search image with the highest similarity is selected as the gasket image. The φ function can be normalized cross correlation, sum of squared differences, etc., which is not limited in this embodiment.

[0045] In the above embodiment, the gasket image with the highest similarity can be quickly extracted from the detection image by sliding the template image, without the need for additional debugging, thus reducing the debugging cost and achieving a lower misjudgment rate while ensuring zero missed detection of defective parts.

[0046] As an optional implementation manner, the step of extracting the detection image of the detection area of ​​the part to be tested from the image of the part to be tested in the above embodiment includes the following specific steps: An image of the part to be tested is obtained; the image of the part to be tested includes images corresponding to multiple parts to be tested in the same inspection batch; and based on predetermined position information of the inspection images of each part to be tested, an inspection image of each inspection area of ​​the part to be tested is extracted from the image of the part to be tested.

[0047] In an embodiment of the present application, in order to improve detection efficiency, the gasket assembly conditions of multiple parts to be tested are detected simultaneously in the same detection batch, so the image of the part to be tested includes images corresponding to multiple parts to be tested.

[0048] In some embodiments, because a large number of parts to be tested need to be tested at once, the parts of the same model and size are the same, and the parts to be tested are placed in a fixed position and photographed by a fixed camera. Therefore, the position information of the test images corresponding to parts to be tested that are in different test batches but located at the same position is consistent. Therefore, in the embodiments of the present application, the position information of the test images of each part to be tested in the same batch is pre-set. After obtaining the image of the part to be tested, the test images of each test area of ​​the part to be tested are quickly extracted from the image of the part to be tested based on the pre-determined position information of the test images of each part to be tested.

[0049] With this arrangement, there is no need to perform the step of inferring and calculating the position information of the inspection images of each part to be tested during the gasket assembly inspection process, which effectively improves the inspection speed.

[0050] As an optional embodiment, the plurality of parts to be tested in the above embodiment are placed in a material box, which includes a plurality of slots, each slot being used to place a part to be tested, and the intervals between the slots are fixed; the process of determining the position information of the detection area of ​​each part to be tested in the above embodiment includes: The center point coordinates of each detection image of the part to be tested are determined based on the spacing distance between adjacent parts to be tested, the number of parts to be tested between each part to be tested and a specific slot, and the center point coordinates of the detection image of the part to be tested placed in the specific slot; the coordinate range of each detection image of the part to be tested is determined as the position information of each detection image of the part to be tested based on the center point coordinates of each detection image of the part to be tested and the size of each detection image of the part to be tested.

[0051] Before starting the actual inspection, you can first determine the position information of the inspection image for each part to be tested. Specifically, you can first fill the material box with the parts to be tested. The material box is used to hold the parts to be tested and is provided with multiple slots, each slot is used to place a part to be tested. The spacing between each slot is fixed, so the spacing between each part to be tested can also be considered fixed.

[0052] A slot is arbitrarily selected from the multiple slots of the material box as a specific slot. The specific position of the slot is not limited in the embodiments of the present application. For ease of explanation, the part to be tested placed in the specific slot is defined as the specific part to be tested, but in essence, the specific part to be tested is no different from other parts to be tested. The center point coordinates of the detection image of the specific part to be tested can be obtained by measurement, camera internal and external parameter conversion, etc. The specific camera internal and external parameter conversion method can be referred to the records in the prior art and will not be repeated here.

[0053] Measure the spacing between adjacent parts. Since the spacing between each part is fixed, you can only measure the lateral spacing between two laterally adjacent parts and the longitudinal spacing between two longitudinally adjacent parts. Convert the lateral spacing between the two laterally adjacent parts to the image coordinate system to obtain spacing a, and convert the longitudinal spacing between the two longitudinally adjacent parts to the image coordinate system to obtain spacing b. Spacing a and spacing b are used as the spacing between adjacent parts.

[0054] The center point coordinates of the detection images of each part to be tested can be obtained based on the spacing between adjacent parts to be tested, the number of parts to be tested between each part to be tested and a specific slot, and the center point coordinates of the detection image of a specific part to be tested.

[0055] If the first slot in the upper left corner of the material box is defined as a specific slot, the calculation formula for the center point coordinates of the inspection image of each part to be tested is as follows: P(ij)=(x0+(i-1)×a,y0+(j-1)×b) Wherein, P(ij) is the coordinate of the center point of the detection image of the part to be tested in the i-th row and j-th column, (i-1) is the number of parts to be tested that are horizontally spaced between the part to be tested in the i-th row and j-th column and the specific slot, (j-1) is the number of parts to be tested that are vertically spaced between the part to be tested in the i-th row and j-th column and the specific slot, (x0, y0) is the coordinate of the center point of the detection image of the specific part to be tested, and interval a and interval b are the interval distances between adjacent parts to be tested.

[0056] Then, according to the coordinates of the center point of each detection image of the part to be tested and the size of each detection image of the part to be tested, the coordinate range of each detection image of the part to be tested is determined as the position information of each detection image of the part to be tested. The calculation formula is as follows: {(x,y)|x∈(x i -w / 2,x i +w / 2),y∈(y j -h / 2,y j +h / 2) Among them, (x, y) represents the coordinate range of the detection image of the part to be tested in the i-th row and j-th column, x i Indicates the horizontal coordinate of the center point of the image of the part to be tested in the i-th row and j-th column, y i represents the vertical coordinate of the center point of the detection image of the part to be tested in the i-th row and j-th column, w represents the horizontal length of the detection image, and h represents the vertical length of the detection image. w and h can be obtained by measurement.

[0057] Parts of the same model are identical in size, placed in a fixed location, and captured by a fixed camera. Therefore, the positional information of the inspection images corresponding to parts in different inspection batches but located in the same location is consistent. During each subsequent batch of testing, inspection images of each part can be captured directly from the images of the parts under test based on their positional information.

[0058] For any detection image of the part to be tested, the template image can be controlled to slide on the detection image in accordance with the description of the above embodiment. After each slide, a search image with the same size as the template image is captured from the detection image, the similarity between the template image and each search image is calculated, and the search image corresponding to the highest similarity is selected as the gasket image; based on the similarity between the gasket image and the template image, as well as the positional deviation between the center point of the gasket image and the center point of the template image, it is determined whether the gasket assembly of the part to be tested is qualified.

[0059] In the above embodiment, the position of the detection image can be determined before the test is performed, so as to facilitate matching of the template image based on the detection image, thereby reducing the matching workload and improving the detection efficiency.

[0060] As an optional implementation manner, the step of acquiring the image of the part to be tested in the above embodiment may specifically include the following steps: Images of the parts to be tested are acquired by photographing with an area array camera disposed on one side of a detection area of ​​the parts to be tested; a surface light source with holes is disposed between the area array camera and the parts to be tested.

[0061] In the embodiment of the present application, an image of the part to be measured is captured by an area array camera disposed on one side of the detection area of ​​the part to be measured, and the area array camera can ensure that the part to be measured can be clearly imaged.

[0062] A perforated surface light source is positioned between the area scan camera and the part under test, shining vertically directly above it. This lighting design effectively avoids interference from the cartridge during image capture, while clearly revealing the characteristic texture of the gasket area. This is particularly true given that most parts are metallic gray, such as the plunger rocker arm, which is metallic. The cartridge is typically white plastic, so the perforated surface light source effectively avoids interference from the plastic during image capture, clearly revealing the characteristic texture of the gasket area.

[0063] It should be noted that if the material box is large and one area array camera cannot clearly obtain images of all the parts to be tested, multiple area array cameras can be evenly arranged, and the same number of holes as the area array cameras can be set on the surface light source. Each area array camera can capture the image of the parts to be tested through the holes of the surface light source to ensure that the image of each part to be tested in the material box can be captured to avoid missed inspections.

[0064] When multiple cameras are provided, the parts included in the images of the parts to be tested taken by each camera can be regarded as the same batch. According to the description of the above embodiment, the detection images corresponding to the detection areas of the parts to be tested are first extracted, and then the detection images of the parts to be tested are matched with the template images to determine whether the gasket assembly is qualified.

[0065] In the above embodiment, by providing an area array camera and a surface light source with holes, a clearer image of the part to be tested can be obtained, thereby improving the reliability of the detection result.

[0066] Corresponding to the aforementioned application function implementation method embodiment, the present application also provides a gasket assembly detection device, electronic equipment, gasket assembly detection system, computer program product and corresponding embodiments.

[0067] Figure 2 It is a structural schematic diagram of a gasket assembly detection device shown in an embodiment of the present application.

[0068] See also Figure 2 , gasket assembly detection device, comprising: The extraction module 100 is used to extract the gasket image corresponding to the gasket area from the image of the part to be tested; The determination module 110 is used to determine whether the gasket assembly of the part to be tested is qualified based on the similarity between the gasket image and the template image, and the position deviation between the center point of the gasket image and the center point of the template image; wherein the template image is an image corresponding to the gasket area of ​​the gasket-assembled part.

[0069] Furthermore, the image of the part to be tested and the template image both include images obtained using at least two exposure values, and the exposure value used for the image of the part to be tested and the template image is the same; the determination module 110 of the above embodiment, when determining whether the gasket assembly of the part to be tested is qualified based on the similarity between the gasket image and the template image, and the positional deviation between the center point of the gasket image and the center point of the template image, is specifically used to: If the image similarity between the gasket image and the template image at each exposure value is greater than the set similarity, and the position deviation between the center point of the gasket image and the center point of the template image is less than the set deviation distance, it means that the gasket is assembled qualified.

[0070] Furthermore, when extracting the gasket image corresponding to the gasket area from the image of the part to be tested, the extraction module 100 of the above embodiment is specifically used to: A detection image of the detection area of ​​the part to be tested is extracted from the image of the part to be tested; the template image is controlled to slide on the detection image, and a search image with the same size as the template image is intercepted from the detection image after each slide; the similarity between the template image and each search image is calculated, and the search image corresponding to the highest similarity is selected as the gasket image.

[0071] Furthermore, when extracting the detection image of the detection area of ​​the part to be tested from the image of the part to be tested, the extraction module 100 of the above embodiment is specifically used to: An image of the part to be tested is obtained; the image of the part to be tested includes images corresponding to multiple parts to be tested in the same inspection batch; and based on predetermined position information of the inspection images of each part to be tested, an inspection image of each inspection area of ​​the part to be tested is extracted from the image of the part to be tested.

[0072] Furthermore, the plurality of parts to be tested in the above embodiment are placed in a material box, the material box includes a plurality of slots and each slot is used to place a part to be tested, and the intervals between the slots are fixed; the device of the above embodiment further includes: The preprocessing module is used to determine the center point coordinates of each detection image of the part to be tested based on the spacing distance between adjacent parts to be tested, the number of parts to be tested between each part to be tested and the specific slot, and the center point coordinates of the detection image of the part to be tested placed in the specific slot; and determine the coordinate range of each detection image of the part to be tested as the position information of the detection image of each part to be tested based on the center point coordinates of each detection image of the part to be tested and the size of each detection image of the part to be tested.

[0073] Furthermore, when acquiring images of the parts to be tested, the extraction module 100 of the above embodiment is specifically used to: acquire images of the parts to be tested by photographing with an area array camera arranged on one side of the detection area of ​​the multiple parts to be tested; a surface light source with holes is arranged between the area array camera and the multiple parts to be tested.

[0074] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated again here.

[0075] Figure 3 It is a structural diagram of an electronic device shown in an embodiment of the present application.

[0076] See also Figure 3 , the electronic device includes a memory 200 and a processor 210.

[0077] The processor 210 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.

[0078] Memory 200 may include various types of storage units, such as system memory, read-only memory (ROM), and permanent storage. ROM may store static data or instructions required by processor 210 or other computer modules. Permanent storage may be a readable and writable storage device. Permanent storage may be a non-volatile storage device that retains stored instructions and data even when the computer is powered off. In some embodiments, the permanent storage device utilizes a mass storage device (e.g., a magnetic or optical disk, flash memory). In other embodiments, the permanent storage device may be a removable storage device (e.g., a floppy disk, optical drive). System memory may be a readable and writable storage device or a volatile readable and writable storage device, such as dynamic random access memory (DRAM). System memory may store some or all instructions and data required by the processor during operation. Furthermore, memory 200 may include any combination of computer-readable storage media, including various types of semiconductor memory chips (e.g., DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), as well as magnetic disks and / or optical disks. In some embodiments, the memory 200 may include a readable and / or writable removable storage device, such as a compact disc (CD), a read-only digital versatile disc (e.g., DVD-ROM, double-layer DVD-ROM), a read-only Blu-ray disc, an ultra-density optical disc, a flash memory card (e.g., SD card, mini SD card, Micro-SD card, etc.), a magnetic floppy disk, etc. Computer-readable storage media do not include carrier waves and transient electronic signals transmitted wirelessly or wired.

[0079] The memory 200 stores executable codes. When the executable codes are processed by the processor 210 , the processor 210 can execute part or all of the above-mentioned methods.

[0080] Another embodiment of the present application also provides a gasket assembly detection system. Figure 4 As shown, the gasket assembly detection system includes: A material box 300, the material box 300 includes a plurality of slots 301 and each slot 301 is used to place a part to be tested; an area array camera 310 and an area array light source 320 are arranged on one side of the detection area of ​​the part to be tested, the area array camera 310 is used to capture an image of the part to be tested through the hole on the area array light source 320; a processing device 330, the processing device 330 is electrically connected to the area array camera 310, and is used to obtain an image of the part to be tested, and extract a gasket image corresponding to the gasket area from the image of the part to be tested according to a template image; the template image is an image corresponding to the gasket area of ​​a part with qualified gasket assembly; based on the similarity between the gasket image and the template image, and the positional deviation between the center point of the gasket image and the center point of the template image, determine whether the gasket assembly is qualified. The processing device 330 is also used to execute some or all of the other methods mentioned above, which will not be described here.

[0081] It should be noted that Figure 4 In this embodiment, four area array cameras are provided to obtain clear images of all parts to be tested, and four corresponding holes are provided in the area array light source. This allows each area array camera to capture a corresponding image of the part to be tested through the hole in the area array light source. However, this is only an example and does not limit the number of area array cameras to four. The number of area array cameras and holes in the area array light source is determined to ensure that clear images of all parts to be tested in the magazine are captured.

[0082] The gasket assembly detection system provided in this embodiment belongs to the same application concept as the gasket assembly detection method provided in the above embodiments of this application, can execute the gasket assembly detection method provided in any of the above embodiments of this application, and has the corresponding functional modules and beneficial effects for executing the above gasket assembly detection method. The technical details that are not fully described in this embodiment can be referred to the specific processing content of the gasket assembly detection method provided in the above embodiments of this application, and will not be repeated here.

[0083] Furthermore, the method according to the present application may also be implemented as a computer program product, which includes computer program code instructions for executing some or all of the steps of the method described above. Optionally, the computer program may be stored on a computer-readable storage medium or in the cloud; the computer device's processor reads the computer program from the computer-readable storage medium or the cloud.

[0084] The computer program product may be written in any combination of one or more programming languages ​​to implement the program code of the embodiments of the present application, including object-oriented programming languages ​​such as Java, C++, and conventional procedural programming languages ​​such as C or similar programming languages. The program code may be executed entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0085] The computer program product may be implemented in hardware, software, or a combination thereof. In one embodiment, the computer program product is implemented as a computer storage medium. In another embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).

[0086] Alternatively, the present application can also be implemented as a computer-readable storage medium (or non-transitory machine-readable storage medium or machine-readable storage medium), which stores executable code (or computer program or computer instruction code) and, when executed by a processor of an electronic device (or server, etc.), enables the processor to perform part or all of the steps of the above-mentioned method according to the present application.

[0087] The computer-readable storage medium may be any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may include, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: an electrical connection having one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0088] The embodiments of the present application have been described above. The above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is selected to best explain the principles of the embodiments, their practical applications, or improvements to the technology in the market, or to enable other persons skilled in the art to understand the embodiments disclosed herein.

Claims

1. A gasket assembly detection method, characterized in that: include: Extracting a gasket image corresponding to the gasket area from the image of the part to be tested; Whether the gasket assembly of the part to be tested is qualified is determined based on the similarity between the gasket image and the template image, as well as the position deviation between the center point of the gasket image and the center point of the template image; wherein the template image is an image corresponding to the gasket area of ​​the part with qualified gasket assembly.

2. The gasket assembly detection method according to claim 1, characterized in that: The image of the part to be measured and the template image both include images obtained using at least two exposure values, and the exposure value used by the image of the part to be measured and the template image is the same; The determining whether the gasket assembly of the part to be tested is qualified based on the similarity between the gasket image and the template image, and the position deviation between the center point of the gasket image and the center point of the template image, includes: If the image similarity between the gasket image and the template image at each exposure value is greater than the set similarity, and the position deviation between the center point of the gasket image and the center point of the template image is less than the set deviation distance, it means that the gasket is assembled qualified.

3. The gasket assembly detection method according to claim 1, characterized in that: The step of extracting a gasket image corresponding to the gasket area from the image of the part to be measured includes: Extracting a detection image of a detection area of ​​the part to be tested from the image of the part to be tested; Controlling the template image to slide on the detection image, and intercepting a search image with the same size as the template image from the detection image after each slide; The similarity between the template image and each search image is calculated, and the search image corresponding to the highest similarity is selected as the gasket image.

4. The gasket assembly detection method according to claim 3, characterized in that: The step of extracting a detection image of a detection area of ​​the part to be tested from the image of the part to be tested comprises: Acquire an image of the part to be tested; the image of the part to be tested includes images corresponding to multiple parts to be tested in the same inspection batch; Based on the predetermined position information of the detection images of the parts to be tested, detection images of the detection areas of the parts to be tested are extracted from the images of the parts to be tested.

5. The gasket assembly detection method according to claim 4, characterized in that: The plurality of parts to be tested are placed in a material box, the material box includes a plurality of slots and each slot is used to place one of the parts to be tested, and the intervals between the slots are fixed; The process of determining the position information of the detection area of ​​each part to be tested includes: Determine the center point coordinates of the detection images of each part to be tested based on the spacing distance between adjacent parts to be tested, the number of parts to be tested that are spaced between each part to be tested and the specific slot, and the center point coordinates of the detection image of the part to be tested placed in the specific slot; According to the center point coordinates of each detection image of the part to be measured and the size of each detection image of the part to be measured, the coordinate range of each detection image of the part to be measured is determined as the position information of each detection image of the part to be measured.

6. The gasket assembly detection method according to claim 4, characterized in that: The step of obtaining an image of the part to be measured comprises: Images of the parts to be measured are acquired by photographing with an area array camera disposed on one side of the detection area of ​​the parts to be measured; a surface light source with holes is disposed between the area array camera and the parts to be measured.

7. A gasket assembly detection device, characterized in that: include: An extraction module, used for extracting a gasket image corresponding to the gasket area from the image of the part to be tested; A determination module is used to determine whether the gasket assembly of the part to be tested is qualified based on the similarity between the gasket image and the template image, and the position deviation between the center point of the gasket image and the center point of the template image; wherein the template image is an image corresponding to the gasket area of ​​the part with qualified gasket assembly.

8. An electronic device, characterized in that: include: processor; as well as A memory having executable codes stored thereon, which, when executed by the processor, causes the processor to execute the method according to any one of claims 1 to 6.

9. A gasket assembly detection system, characterized in that: include: A material box, wherein the material box comprises a plurality of slots and each slot is used to place a part to be tested; An area array camera and an area array light source are provided on one side of the detection area of ​​the part to be measured, wherein the area array camera is used to capture an image of the part to be measured through a hole in the area array light source; A processing device is used to obtain an image of the part to be tested, and extract a gasket image corresponding to the gasket area from the image of the part to be tested; based on the similarity between the gasket image and the template image, and the position deviation between the center point of the gasket image and the center point of the template image, determine whether the gasket assembly of the part to be tested is qualified; wherein the template image is an image corresponding to the gasket area of ​​a part with qualified gasket assembly.

10. A computer program product, characterized in that The computer program product comprises computer instructions, and when the computer instructions are executed by a processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Method and a device for correcting position of patch component

    CN111369505A

  • Method and system for detecting chips on charging tray, storage medium and intelligent terminal

    CN115656214A

  • Connector pin position deviation detection method

    CN116152147A

  • Defect detection method and apparatus, and electronic device, storage medium and computer program product

    WO2023087741A1