CN-117075286-B - Lens dispensing method and device
Abstract
The invention discloses a lens dispensing method and device. The lens dispensing method comprises the steps of calibrating the image acquisition device to obtain a coordinate conversion relation between pixel coordinates and actual world coordinates, calibrating the distance between the rotation center of the bent dispensing needle and the calibration point of the image acquisition device to obtain distance information, calibrating to obtain the rotation radius of the bent dispensing needle, acquiring a lens image of a lens to be dispensed acquired by the image acquisition device, determining the world coordinates of the circle center of the lens to be dispensed based on the lens image, acquiring the radius of a glue groove of the lens to be dispensed, and controlling the movement device to drive the bent dispensing needle to perform X, Y, Z, W four-axis interpolation dispensing movement based on the radius of the glue groove, the world coordinates of the circle center of the lens, the rotation radius of the bent dispensing needle and the distance information. By adopting the scheme, the effects of being compatible with internal and external dispensing, being compatible with dispensing of products with different radiuses and being convenient to debug are achieved.
Inventors
- TIAN XINRUI
- GAO YUN
- FENG SHUANG
- YAN KAI
- LI WEI
- You Yafan
Assignees
- 东莞市宇瞳光学科技股份有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20221021
Claims (10)
- 1. The lens dispensing method is used for lens dispensing equipment and comprises an image acquisition device, a motion device, a dispensing needle head and a processing device, wherein the image acquisition device is used for acquiring images, the motion device comprises an X-axis motion assembly, a Y-axis motion assembly, a Z-axis motion assembly and a W-axis motion assembly, the W-axis motion assembly is used for driving the dispensing needle head to rotate, the X-axis motion assembly, the Y-axis motion assembly and the Z-axis motion assembly are respectively used for driving the dispensing needle head to move along the X-axis, the Y-axis and the Z-axis, the dispensing needle head is used for dispensing, the dispensing needle head can be bent, and the processing device is electrically connected with the image acquisition device, the motion device and the dispensing needle head, and is characterized in that the lens dispensing method comprises the following steps: calibrating the image acquisition device to obtain a coordinate conversion relation between pixel coordinates and actual world coordinates; Calibrating the distance between the rotating center of the bent dispensing needle head and the calibrating point of the image acquisition device based on the coordinate conversion relation to obtain distance information between the rotating center and the calibrating point; calibrating the rotating radius of the bent dispensing needle to obtain the rotating radius of the bent needle; acquiring a lens image of the lens to be dispensed acquired by the image acquisition device; Determining world coordinates of a lens center of the lens to be dispensed based on the lens image; Acquiring the radius of a glue groove of a lens to be dispensed; And controlling the moving device to drive the bent dispensing needle to perform X, Y, Z, W four-axis interpolation dispensing movement for dispensing based on the radius of the glue groove, the world coordinates of the circle center of the lens, the rotating radius of the bent needle and the interval information.
- 2. The lens dispensing method according to claim 1, wherein said calibrating the image capturing device to obtain the coordinate conversion relation between the pixel coordinates and the real world coordinates includes: controlling the movement device to drive the image acquisition device to sequentially move to nine calibration points in a nine-grid mode; Controlling the image acquisition device to move to a calibration point to acquire image information; And calculating the conversion relation between the pixel coordinates and the actual world coordinates by adopting an N-point calibration algorithm based on the image information so as to obtain the coordinate conversion relation between the pixel coordinates and the actual world coordinates.
- 3. The lens dispensing method according to claim 1, wherein the calibrating the distance between the rotation center of the bent dispensing needle and the calibration point of the image capturing device based on the coordinate transformation relation to obtain the distance information between the rotation center and the calibration point includes: controlling the movement device to drive the bent dispensing needle to move by a first world coordinate; Controlling the motion device to drive the bent dispensing needle to rotate to dispense the glue and enable the dispensed glue to be circular; controlling the movement device to drive the image acquisition device to move a second world coordinate so that the glue is positioned in an acquisition area of the image acquisition device; controlling the image acquisition device to acquire a glue image; Determining center pixel coordinates of the glue based on the glue image; converting the circle center pixel coordinates into circle center world coordinates based on the coordinate conversion relation; And determining the distance between the rotating center of the bent dispensing needle head and the calibration point of the image acquisition device based on the circle center world coordinates, the first world coordinates and the second world coordinates to obtain the distance information of the rotating center and the calibration point.
- 4. A lens dispensing method according to any one of claims 1 to 3, wherein the calibrating the radius of rotation of the folded dispensing needle to obtain the radius of rotation of the folded needle comprises: Controlling the movement device to drive the bent dispensing needle to move to the acquisition area of the image acquisition device; Controlling the motion device to drive the dispensing needle to rotate according to a preset angle, and controlling the image acquisition device to acquire the needle image of the bent dispensing needle in real time when the dispensing needle rotates until the dispensing needle rotates for 360 degrees; And determining the rotating radius of the bent needle based on the needle image when the bent dispensing needle rotates.
- 5. The lens dispensing method of claim 4, wherein said determining a bend needle rotation radius based on said needle image when said bent dispensing needle is rotated comprises: determining the passing position point of the needle head during rotation based on the needle head image when the bent dispensing needle head rotates; fitting the position points passed by the needle head during rotation into a needle head rotation circle through a circle fitting algorithm; and determining the rotating radius of the bent needle based on the needle rotating circle.
- 6. A lens dispensing method according to any one of claims 1 to 3, wherein the controlling the moving device to drive the folded dispensing needle to perform a X, Y, Z, W four-axis interpolation dispensing motion based on the radius of the glue groove, the world coordinate of the center of the lens, the radius of rotation of the folded needle, and the distance information includes: controlling the movement device to drive the rotation center of the dispensing needle to move to the circle center of the lens based on the world coordinates of the circle center of the lens and the distance information; And controlling the movement device to drive the bent dispensing needle to perform X, Y, Z, W four-axis interpolation dispensing movement based on the radius of the glue groove and the rotating radius of the bent needle so as to perform dispensing.
- 7. A lens dispensing method according to any one of claims 1 to 3, wherein after the calibration of the rotational radius of the folded dispensing needle to obtain the rotational radius of the folded needle, the method further comprises: Storing the bending needle rotating radius into a needle radius database; Before the glue dispensing needle head is controlled to carry out X, Y, Z, W four-axis interpolation glue dispensing movement to carry out glue dispensing based on the radius of the glue groove, the world coordinates of the circle center of the lens, the rotating radius of the bent needle head and the interval information, the glue dispensing device is controlled to drive the bent needle head to carry out the four-axis interpolation glue dispensing movement, the glue dispensing device further comprises: Calibrating the rotating radius of the bent dispensing needle twice to obtain the current rotating radius of the needle; Comparing the current radius of rotation of the needle with the radius of rotation of the bent needle in the needle radius database; When the comparison result is consistent, executing the step of controlling the moving device to drive the bent dispensing needle to perform X, Y, Z, W four-axis interpolation dispensing movement for dispensing based on the radius of the glue groove, the world coordinate of the center of the lens, the rotating radius of the bent needle and the interval information; and when the comparison result is inconsistent, sending out alarm information.
- 8. The method for dispensing a lens according to any one of claims 1 to 3, wherein before the step of controlling the movement device to drive the folded dispensing needle to perform X, Y, Z, W four-axis interpolation dispensing movement to perform dispensing based on the radius of the glue groove, the world coordinates of the center of the lens, the radius of rotation of the folded needle, and the distance information, the method further comprises: acquiring a dispensing needle image of the bent dispensing needle; determining whether a foreign matter exists in the dispensing needle head or not based on the dispensing needle head image; If the dispensing needle head has foreign matters, sending out alarm information; And if no foreign matter exists in the dispensing needle, executing the step of controlling the moving device to drive the bent dispensing needle to perform X, Y, Z, W four-axis interpolation dispensing movement to perform dispensing based on the radius of the glue groove, the world coordinate of the circle center of the lens, the rotating radius of the bent needle and the interval information.
- 9. The method for dispensing a lens according to any one of claims 1 to 3, wherein after controlling the movement device to drive the folded dispensing needle to perform a X, Y, Z, W four-axis interpolation dispensing movement based on the radius of the glue groove, the world coordinate of the center of the lens, the radius of rotation of the folded needle, and the pitch information, the method further comprises: acquiring a lens dispensing image of a lens to be dispensed after dispensing; determining whether the dispensing is bad or not based on the lens dispensing image; and if the dispensing is bad, sending out alarm information.
- 10. The lens dispensing equipment is characterized by comprising an image acquisition device, a motion device, a dispensing needle head and a processing device; The image acquisition device is used for acquiring images; The motion device comprises an X-axis motion assembly, a Y-axis motion assembly, a Z-axis motion assembly and a W-axis motion assembly, wherein the W-axis motion assembly is used for driving the bent dispensing needle to rotate; the X-axis movement assembly, the Y-axis movement assembly and the Z-axis movement assembly are respectively used for driving the dispensing needle to move along an X axis, a Y axis and a Z axis; the dispensing needle is used for dispensing, and the dispensing needle can be bent; The processing device is electrically connected with the image acquisition device, the movement device and the dispensing needle head, and is used for executing the lens dispensing method according to any one of claims 1-9.
Description
Lens dispensing method and device Technical Field The invention relates to the technical field of dispensing equipment, in particular to a lens dispensing method and device. Background In the manufacturing industry of lenses, lens assembly is a basic production process flow, and a very important production process, namely dispensing, exists in the lens assembly process. The purpose of dispensing is to dispense glue inside the lens to fix the parts inside the lens and to dispense glue outside the lens to package the product. At present, the main dispensing methods aiming at the inside and the outside of the lens are as follows: 1. the dispensing needle is static, and the lens rotates, so that the glue is dispensed in the glue groove. The dispensing method can be compatible with internal and external dispensing, but needs to manually position the needle in the dispensing groove, and has abundant experience for operators, and has high debugging difficulty. 2. The dispensing needle rotates and the lens is stationary. The glue dispensing method can be compatible with internal and external glue dispensing, but the needle head is required to be bent to a proper angle, the radius of the glue is required to be ensured to be consistent with the radius of a product glue dispensing groove during rotation, and the debugging difficulty is high. 3. And (5) interpolation dispensing, wherein the lens is static, and the XY axis drives the needle to do circular arc interpolation movement, so that dispensing is completed. The dispensing method is more convenient and suitable for dispensing grooves with different radiuses, but is only suitable for external dispensing, and meanwhile, the head of the dispensing machine is vertical, and the internal dispensing vertical needle is easy to generate structural interference. In summary, the current dispensing method for the lens is difficult to achieve in terms of debugging difficulty, compatibility of internal and external dispensing and compatibility of products with different radiuses. Disclosure of Invention The invention provides a lens dispensing method and device, which can realize the effects of being compatible with internal and external dispensing, being compatible with dispensing of products with different radiuses and being convenient to debug. According to one aspect of the invention, a lens dispensing method is provided for a lens dispensing device, the lens dispensing device comprises an image acquisition device, a motion device, a dispensing needle and a processing device, the image acquisition device is used for acquiring images, the motion device comprises an X-axis motion assembly, a Y-axis motion assembly, a Z-axis motion assembly and a W-axis motion assembly, the W-axis motion assembly is used for driving the dispensing needle to rotate, the X-axis motion assembly, the Y-axis motion assembly and the Z-axis motion assembly are respectively used for driving the dispensing needle to move along an X axis, a Y axis and a Z axis, the dispensing needle is used for dispensing, the dispensing needle can be bent, and the processing device is electrically connected with the image acquisition device, the motion device and the dispensing needle, and the lens dispensing method comprises: calibrating the image acquisition device to obtain a coordinate conversion relation between pixel coordinates and actual world coordinates; Calibrating the distance between the rotating center of the bent dispensing needle head and the calibrating point of the image acquisition device based on the coordinate conversion relation to obtain distance information between the rotating center and the calibrating point; calibrating the rotating radius of the bent dispensing needle to obtain the rotating radius of the bent needle; acquiring a lens image of the lens to be dispensed acquired by the image acquisition device; Determining world coordinates of a lens center of the lens to be dispensed based on the lens image; Acquiring the radius of a glue groove of a lens to be dispensed; And controlling the moving device to drive the bent dispensing needle to perform X, Y, Z, W four-axis interpolation dispensing movement for dispensing based on the radius of the glue groove, the world coordinates of the circle center of the lens, the rotating radius of the bent needle and the interval information. In an optional embodiment of the present invention, the calibrating the image capturing device to obtain the coordinate conversion relation between the pixel coordinate and the real world coordinate includes: controlling the movement device to drive the image acquisition device to sequentially move to nine calibration points in a nine-grid mode; Controlling the image acquisition device to move to a calibration point to acquire image information; And calculating the conversion relation between the pixel coordinates and the actual world coordinates by adopting an N-point calibration algorithm based on the image infor