A method for detecting the dispensing status of product side
Through the tilted installation of CCD cameras and glue model recognition technology, the problems of low efficiency and poor stability in the detection of the side dispensing status of camera module products have been solved. Batch detection of the side dispensing status of products on the array carrier has been realized, improving the detection efficiency and stability.
Patent Information
- Application Number
- CN202510947140.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-10
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2045-07-10
AI Technical Summary
In the existing technology, when inspecting the side dispensing status of camera module products on an array carrier, there are problems such as low inspection efficiency, products easily becoming unqualified due to robot operation, unqualified products due to glue fluidity, and unstable robot grasping.
An inclined CCD camera is used to shoot the side view of the products on the array carrier. Through glue model recognition and image stitching, a test picture is generated, the glue area ratio and the number of qualified test frames are calculated, and the side glue dispensing status of the products can be batch tested.
It enables batch detection of the side dispensing status on the array carrier without removing the product, improves detection efficiency and stability, and avoids unqualified situations caused by external factors.
Smart Images

Figure CN120446141B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image data processing, in particular to glue dispensing line recognition of glue, and in particular to a method for detecting the glue dispensing status of a product side. Background Art
[0002] During the assembly of the camera module, glue needs to be dispensed on the sidewalls. Due to factors such as the tilt of the dispensing valve body and the fluidity of the liquid, the dispensing trajectory may fluctuate or the glue may become clogged, affecting the product yield and the next process.
[0003] In actual production, camera module products are usually placed horizontally on an array carrier in an array arrangement with small gaps between adjacent products. They are also easily blocked by each other, making it impossible to use a horizontally mounted CCD camera to perform side dispensing status detection on multiple products arranged on the array carrier.
[0004] Currently, multiple products placed on an array carrier are typically inspected individually by a horizontally mounted CCD camera. The steps for inspecting a single product using a horizontally mounted CCD camera are as follows: 1. A robot removes the individual product from the array carrier and places it in the inspection position; 2. The horizontally mounted CCD camera inspects the glue dispensing status on the product's side; 3. Products that pass inspection are returned to the array carrier for the next process step.
[0005] This inspection method has the following disadvantages: 1. After the side of the product is glued, there are fewer gripping points on the side for the robot to grasp, resulting in unstable grasping of the robot; 2. During the process of the robot transporting and placing the product to the inspection position, abnormal deviations or vibrations may occur when the product is placed, turning the originally qualified product into an unqualified product; 3. The product passes the inspection, but becomes unqualified due to the fluidity of the glue when the product is placed back on the array carrier; 4. The inspection efficiency is slow, which affects production efficiency. Summary of the Invention
[0006] The technical problem to be solved by the present invention is: the present invention provides a method for detecting the gluing status of the side of a product, which can batch detect whether the gluing status of the side of the product is qualified without grabbing the product.
[0007] To this end, the present invention provides a method for detecting the dispensing status of the side of a product, which can directly detect the product on an array carrier to avoid product failure caused by various external factors during the detection process.
[0008] The method for detecting the dispensing status of the side of a product according to an embodiment of the present invention comprises the following steps:
[0009] S1. Rotate the vertically mounted CCD camera to take a picture of the product placed horizontally on the array carrier at an inclined angle and synthesize the inspection picture;
[0010] S2. Identify the glue area in the detection image using the glue model, draw a detection line along the area where the glue dispensing status needs to be detected, and generate a detection frame that is arranged along and covers the glue area based on the detection line;
[0011] S3. Calculate the glue area ratio in each test frame based on the glue area in each test frame, and determine whether the product is qualified based on the glue area ratio in each test frame and the number of qualified test frames;
[0012] S4. Drive the CCD camera to move to another product position and repeat steps S1 to S3 until all products are inspected.
[0013] The beneficial effect of the present invention is that the method for detecting the side gluing status of a product of the present invention obtains a product photo by tilted shooting and image stitching, thereby avoiding removing the product from the array carrier, and judging whether the product is qualified by the glue area ratio and the number of qualified detection frames, thereby realizing batch detection of products on the array carrier.
[0014] According to one embodiment of the present invention, step S1 includes:
[0015] S11. The CCD camera is tilted relative to the side of the product and takes a first shot, generating Photo 1;
[0016] S12. The CCD camera moves along the z-axis to take a second picture of the side of the product, generating a second picture.
[0017] S13. Splice the first photo and the second photo to obtain a detection image.
[0018] According to one embodiment of the present invention, the photo stitching in step S13 includes the following steps:
[0019] S131. Move the CCD camera on the z-axis to the mechanical coordinates According to pixel equivalent , converted to the center y coordinate change of photo 1 and photo 2 , we can get ;
[0020] S132. Obtain the image size of photo 1 and photo 2 ;
[0021] S133. Generate an empty image, the size of which is ;
[0022] S134. Obtain the grayscale values of photo 1 and photo 2;
[0023] S135. Paste the photo 1 into the empty picture according to the original coordinates to obtain the picture 1;
[0024] S136. Generate the starting coordinates , the size is Get the coordinate set of all points in the rectangle, paste photo 2 into photo 1 according to the point coordinate set, and get the detection image.
[0025] According to one embodiment of the present invention, the generation of the glue model in step S2 includes the following steps:
[0026] S21. Preset product images;
[0027] S22. Click the desired area in the glue area of the product image;
[0028] S23. Click the background area of the product image that is not glued;
[0029] S24. Automatically generate a glue model and display the glue area;
[0030] S25. Configure the detection line and detection frame.
[0031] According to an embodiment of the present invention, in step S21 , different required areas are selected multiple times according to different glue colors.
[0032] According to an embodiment of the present invention, in step S22 , different background areas are selected multiple times according to different types of background areas.
[0033] According to one embodiment of the present invention, step S23 includes:
[0034] S231. Merge the required area into object 1;
[0035] S232. Merge the background area into object 2;
[0036] S233. Connect object 1 and object 2 into a set;
[0037] S234. Create an empty model and add the preset product images and collections to the empty model;
[0038] S235. Generate glue model after training empty model.
[0039] According to one embodiment of the present invention, step S25 includes:
[0040] S251. Draw a test line along the glue area;
[0041] S252. Set parameters of the detection box corresponding to the detection line.
[0042] According to an embodiment of the present invention, in step S251 , at least one detection line is drawn along the glue shape according to the glue shape and the type of glue in the glue area.
[0043] According to an embodiment of the present invention, in step S252 , the detection frame is arranged perpendicular to the glue line, and the measurement parameters of the measurement frame are adjusted according to the detection line so that the measurement frame covers the corresponding glue-shaped area.
[0044] According to one embodiment of the present invention, step S3 includes:
[0045] S31. Calculate the area A0 of a single measurement frame;
[0046] S32. Calculate the glue area within each measurement frame, A1, A2, A3...An;
[0047] S33. Calculate the glue area ratio of each measurement frame, p1=A1 / A0, p2=A2 / A0...pn=An / A0;
[0048] S34. Determine whether p1, p2, ...pn are within the qualified range [ps, pt].
[0049] Other features and advantages of the present invention will be described in the following description, and in part will become apparent from the description, or understood by practicing the present invention. The purposes and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.
[0050] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] The present invention will be further described below with reference to the accompanying drawings and examples.
[0052] Figure 1 Schematic diagram of the process of detecting the glue dispensing status of the side of a product according to the present invention;
[0053] Figure 2 This is a schematic diagram of the state where the CCD camera is tilted and moves twice along the Z direction to capture the product;
[0054] Figure 3 A diagram showing the results of testing that the product is qualified;
[0055] Figure 4 This is a graph showing the result of detecting that the product is low in glue;
[0056] Figure 5 This is a result display diagram showing that the product is detected to be glue overflow;
[0057] Figure 6 A schematic diagram of clicking the required area during the glue model generation process;
[0058] Figure 7 This is a schematic diagram of selecting the background area during the glue model generation process;
[0059] Figure 8 Schematic diagram showing the extracted glue area for the glue model;
[0060] Figure 9 This is a schematic diagram of configuring the detection line;
[0061] Figure 10 A schematic diagram of configuring the detection box. DETAILED DESCRIPTION
[0062] The present invention will now be described in further detail with reference to the accompanying drawings, which are simplified schematic diagrams that illustrate the basic structure of the present invention in a schematic manner.
[0063] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, features defined as "first" or "second" may explicitly or implicitly include one or more of such features. In the description of the present invention, unless otherwise specified, "multiple" means two or more.
[0064] In the description of the present invention, it should be noted that, unless otherwise expressly specified or limited, the terms "mounted," "connected," and "connected" should be understood in a broad sense. For example, they may refer to fixed, detachable, or integral connections; mechanical or electrical connections; direct or indirect connections through an intermediate medium; and internal communication between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on the specific circumstances.
[0065] like Figure 1 A method for detecting the dispensing status of a product side includes the following steps:
[0066] S1. Take a photo of the product from the side and synthesize the inspection picture.
[0067] Specifically, since the products are placed on the array carrier and the products are placed horizontally, the distance between the sides of adjacent products is small, and the distance is not enough to allow the CCD camera to be placed horizontally and shoot perpendicular to the side of the product. Therefore, in order to be able to detect the product directly on the array carrier, the CCD camera needs to be rotated to a certain angle to shoot the side of the product. However, due to the depth of field limitation of the CCD camera, a single side shot will cause the edge of the product photo to be blurred, resulting in inaccurate glue detection. Therefore, this application adopts two shots and splices the captured pictures to obtain a test picture of the product that can be tested.
[0068] The specific shooting steps are as follows:
[0069] S11. The CCD camera is tilted relative to the side of the product and takes a first shot, generating Photo 1;
[0070] S12. The CCD camera moves along the z-axis to take a second picture of the side of the product, generating a second picture.
[0071] S13. Splice photo 1 and photo 2 to obtain a detection image.
[0072] Preferably, Figure 2 As shown, the CCD camera of the present application is tilted at 45° relative to the side of the product when shooting, and the inspection picture is obtained by stitching the pictures taken on both sides.
[0073] Since the CCD camera takes two pictures at different positions on the z-axis, the centers of the pictures taken on both sides are also different. Therefore, the center difference of the two pictures needs to be calculated to stitch the pictures together. Specifically, the picture stitching in step S13 includes the following steps:
[0074] S131. Move the CCD camera on the z-axis to the mechanical coordinates According to pixel equivalent , converted to the center y coordinate change of photo 1 and photo 2 , we can get ;
[0075] S132. Obtain the image size of photo 1 and photo 2 ;
[0076] S133. Generate an empty image, the size of which is ;
[0077] S134. Obtain the grayscale values of photo 1 and photo 2;
[0078] S135. Paste the photo 1 into the empty picture according to the original coordinates to obtain the photo 1;
[0079] S136. Generate the starting coordinates , the size is Get the coordinate set of all points in the rectangle, paste photo 2 into photo 1 according to the point coordinate set, and get the detection image.
[0080] At this point, the test pictures of the product to be tested have been obtained, and it is only necessary to test the test pictures to determine whether the glue of the product is qualified.
[0081] The detection process is as follows:
[0082] S2. Use the glue model to identify the glue and background areas in the test image. Draw a test line along the area where the glue dispensing status needs to be tested. Based on the test line, a detection frame is generated that runs along and covers the glue area. The glue model is pre-generated based on qualified products, so it can quickly identify the test image of the product to be tested.
[0083] In this embodiment, the area where the glue dispensing status needs to be detected is the glue dispensing area. Of course, under different detection scenario requirements, the area where the glue dispensing status needs to be detected can also be an area on the side of the product where glue is not allowed to be present, and the detection method is the same as in this embodiment.
[0084] S3. Calculate the glue area ratio in each test frame based on the glue area in each test frame, and determine whether the product is qualified based on the glue area ratio in each test frame and the number of qualified test frames.
[0085] This embodiment uses a percentage detection algorithm to detect glue, which can ensure stable detection.
[0086] The specific detection steps are as follows:
[0087] S31. Calculate the area A0 of a single measurement frame;
[0088] S32. Calculate the glue area within each measurement frame, A1, A2, A3...An;
[0089] S33. Calculate the glue area ratio of each measurement frame, p1=A1 / A0, p2=A2 / A0...pn=An / A0;
[0090] S34. Determine whether p1, p2, ...pn are within the qualified range [ps, pt].
[0091] The structure of whether the product is qualified needs to be output according to the preset parameters in the glue model. The generation process of the glue model is described in detail below.
[0092] This embodiment eliminates the need for processing edge information and glue path width center points, resulting in greater stability. Applications are not limited to a single glue detection scenario, and can accommodate uneven glue paths. In addition to determining whether the glue area ratio is within a specified range, the system also checks the number and continuity of qualified detection frames, increasing practicality for specialized scenarios (e.g., allowing for localized glue narrowing).
[0093] Since only similar products exist in the same product, batch testing can be completed by simply generating glue models corresponding to the products. If different products need to be tested, different models can be generated.
[0094] Specifically, the process of generating the glue model is as follows:
[0095] S21. Preset product image. Directly take an image of a qualified product as the preset image. This embodiment is described using the illustrated product as an example.
[0096] S22. Click the desired area in the glue area of the product image. Figure 6 As shown, manually click the required area in the glue area of the product image. The clicked required area is automatically identified as the glue area. If there are glues of different colors, types, or sizes in the glue area, you need to click the required area.
[0097] S23. Click the background area in the non-glue area of the product image. Click different background areas multiple times according to different background area types, such as Figure 7 Select the background area and glue area and perform the same operation.
[0098] S24. Figure 8 As shown, based on the selected background area and required area, the glue model will be automatically generated and the glue area will be displayed.
[0099] Specifically, the process of generating the glue model is as follows:
[0100] S231. Merge all demand areas into object 1;
[0101] S232. Merge all background areas into object 2;
[0102] S233. Connect object 1 and object 2 into a set;
[0103] S234. Create an empty model and add the preset product images and collections to the empty model;
[0104] S235. Generate glue model after training empty model.
[0105] After generating the glue model, you need to generate corresponding detection lines and detection frames based on the glue area.
[0106] S25. Configure the detection line and detection frame.
[0107] Specifically, such as Figure 9 As shown in S251, a detection line is drawn along the glue area. Due to the shape of the glue, the automatic drawing by the software cannot obtain an accurate detection line, resulting in the inability to configure the detection frame later, and thus the inability to detect the glue.
[0108] As shown in the figure, three test lines are drawn manually along the glue area. The test lines are drawn in three steps, and the parameters can be reset each time according to the type of glue.
[0109] S252. Figure 10 , set the parameters of the detection box corresponding to the detection line.
[0110] The detection box includes the following parameters:
[0111] Measurement Step: The interval between generated detection frames. Measurement Width: The width of the generated detection frame. Measurement Height: The height of the generated detection frame. Upper Percentage: The maximum percentage of glue allowed within each detection frame. Lower Percentage: The minimum percentage of glue required within each detection frame. Number of Repeats for Overfill: The number of consecutive measurement rectangles allowed to exceed the upper percentage limit. Number of Repeats for Underfill: The number of consecutive measurement rectangles allowed to fall below the lower percentage limit.
[0112] Specifically, when the number of repeats allowed for glue overflow or glue deficiency is set to 0, glue overflow or glue deficiency is not allowed in all inspection frames. If glue overflow or glue deficiency occurs in any inspection frame, the product is unqualified. When the number of repeats allowed for glue overflow or glue deficiency is set to 1, glue deficiency or glue overflow is allowed in one inspection frame. If glue overflow or glue deficiency occurs in two or more consecutive inspection frames, the product is unqualified. When the number of repeats allowed for glue overflow or glue deficiency is set to 2, glue deficiency or glue overflow is allowed in two consecutive inspection frames. If glue overflow or glue deficiency occurs in two or more consecutive inspection frames, the product is unqualified.
[0113] Specifically, the measurement step between detection frames can be adjusted according to detection requirements. There may be a spacing between detection frames, or there may be no spacing between them. There may even be partial overlap between adjacent detection frames.
[0114] After configuring the inspection frame, it is automatically generated according to the configured parameters. The inspection frame is arranged perpendicular to the glue line, and the measurement parameters of the measurement frame are adjusted according to the inspection line so that the measurement frame covers the corresponding glue area. The user can determine whether the inspection frame meets the requirements based on the position of the inspection frame and the glue area. If it does not meet the requirements, the parameters can be adjusted again until the generated inspection frame meets the inspection requirements.
[0115] At this point, the parameter configuration is completed and the product can be tested. The testing process is as follows: Figure 1 As shown:
[0116] The CCD camera first captures a side view of the product. The camera then moves along the z-axis and captures a second side view of the product. Following the same process, the images are stitched together to create a test image. The image is then identified using the glue model. If the glue passes the test, the image displays "Pass." If it fails, the image displays "Glue is missing" or "Glue is overflowing," and an alarm is issued. The CCD camera then moves to inspect the next product until all products are inspected.
[0117] like Figure 3 As shown, the product is qualified. Figure 4 As shown, this product has less glue. Figure 5 As shown, the product has glue overflow.
[0118] Throughout this specification, reference to terms such as "one embodiment," "some embodiments," "illustrative embodiments," "examples," "specific examples," or "some examples" means that a specific feature, structure, material, or characteristic described in conjunction with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, illustrative uses of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
[0119] The above description is intended to serve as a guide for the preferred embodiments of the present invention. Based on the above description, relevant personnel are fully capable of making various changes and modifications without departing from the technical scope of the present invention. The technical scope of the present invention is not limited to the contents of the specification and must be determined according to the scope of the claims.
Claims
1. A method for detecting the dispensing status of a product side, characterized in that: The following steps are involved: S1. Rotate the vertically mounted CCD camera to shoot the product horizontally placed on the array carrier at an oblique angle; The step S1 includes: S11. The CCD camera tilts toward the side of the product and takes the first shot, generating photo 1; S12. The CCD camera moves along the z-axis to take a second picture of the side of the product, generating a second picture. S13. Combine photos 1 and 2 to obtain a detection image; S2. Identify the glue area in the detection image using the glue model, draw a detection line along the area where the glue dispensing status needs to be detected, and generate a detection frame that is arranged along and covers the glue area based on the detection line; The generation of the glue model in step S2 includes the following steps: presetting a product image, selecting a desired area and a background area in the product image, connecting the desired area and the background area into a set, adding the pre-set product image and the set to an empty model, and training the empty model to obtain the glue model; S3. Calculate the glue area ratio in each test frame based on the glue area in each test frame, and determine whether the product is qualified based on the glue area ratio in each test frame and the number of qualified test frames; S4. Drive the CCD camera to move to another product position and repeat steps S1 to S3 until all products are inspected.
2. The method for detecting the glue dispensing status of the product side according to claim 1, characterized in that: The photo stitching in step S13 includes the following steps: S131. Move the CCD camera on the z-axis to the mechanical coordinates According to pixel equivalent , converted to the center y coordinate change of photo 1 and photo 2 , we can get ; S132. Obtain the image size of photo 1 and photo 2 ; S133. Generate an empty image, the size of which is ; S134. Obtain the grayscale values of photo 1 and photo 2; S135. Paste the photo 1 into the empty picture according to the original coordinates to obtain the picture 1; S136. Generate the starting coordinates , the size is Get the coordinate set of all points in the rectangle, paste photo 2 into photo 1 according to the point coordinate set, and get the detection image.
3. The method for detecting the glue dispensing status of the product side according to claim 1, characterized in that: The generation of the glue model in step S2 includes the following steps: S21. Preset product images; S22. Click the desired area in the glue area of the product image; S23. Click the background area of the product image that is not glued; S24. Automatically generate a glue model and display the glue area; S25. Configure the detection line and detection frame.
4. The method for detecting the glue dispensing status of the product side according to claim 3, characterized in that: In step S21 , different required areas are selected multiple times according to different glue colors.
5. The method for detecting the glue dispensing status of the product side according to claim 3, characterized in that: In step S22 , different background areas are selected multiple times according to different background area types.
6. The method for detecting the glue dispensing status of the product side according to claim 3, characterized in that: The step S23 includes: S231. Merge the required area into object 1; S232. Merge the background area into object 2; S233. Connect object 1 and object 2 into a set; S234. Create an empty model and add the preset product images and collections to the empty model; S235. Generate glue model after training empty model.
7. The method for detecting the glue dispensing status of the product side according to claim 6, characterized in that: The step S25 includes: S251. Draw a test line along the area where the glue dispensing status needs to be tested; S252. Set parameters of the detection box corresponding to the detection line.
8. The method for detecting the glue dispensing status of the product side according to claim 7, characterized in that: In step S251 , at least one detection line is drawn along the glue shape according to the glue shape and the type of glue in the glue area.
9. The method for detecting the glue dispensing status of the product side according to claim 7, characterized in that: In step S252 , the detection frame is arranged perpendicular to the glue line, and the measurement parameters of the measurement frame are adjusted according to the detection line so that the measurement frame covers the corresponding glue-shaped area.
10. The method for detecting the glue dispensing status of the product side according to claim 1, characterized in that: The step S3 includes: S31. Calculate the area A0 of a single measurement frame; S32. Calculate the glue area within each measurement frame, A1, A2, A3...An; S33. Calculate the glue area ratio of each measurement frame, p1=A1 / A0, p2=A2 / A0...pn=An / A0; S34. Determine whether p1, p2, ...pn are within the qualified range [ps, pt].
Citation Information
Patent Citations
Linear glue dispensing quality detection device for loudspeaker diaphragm
CN106101976A
Glue line defect detection method based on machine vision
CN113340909A