Optical device dispensing calibration method and system

By collecting the dispensing image of the optical device and performing edge extraction and fitting circle calculations, the problem of untimely and inefficient dispensing of optical devices is solved, real-time quality feedback and calibration of the dispensing of optical devices is achieved, and the calibration timeliness and efficiency is improved.

CN120079561BActive Publication Date: 2025-08-08CHENGDU GUANGCHUANGLIAN CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510571521.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-06
Publication Date
2025-08-08
Estimated Expiration
2045-05-06

AI Technical Summary

Technical Problem

In the prior art, optical device dispensing is not timely and the calibration efficiency is low, resulting in waste of materials and working hours.

Method used

By collecting the dispensing image of the device to be bonded, pre-processing, edge extraction and fitting circle calculations, the center coordinates and radius of the final fitting circle are obtained, and the dispensing movement coordinates and duration are calibrated based on deviation.

Benefits of technology

Real-time quality feedback and calibration of optical device dispensing is achieved, significantly improving the timeliness and efficiency of calibration, and reducing material and labor time waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120079561B_ABST
    Figure CN120079561B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for calibrating the dispensing of optical devices, belonging to the field of optical device bonding technology. The present invention collects a dispensing image of the device to be bonded and performs preprocessing to obtain a preprocessed image; marks the glue point image in the preprocessed image and performs edge extraction on the glue point image to obtain edge pixel points of the glue point image; calculates a fitting circle based on the edge pixel points to obtain the center coordinates and radius of the final fitting circle; calibrates the dispensing movement coordinates based on the deviation between the center coordinates of the final fitting circle and the center coordinates of a preset standard circle; and calibrates the dispensing duration based on the deviation between the radius of the final fitting circle and the radius of the preset standard circle. The present invention can effectively improve the timeliness and efficiency of dispensing calibration as a whole.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of optical device bonding, and in particular to an optical device glue dispensing calibration method and system. Background Art

[0002] During the production of optical components, two parts must be bonded together using adhesive bonding. To ensure bonding quality, the process typically involves manually checking the amount and position of the adhesive after bonding is complete. Based on the inspection results, the dispensing equipment parameters are adjusted to calibrate the amount and position of the adhesive. Because this inspection is performed after the process is complete, if the amount and position of the adhesive are found to be substandard, this results in wasted work time and materials.

[0003] It can be seen that since the dispensing quality cannot be fed back in real time and automatic calibration cannot be achieved, the relevant technology has technical problems such as untimely dispensing calibration and low calibration efficiency. Summary of the Invention

[0004] The main purpose of the present invention is to provide a method and system for calibrating the dispensing of optical devices, aiming to solve the technical problems in the related art of untimely dispensing calibration and low calibration efficiency.

[0005] To achieve the above object, the present invention provides a method for dispensing and calibrating an optical device, the method comprising the following steps:

[0006] S1, collecting the dispensing image of the device to be bonded and preprocessing it to obtain a preprocessed image;

[0007] S2, marking the glue point image in the pre-processed image, and performing edge extraction on the glue point image to obtain edge pixel points of the glue point image;

[0008] S3, performing fitting circle calculation based on the edge pixel points to obtain the center coordinates and radius of the final fitting circle;

[0009] S4, based on the deviation between the center coordinates of the final fitting circle and the center coordinates of the preset standard circle, calibrate the dispensing movement coordinates; based on the deviation between the radius of the final fitting circle and the radius of the preset standard circle, calibrate the dispensing duration.

[0010] In addition, to achieve the above-mentioned purpose, the present invention also provides an optical device dispensing calibration system, the system comprising:

[0011] An image acquisition module is used to acquire the dispensing image of the device to be bonded and perform preprocessing to obtain a preprocessed image;

[0012] An edge extraction module is used to mark the glue point image in the pre-processed image and perform edge extraction on the glue point image to obtain edge pixel points of the glue point image;

[0013] A fitting calculation module is used to calculate the fitting circle based on the edge pixel points to obtain the center coordinates and radius of the final fitting circle;

[0014] The dispensing calibration module is used to calibrate the dispensing movement coordinates based on the deviation between the center coordinates of the final fitting circle and the center coordinates of the preset standard circle; and to calibrate the dispensing duration based on the deviation between the radius of the final fitting circle and the radius of the preset standard circle.

[0015] The present invention collects glue-dispensing images of the components to be bonded and extracts edge pixel points from the glue-dispensing images within the images, enabling timely acquisition of glue-dispensing quality information for the components to be bonded. Based on this, a fitting circle is calculated based on the edge pixel points to obtain the center coordinates and radius of the final fitting circle. This allows for quantification of the glue-dispensing quality, and allows for timely calibration of the glue-dispensing movement coordinates and duration based on the deviation of the final fitting circle's center coordinates and radius from those of a preset standard circle. Therefore, the present invention can effectively improve the timeliness and efficiency of glue-dispensing calibration overall. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 This is a flow chart of an embodiment of a method for dispensing and calibrating an optical device according to the present invention;

[0017] Figure 2 A schematic diagram of a detailed flow chart of an embodiment of a method for dispensing and calibrating an optical device according to the present invention;

[0018] Figure 3 Schematic diagram of the fitting circle calculation process of an embodiment of the optical device dispensing calibration method of the present invention.

[0019] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION

[0020] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0021] The inventive concept of the present application is further described below with reference to some specific embodiments and implementation methods.

[0022] The embodiment of the present invention provides a method for calibrating optical device dispensing glue, referring to Figure 1 , Figure 1 The figure is a flow chart of a first embodiment of a method for dispensing and calibrating an optical device according to the present invention.

[0023] In this embodiment, the optical device dispensing calibration method includes:

[0024] Step S1: collecting a glue dispensing image of the device to be bonded and performing preprocessing to obtain a preprocessed image.

[0025] like Figure 2 As shown, step S1 specifically includes the following steps:

[0026] Step S11: Use an industrial camera to photograph the components to be bonded after dispensing glue to obtain a dispensing image.

[0027] Step S12: Using the ROI region extraction method, a rectangular region containing the glue dot image in the glue dispensing image is intercepted to obtain a pre-processed image.

[0028] In the entire step S1, by timely collecting the dispensing images of the devices to be bonded during the bonding process, it is beneficial to timely obtain the quality information of the dispensing process and provide feedback to calibrate the dispensing equipment, thereby avoiding dispensing quality problems in a large number of devices after bonding due to feedback lag, greatly reducing material waste and labor time waste.

[0029] Step S2: Mark the glue point image in the pre-processed image, and perform edge extraction on the glue point image to obtain edge pixel points of the glue point image.

[0030] Continue to refer to Figure 2 , the step S2 specifically includes the following steps:

[0031] Step S21: Smoothing the pre-processed image through a Gaussian filter to highlight the edge information of the glue point image and obtain a smoothed image.

[0032] The step S21 specifically includes the following steps:

[0033] Step S21-1: Create a 3×3 filter template. The coordinates of the filter template are set as follows:

[0034] ;

[0035] Step S21 - 2 : Using a Gaussian function to calculate the weight value of each coordinate point in the filter template to obtain a Gaussian convolution kernel.

[0036] The Gaussian function is:

[0037] ;

[0038] in, Indicates coordinate points The weight value of Represents the standard deviation of the Gaussian function, which controls the degree of blur. The larger the value, the stronger the blur effect.

[0039] For example, take Equal to 1, the following Gaussian convolution kernel can be obtained:

[0040] ;

[0041] Step S21 - 3 : Using a Gaussian convolution kernel to perform convolution processing on the pre-processed image to obtain a smoothed image.

[0042] In the entire step S21, the preprocessed image is smoothed by a Gaussian filter, which can smooth the noise and details in the preprocessed image, reduce the interference of noise and details on the edge information of the glue point image, and facilitate the accurate extraction of edge pixels of the glue point image, thereby improving the recognition accuracy of the glue point image contour.

[0043] Step S22: Mark the glue point image in the smooth image as a foreground target, and use the GrabCut algorithm to segment the smooth image to obtain a segmented image with optimal foreground and background segmentation.

[0044] Step S23: Use the Canny edge algorithm to process the segmented image to obtain edge pixels of the glue point image.

[0045] The step S23 specifically includes the following steps:

[0046] Step S23 - 1 : Process the segmented image using a gradient calculation tool to obtain a gradient image.

[0047] Step S23-2: Use the non-maximum suppression method to detect the edge of the glue point image in the gradient image along the gradient direction, delete non-edge pixels, and retain edge pixels.

[0048] Step S23-3: Use the dual threshold detection method to divide the edge pixels into strong edge pixels and weak edge pixels, discard the isolated weak edge pixels, retain the strong edge pixels and the weak edge pixels connected to the strong edge pixels, and obtain the edge pixel points of the glue point image.

[0049] In the entire step S23, the edge pixel points of the glue dot image are accurately extracted through the Canny edge algorithm, so that the contour information of the glue dot image can be obtained more accurately, which is conducive to accurate feedback of the glue dispensing quality.

[0050] Step S3: Calculate the fitted circle based on the edge pixels to obtain the center coordinates and radius of the final fitted circle.

[0051] Continue to refer to Figure 2 , the step S3 specifically includes the following steps:

[0052] Step S31: Divide every two pixels in the 8-neighborhood of the edge pixels into an edge chain until all edge pixels are divided, remove edge chains with less than 20 pixels, and obtain multiple groups of edge chains.

[0053] Step S32: traverse each group of edge chains, perform fitting circle calculation based on the edge pixel points in each group of edge chains, and obtain the center coordinates and radius of the final fitting circle.

[0054] like Figure 3 As shown, the step S32 specifically includes the following steps:

[0055] Step S32 - 1 : Traverse all edge chains and arbitrarily select a group of unfitted edge chains as target edge chains.

[0056] Step S32 - 2 : Set the initial value of the number of fitting points N to 20.

[0057] Step S32-3: traverse the pixel points on the target edge chain and arbitrarily select a pixel point as the target pixel point.

[0058] Step S32-4: Select N-1 pixels closest to the target pixel from the target edge chain, and form a fitting point together with the target pixel.

[0059] Step S32-5: Based on the fitting points, a fitting circle is calculated using a fitting calculation formula to obtain a first fitting circle and the coordinates of the center and radius of the first fitting circle:

[0060] ;

[0061] in, Represents the horizontal coordinate of the i-th fitting point corresponding to the first fitting circle; Indicates the ordinate of the i-th fitting point corresponding to the first fitting circle; Indicates the abscissa of the center of the first fitted circle; Indicates the ordinate of the center of the first fitted circle; represents the radius of the first fitting circle; C, D, F, a, b, and c represent intermediate variables in the calculation and have no practical meaning.

[0062] Step S32-6: Based on the center coordinates and radius of the first fitting circle, determine whether the first fitting circle is reasonable; if not, discard the first fitting circle; if reasonable, save the first fitting circle and calculate the average error of the first fitting circle.

[0063] Specifically, the criteria for judging whether the first fitting circle is reasonable are as follows:

[0064] or or ;

[0065] in, Indicates the horizontal coordinate of the center of the preset standard circle; Indicates the vertical coordinate of the center of the preset standard circle; Indicates the radius of the preset standard circle; Indicates the adjustment threshold of the horizontal coordinate deviation of the circle center; Indicates the adjustment threshold of the vertical coordinate deviation of the circle center; Indicates the radius deviation adjustment threshold.

[0066] That is, when any one of the abscissa, ordinate, and radius of the first fitting circle meets the above judgment condition, the first fitting circle is considered unreasonable.

[0067] The formula for calculating the average error of the first fitting circle is:

[0068] .

[0069] Step S32-7: The number of fitting points N is incremented by one, and the process returns to step S32-3 until all pixel points on the target edge chain are traversed to obtain multiple first fitting circles and corresponding average errors.

[0070] Step S32-8: Selecting a first fitting circle with the smallest average error from the multiple first fitting circles as the second fitting circle.

[0071] Return to step S32 - 2 and execute until the number of fitting points N is greater than the total number of pixel points in the target edge chain, and obtain multiple second fitting circles and corresponding average errors.

[0072] Step S32-9: record the minimum average error among the multiple second fitting circles as Emin, and select the second fitting circle with an average error between Emin and 1.2Emin and the largest number of fitting points N from the multiple second fitting circles as the third fitting circle.

[0073] Return to step S32 - 1 until all edge chains are traversed to obtain multiple third fitting circles.

[0074] Step S32 - 10 : Selecting the third fitting circle with the largest number of fitting points N from the multiple third fitting circles as the final fitting circle, and obtaining the center coordinates and radius of the final fitting circle.

[0075] It's worth noting that the final fitted circle is the one that most closely matches the outline of the glue dot image. The coordinates of the center of the final fitted circle are also the center coordinates of the glue dot image, representing the location coordinates of the glue dispenser. The radius of the final fitted circle reflects the area of the glue dot image, which in turn reflects the amount of glue dispensed. Therefore, the radius of the final fitted circle indirectly reflects the duration of the glue dispense. Therefore, the center coordinates and radius of the final fitted circle can best reflect the glue dispense quality.

[0076] In the entire step S32, through the nested loop structure, each edge pixel point of the glue dot image is fully utilized to calculate the fitting circle, and then the optimization operation is performed based on the average error of the fitting circle. The final fitting circle closest to the actual contour of the glue dot image can be obtained, which significantly improves the fitting accuracy of the fitting circle calculation, thereby enabling more accurate feedback and quantification of the dispensing quality.

[0077] Step S4: based on the deviation between the center coordinates of the final fitting circle and the center coordinates of the preset standard circle, calibrate the dispensing movement coordinates; based on the deviation between the radius of the final fitting circle and the radius of the preset standard circle, calibrate the dispensing duration.

[0078] Specifically, if the center coordinates and radius of the final fitted circle meet the following conditions at the same time, there is no need to calibrate the dispensing movement coordinates and dispensing duration. Otherwise, calibrate the dispensing movement coordinates based on the deviation of the center coordinates or calibrate the dispensing duration based on the deviation of the radius:

[0079] ;

[0080] in, Indicates the qualified threshold value of the horizontal coordinate deviation of the center of the circle, Less than ; Indicates the qualified threshold value of the deviation of the vertical coordinate of the center of the circle, Less than ; Indicates the radius deviation qualified threshold, Less than .

[0081] In this embodiment, by capturing a glue-dispensing image of the device to be bonded and extracting edge pixel points from the glue-dispensing image within the image, timely information on the glue-dispensing quality of the device to be bonded can be obtained. Based on this information, a fitting circle is calculated based on the edge pixel points to obtain the center coordinates and radius of the final fitting circle. This allows for quantification of the glue-dispensing quality. Based on the deviation of the center coordinates and radius of the final fitting circle from those of the preset standard circle, the glue-dispensing movement coordinates and duration can be calibrated in a timely manner. Therefore, the present invention can effectively improve the timeliness and efficiency of glue-dispensing calibration as a whole.

[0082] Furthermore, to achieve the above-mentioned purpose, the present invention also provides an optical device dispensing calibration system, which may include.

[0083] An image acquisition module is used to acquire the dispensing image of the device to be bonded and perform preprocessing to obtain a preprocessed image;

[0084] An edge extraction module is used to mark the glue point image in the pre-processed image and perform edge extraction on the glue point image to obtain edge pixel points of the glue point image;

[0085] A fitting calculation module is used to calculate the fitting circle based on the edge pixel points to obtain the center coordinates and radius of the final fitting circle;

[0086] The dispensing calibration module is used to calibrate the dispensing movement coordinates based on the deviation between the center coordinates of the final fitting circle and the center coordinates of the preset standard circle; and to calibrate the dispensing duration based on the deviation between the radius of the final fitting circle and the radius of the preset standard circle.

[0087] It should be noted that the functions that can be realized by each module in the optical device dispensing calibration system provided in this embodiment and the corresponding technical effects achieved can refer to the description of the specific implementation methods in each embodiment of the optical device dispensing calibration method of the present invention. For the sake of brevity of the specification, they will not be repeated here.

[0088] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.

[0089] The above are only preferred embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention description and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for dispensing and calibrating an optical device, characterized in that: The method comprises the following steps: S1, collecting the dispensing image of the device to be bonded and preprocessing it to obtain a preprocessed image; S2, marking the glue point image in the pre-processed image, and performing edge extraction on the glue point image to obtain edge pixel points of the glue point image; S3, performing fitting circle calculation based on the edge pixel points to obtain the center coordinates and radius of the final fitting circle; The S3 specifically includes: S31, dividing every two pixels in an 8-neighborhood of the edge pixels into an edge chain, until all edge pixels are divided, removing edge chains with less than 20 pixels, and obtaining multiple groups of edge chains; S32, traversing each set of edge chains, performing fitting circle calculation based on edge pixel points in each set of edge chains, and obtaining the center coordinates and radius of the final fitting circle; The S32 specifically includes: S32-1, traverse all edge chains and arbitrarily select a group of unfitted edge chains as target edge chains; S32-2, setting the initial value of the number of fitting points N to 20; S32-3, traverse the pixel points on the target edge chain and arbitrarily select a pixel point as the target pixel point; S32-4, selecting N-1 pixel points closest to the target pixel point from the target edge chain, and forming a fitting point together with the target pixel point; S32-5, based on the fitting points, performing fitting circle calculation using a fitting calculation formula to obtain a first fitting circle and the coordinates of the center and radius of the first fitting circle; S32-6, judging whether the first fitted circle is reasonable based on the center coordinates and radius of the first fitted circle; if not, discarding the first fitted circle; if reasonable, saving the first fitted circle and calculating an average error of the first fitted circle; S32-7, the number of fitting points N is incremented by one, and the process returns to S32-3 until all pixel points on the target edge chain are traversed to obtain a plurality of first fitting circles and corresponding average errors; S32-8, selecting the first fitting circle with the smallest average error from the plurality of first fitting circles as the second fitting circle; returning to S32-2 and executing until the number of fitting points N is greater than the total number of pixels in the target edge chain, obtaining a plurality of second fitting circles and their corresponding average errors; S32-9, record the minimum average error among the plurality of second fitting circles as Emin, select a second fitting circle with an average error between Emin and 1.2Emin and the largest number of fitting points N from the plurality of second fitting circles as a third fitting circle; return to S32-1 and execute until all edge chains are traversed to obtain a plurality of third fitting circles; S32-10, selecting a third fitting circle with the largest number of fitting points N from the plurality of third fitting circles as a final fitting circle, and obtaining the center coordinates and radius of the final fitting circle; S4, based on the deviation between the center coordinates of the final fitting circle and the center coordinates of the preset standard circle, calibrate the dispensing movement coordinates; based on the deviation between the radius of the final fitting circle and the radius of the preset standard circle, calibrate the dispensing duration.

2. The optical device dispensing calibration method according to claim 1, wherein: Said S1 specifically includes: S11, using an industrial camera to photograph the components to be bonded after dispensing glue to obtain a dispensing image; S12, using a ROI region extraction method, intercepting a rectangular region containing the glue dot image in the glue dispensing image to obtain a preprocessed image.

3. The optical device dispensing calibration method according to claim 1, wherein: The S2 specifically includes: S21, smoothing the pre-processed image using a Gaussian filter to highlight edge information of the glue point image to obtain a smoothed image; S22, marking the glue point image in the smoothed image as a foreground target, and performing segmentation processing on the smoothed image using the GrabCut algorithm to obtain a segmented image with optimal foreground and background segmentation; S23, using the Canny edge algorithm to process the segmented image to obtain edge pixels of the glue point image.

4. The optical device dispensing calibration method according to claim 3, characterized in that: The S21 specifically includes: S21-1, establish a 3×3 filter template, and set the coordinate points of the filter template as follows: ; S21-2, using a Gaussian function to calculate the weight value of each coordinate point in the filter template to obtain a Gaussian convolution kernel; S21-3, using the Gaussian convolution kernel to perform convolution processing on the preprocessed image to obtain the smoothed image.

5. The optical device dispensing calibration method according to claim 3, wherein: The S23 specifically includes: S23-1, using a gradient calculation tool to process the segmented image to obtain a gradient image; S23-2, using a non-maximum suppression method to detect the edge of the glue point image in the gradient image along the gradient direction, deleting non-edge pixels and retaining edge pixels; S23-3: Use a dual threshold detection method to divide the edge pixels into strong edge pixels and weak edge pixels, discard isolated weak edge pixels, retain strong edge pixels and weak edge pixels connected to strong edge pixels, and obtain edge pixel points of the glue point image.

6. An optical device dispensing calibration system, characterized in that: The system comprises: An image acquisition module is used to acquire the dispensing image of the device to be bonded and perform preprocessing to obtain a preprocessed image; An edge extraction module is used to mark the glue point image in the pre-processed image and perform edge extraction on the glue point image to obtain edge pixel points of the glue point image; A fitting calculation module is used to calculate the fitting circle based on the edge pixel points to obtain the center coordinates and radius of the final fitting circle; The dispensing calibration module is used to calibrate the dispensing movement coordinates based on the deviation between the center coordinates of the final fitting circle and the center coordinates of the preset standard circle; and to calibrate the dispensing duration based on the deviation between the radius of the final fitting circle and the radius of the preset standard circle; The fitting calculation module is specifically configured to divide every two pixels within an 8-neighborhood of the edge pixels into an edge chain until all edge pixels are divided, remove edge chains with less than 20 pixels, and obtain multiple groups of edge chains; traverse each group of edge chains, perform fitting circle calculation based on the edge pixels in each group of edge chains, and obtain the center coordinates and radius of the final fitting circle; The steps of traversing each set of edge chains, performing fitting circle calculation based on edge pixel points in each set of edge chains, and obtaining the center coordinates and radius of the final fitting circle specifically include: Traverse all edge chains and arbitrarily select a set of unfitted edge chains as target edge chains; Set the initial value of the number of fitting points N to 20; Traverse the pixel points on the target edge chain and arbitrarily select a pixel point as the target pixel point; Then, N-1 pixels closest to the target pixel are selected from the target edge chain to form a fitting point together with the target pixel; Based on the fitting points, a fitting circle calculation is performed using a fitting calculation formula to obtain a first fitting circle and the coordinates of the center and radius of the first fitting circle; Judging whether the first fitting circle is reasonable based on the center coordinates and radius of the first fitting circle; if it is unreasonable, discarding the first fitting circle; if it is reasonable, saving the first fitting circle and calculating the average error of the first fitting circle; The number of fitting points N is incremented by one, and the step of traversing the pixel points on the target edge chain and arbitrarily selecting a pixel point as the target pixel point is returned to the step until all pixel points on the target edge chain are traversed to obtain a plurality of first fitting circles and corresponding average errors; Selecting the first fitting circle with the smallest average error from the plurality of first fitting circles as the second fitting circle; returning to the step of setting the initial value of the number of fitting points N to 20 until the number of fitting points N is greater than the total number of pixels in the target edge chain, thereby obtaining a plurality of second fitting circles and their corresponding average errors; The minimum average error among the plurality of second fitting circles is recorded as Emin, and a second fitting circle with an average error between Emin and 1.2Emin and the largest number of fitting points N is selected from the plurality of second fitting circles as a third fitting circle; returning to the step of traversing all edge chains and arbitrarily selecting a group of unfitted edge chains as target edge chains, until all edge chains are traversed and a plurality of third fitting circles are obtained; From the multiple third fitting circles, the third fitting circle with the largest number of fitting points N is selected as the final fitting circle, and the center coordinates and radius of the final fitting circle are obtained.

Citation Information

Patent Citations

  • Image enhancement and feature extraction method for automatic welding

    CN115147448A

  • Dotted glue edge detection method and application thereof

    CN115861273A

  • Dispensing method and dispensing equipment

    CN116351666A

  • Printing cement packaging bag image registration method and system

    CN118365680A