Protective lens detection method and device, computer device and storage medium
Through the real-time image comparison method, the problem of untimely or inaccurate manual detection is solved, real-time intelligent detection of protective lenses is realized, and the welding quality is ensured.
Patent Information
- Application Number
- CN202411656324.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-03-11
AI Technical Summary
In the prior art, manual detection of protective lenses is not timely or inaccurate, resulting in the inability to guarantee the welding quality and the risk of outflow of poor welding products.
A protective lens detection method is provided, by obtaining a real-time image of the protective lens when the laser welding device is not used and comparing it with the reference image, it is determined whether the protective lens meets the welding standards.
Real-time intelligent detection of the advantages and disadvantages of protective lenses is achieved, ensuring that laser welding devices are used while ensuring the better protection quality of protective lenses, thereby ensuring welding quality.
Smart Images

Figure CN119599984A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of detection methods, and in particular to a protective lens detection method, device, computer device and storage medium. Background Art
[0002] Laser welding machine is a kind of equipment that uses high energy density laser beam as heat source for welding. It generates high energy laser beam through laser generator. The laser beam is focused on the welding part of the workpiece, so that the welded materials are melted and fused together instantly. Due to the high energy density and precise focusing characteristics of laser beam, high precision and high efficiency welding can be achieved.
[0003] The existing laser welding machine includes a laser welder and a protective lens for protecting the welding head of the laser welder. During the laser welding process, the protective lens can reduce laser reflection and scattering, and protect the welding head from high temperature, spatter and dust. However, during the welding process, there is a situation where foreign matter sticks to the protective lens, which may burn the lens. If the protective lens is burned and cannot be discovered in time, the welding quality cannot be guaranteed in this state, so there is a risk of defective welded products flowing out to the client. The commonly used detection method is manual inspection of the protective lens, but this method is not timely, or manual inspection of the welded product, judging whether the protective lens needs to be replaced based on the quality of the product, but this method cannot accurately judge the quality of the product (for example, the product has a small burn point and is not much different from conventional products), resulting in an inability to accurately judge whether the protective lens needs to be replaced. Summary of the invention
[0004] Based on this, the purpose of the present invention is to provide a protective lens detection method, device, computer device and storage medium, so as to fundamentally solve the problem that the existing manual detection method of protective lenses has untimely detection, or the method of manually judging the quality of protective lenses by detecting welded products has inaccurate detection.
[0005] The embodiment of the present invention is implemented by providing a protective lens detection method, which is applied to a laser welding device, wherein the laser welding device includes a laser welding mechanism, wherein the laser welding mechanism includes a laser welder and a protective lens disposed at the end of the laser welder, and the protective lens detection method includes the following steps:
[0006] When the laser welder is not in use, obtaining a real-time image of the protective lens;
[0007] Comparing the real-time image with the reference image to obtain a comparison result;
[0008] Determine whether the protective lens meets the welding standard according to the comparison result, and if so, use the laser welder; if not, stop using the laser welder;
[0009] Wherein, the reference image is generated based on the intact protective lens.
[0010] In some embodiments, comparing the real-time image with the reference image to obtain a comparison result comprises the following steps:
[0011] The real-time image is compared with a reference image to obtain a defective area of the real-time image.
[0012] In some embodiments, comparing the real-time image with the reference image to obtain the defect area of the real-time image comprises the following steps:
[0013] Comparing the real-time image with the reference image to obtain the difference area between the two;
[0014] The defective area of the real-time image is acquired according to the distinguished area.
[0015] In some embodiments, judging whether the protective lens meets the welding standard according to the comparison result comprises the following steps:
[0016] It is determined whether the defective area is smaller than an area threshold, thereby determining whether the protective lens meets the welding standard. If it is determined that the defective area is smaller than the area threshold, it is determined that the protective lens meets the welding standard. If it is determined that the defective area is not smaller than the area threshold, it is determined that the protective lens does not meet the welding standard.
[0017] Another embodiment of the present invention further provides a protective lens detection device, which is applied to a laser welding device, wherein the laser welding device includes a laser welding mechanism, wherein the laser welding mechanism includes a laser welder and a protective lens disposed at the end of the laser welder, and the protective lens detection device includes:
[0018] An acquisition unit, used for acquiring a real-time image of the protective lens when the laser welder is not in use;
[0019] A comparison unit, used for comparing the real-time image with a reference image to obtain a comparison result;
[0020] A judging unit, used for judging whether the protective lens meets the welding standard according to the comparison result, and if so, using the laser welder, and if not, stopping using the laser welder;
[0021] Wherein, the reference image is generated based on the intact protective lens.
[0022] In some embodiments, the comparison unit comprises:
[0023] The comparison module is used to compare the real-time image with a reference image to obtain the defective area of the real-time image.
[0024] In some embodiments, the comparison module comprises:
[0025] A region acquisition submodule, used for comparing the real-time image with the reference image to acquire the difference region between the two;
[0026] The area acquisition submodule is used to acquire the defective area of the real-time image according to the distinguished area.
[0027] In some embodiments, the determining unit includes:
[0028] The judgment module is used to judge whether the defective area is smaller than an area threshold, so as to judge whether the protective lens meets the welding standard. If the defective area is smaller than the area threshold, the protective lens is judged to meet the welding standard; if the defective area is not smaller than the area threshold, the protective lens is judged to not meet the welding standard.
[0029] Another embodiment of the present invention further provides a computer device, comprising:
[0030] Memory, used to store programs;
[0031] A processor is used to execute the program, and the program is specifically used to implement the protective lens detection method as described in any one of the above.
[0032] Another embodiment of the present invention further provides a storage medium, wherein the storage medium stores executable instructions, and when the instructions are executed by a processor, the protective lens detection method as described above is implemented.
[0033] A protective lens detection method provided by an embodiment of the present invention obtains a real-time image of the protective lens when a laser welder is not used, for example, before laser welding, when laser welding is paused, or after laser welding is performed, and then compares the real-time image with a reference image to obtain a comparison result, and then determines whether the protective lens meets the welding standard based on the comparison result. If it meets the standard, the laser welder can be used subsequently. If it does not meet the standard, the laser welder is stopped from being used, and the laser welder can be used again after the protective lens is repaired or replaced. By collecting the real-time image of the protective lens and intelligently detecting the quality of the protective lens in real time, the laser welder can be used only when the protective quality of the protective lens is better, thereby ensuring the better welding quality of the laser welder. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 is a flowchart of a protective lens detection method provided by an embodiment of the present invention;
[0035] Figure 2 is a structural block diagram of a protective lens detection method provided by an embodiment of the present invention;
[0036] Figure 3 is a schematic diagram of a laser welding device provided in an embodiment of the present invention;
[0037] Figure 4 is based on Figure 3 A partial enlarged view of part A. DETAILED DESCRIPTION
[0038] In order to facilitate the understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. Several embodiments of the present invention are given in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive.
[0039] It should be noted that when an element is referred to as being "fixed to" another element, it may be directly on the other element or there may be a central element. When an element is considered to be "connected to" another element, it may be directly connected to the other element or there may be a central element at the same time. The terms "vertical", "horizontal", "left", "right" and similar expressions used herein are for illustrative purposes only.
[0040] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more related listed items.
[0041] The embodiment of the present invention provides a protective lens detection method, which is applied to a laser welding device, referring to Figure 3 The laser welding device includes a laser welding mechanism, which includes a laser welder 110 and a protective lens 120 disposed at the end of the laser welder 110. Figure 1 , the protective lens detection method comprises the following steps:
[0042] S10, when the laser welder is not in use, obtaining a real-time image of the protective lens;
[0043] S20, comparing the real-time image and the reference image to obtain a comparison result;
[0044] S30, judging whether the protective lens meets the welding standard according to the comparison result, if yes, using the laser welder, if no, stopping using the laser welder;
[0045] Wherein, the reference image is generated based on the intact protective lens.
[0046] Continue to refer Figure 3 The laser welding device also includes a three-dimensional motion mechanism and a camera mechanism. The three-dimensional motion mechanism includes a first motion component, a second motion component and a third motion component. The laser welding mechanism is arranged on the first motion component, the first motion component is arranged on the second motion component, and the second motion component is arranged on the third motion component. The first motion component drives the laser welding mechanism to move in the first direction, the second motion component drives the laser welding mechanism and the first motion component to move in the second direction, and the third motion component drives the laser welding mechanism, the first motion component and the second motion component to move in the third direction; the camera mechanism is arranged on the second motion component. After the second motion component drives the laser welding mechanism and the first motion component to move in the second direction, the position of the camera mechanism corresponds to the position of the protective lens 120. Among them, the first direction can be as follows Figure 3 The z direction shown, the second direction can be as follows Figure 3 The y direction shown, the third direction can be as follows Figure 3 The x direction is shown.
[0047] The first motion mechanism includes a first guide rail 211, a first guide plate 212 and a first driving member 213. The first guide plate 212 is arranged on the first guide rail 211, and the laser welding mechanism is arranged on the first guide plate 212. Under the drive of the first driving member 213, the first guide plate 212 moves on the first guide rail 211 to drive the laser welding mechanism to move in the first direction. The first guide rail 211 is arranged in the first direction, and the first driving member 213 can be a linear motor, which drives the first guide plate 212 to drive the laser welding mechanism to move on the first guide rail 211, thereby realizing the movement of the laser welding mechanism in the first direction.
[0048] The second motion mechanism includes a second guide rail 221, a second guide plate 222, and a second driving member 223. The second guide plate 222 is arranged on the second guide rail 221, and the first motion assembly is arranged on the second guide plate 222. Under the drive of the second driving member 223, the second guide plate 222 moves on the second guide rail 221 to drive the laser welding mechanism and the first motion assembly to move in the second direction. The second guide rail 221 is arranged in the second direction, and the second driving member 223 can be a linear motor, which drives the second guide plate 222 to drive the laser welding mechanism and the first motion assembly to move on the second guide rail 221, thereby realizing the movement of the laser welding mechanism and the first motion assembly in the second direction.
[0049] The third motion assembly includes a third guide rail 231, a third guide plate 232 and a third driving member 233. The third guide plate 232 is arranged on the third guide rail 231, and the second motion assembly is arranged on the third guide plate 232. Under the drive of the third driving member 233, the third guide plate 232 moves on the third guide rail 231 to drive the laser welding mechanism, the first motion assembly and the second motion assembly to move in the third direction. The third guide rail 231 is arranged in the third direction, and the third driving member 233 can be a linear motor, which drives the third guide plate 232 to drive the laser welding mechanism, the first motion assembly and the second motion assembly to move on the third guide rail 231, so as to realize the movement of the laser welding mechanism, the first motion assembly and the second motion assembly in the third direction.
[0050] The camera mechanism is arranged at one end of the second guide rail 221, and the end is positioned toward the laser welding mechanism. The camera mechanism is fixedly arranged at one end of the second guide rail 221, and when the third motion component drives the laser welding mechanism, the first motion component and the second motion component to move toward the third direction, the camera mechanism will also be driven to move toward the third direction, but when the first motion component drives the laser welding mechanism to move toward the first direction, the camera mechanism will not be driven to move, and when the second motion component drives the laser welding mechanism and the first motion component to move toward the second direction, the camera mechanism will not be driven to move.
[0051] refer to Figure 3 and Figure 4 The photographing mechanism includes a fixing seat 310 disposed at the end position and a camera 320 disposed on the fixing seat 310. The fixing seat 310 provides support for the camera 320. After the second motion component drives the laser welding mechanism and the first motion component to move toward the second direction, the position of the camera 320 corresponds to the position of the protective lens 120, and the camera 320 can take a photo of the protective lens 120.
[0052] Continue to refer Figure 3 The laser welding device also includes a workbench 400, on which a work area 410 for placing the workpiece to be welded is provided. The laser welding process of the laser welding device is as follows: after the workpiece to be welded is placed in the work area 410, the three-dimensional motion mechanism can drive the laser welder 110 to move in three dimensions, for example, the first motion component drives the laser welder 110 to move in a first direction, the second motion component drives the laser welder 110 to move in a second direction, and the third motion component drives the laser welder 110 to move in a third direction, so that the laser welder 110 can perform laser welding on the workpiece to be welded at any number of positions, and in this process, the camera mechanism will not hinder the laser welder 110.
[0053] The laser welding device further includes a vacuum adsorption mechanism, which is disposed on the working area 410. The vacuum adsorption mechanism includes a plurality of adsorption holes disposed on the working area 410 and a vacuum pump connected to the adsorption holes. After the workpiece to be welded is placed in the working area 410, the vacuum pump is started to absorb the space between the workpiece to be welded and the working area 410 through the adsorption holes, so that a vacuum is generated between the two, thereby adsorbing the workpiece to be welded on the working area 410.
[0054] The workpiece to be welded may also be fixed on the working area 410 by other means. For example, the working area 410 may be provided with a plurality of fixing parts such as fixing blocks. After the workpiece to be welded is placed in the working area 410, the workpiece to be welded abuts against the fixing blocks, and the workpiece to be welded is fixed by the fixing blocks.
[0055] The laser welder 110 includes a laser, an optical system and a welding head. The laser generates a high-energy-density laser beam. After adjustment and transmission by the optical system, the welding head focuses and aligns the laser beam so that the laser beam acts accurately on the workpiece to be welded.
[0056] In this embodiment, when the laser welder is not in use, for example, before laser welding, when laser welding is paused, or after laser welding, a real-time image of the protective lens is obtained, and the real-time image is compared with the reference image to obtain a comparison result. Then, based on the comparison result, it is determined whether the protective lens meets the welding standards. If so, the laser welder can be used subsequently. If not, the laser welder is stopped and the laser welder can only be used after the protective lens is repaired or replaced.
[0057] What can be achieved is that when it is necessary to detect the protective lens, the three-dimensional motion mechanism can be controlled to reset its origin first, and after it is restored to the initial position, the second motion component can be controlled to drive the laser welding mechanism to move in the second direction, so that the position of the camera mechanism corresponds to the position of the protective lens, and then the camera mechanism can take a picture of the protective lens, that is, obtain a real-time image of the protective lens. It is also possible to set the initial position, that is, the position of the camera mechanism, to correspond to the position of the protective lens, and when it is necessary to detect the protective lens, the three-dimensional motion mechanism can be controlled to reset its origin, and after it is restored to the initial position, the position of the camera mechanism corresponds to the position of the protective lens.
[0058] The reference image is generated based on the intact protective lens. That is, a good (also understood as unburned) protective lens is obtained in advance, and the protective lens is photographed to obtain an image of the intact protective lens, i.e., the reference image. When the protective lens is subsequently tested, the difference between the real-time image of the real-time protective lens and the reference image of the intact protective lens is compared to determine whether the real-time protective lens meets the welding standard.
[0059] If it is judged that the protective lens meets the welding standard, the laser welder can be used subsequently, so as to ensure the welding quality of the laser welder. Specifically, the protective lens meets the welding standard. When the laser welder is used subsequently, the protective lens can effectively block the damage of impurities such as spatter, smoke and dust generated during the welding process to the laser welder (such as the welding head of the laser welder), ensure the stability of the optical performance of the laser welder, so as to stabilize the laser output, help to obtain uniform and consistent welding quality, and reduce welding defects caused by laser output fluctuations, such as uneven welds, pores and other problems. In addition, the protective lens can protect the laser welder from damage, extend the service life of the laser welder, and the stable performance of the laser welder can maintain good welding accuracy and efficiency for a long time. For the product, it can continuously obtain high-quality welding effects and reduce product quality fluctuations caused by failures or performance degradation of the laser welder. Therefore, in the present invention, by collecting real-time images of the protective lens and intelligently detecting the advantages and disadvantages of the protective lens in real time, the laser welder can be used only when the protective quality of the protective lens is guaranteed to be better, thereby ensuring the better welding quality of the laser welder.
[0060] In some specific implementations of the present application, the step of comparing the real-time image with the reference image to obtain a comparison result includes the following steps:
[0061] The real-time image is compared with a reference image to obtain a defective area of the real-time image.
[0062] In this embodiment, after obtaining the real-time image of the protective lens, the real-time image and the reference image are compared to obtain the defective area of the real-time image, which is the comparison result. If there is no burnt part of the protective lens, the defective area of the real-time image is 0. If there is a burnt part of the protective lens, the defective area of the real-time image is a value greater than 0, which is determined according to the size of the defective area. By defining the comparison result by the defective area and adopting a numerical method, a more accurate comparison result can be obtained, which is convenient for subsequent judgment of whether the protective lens meets the welding standard.
[0063] In some specific implementations of the present application, the step of comparing the real-time image with the reference image to obtain the defective area of the real-time image includes the following steps:
[0064] Comparing the real-time image with the reference image to obtain the difference area between the two;
[0065] The defective area of the real-time image is acquired according to the distinguished area.
[0066] If there is no burnt part on the protective lens, the conventional reference image is completely black, and the acquired real-time image is also completely black. If there is a burnt part on the protective lens, the conventional reference image is completely black, and the acquired real-time image has some light-colored parts (such as gray) lighter than black in addition to the black part. The light-colored part is caused by impurities sticking to the protective lens during welding. The light-colored part is the difference area between the real-time image and the reference image, and the area of the difference area is the bad area of the real-time image. By using the difference area between the real-time image and the reference image, it is possible to obtain a more accurate bad area, that is, to obtain an accurate comparison result, which is convenient for subsequent judgment of whether the protective lens meets the welding standards.
[0067] If there are multiple difference areas between the real-time image and the reference image, and the multiple difference areas are not connected to each other, the defective area of the real-time image is obtained by calculating the sum of the multiple difference areas.
[0068] In some specific embodiments of the present application, judging whether the protective lens meets the welding standard according to the comparison result includes the following steps:
[0069] It is determined whether the defective area is smaller than an area threshold, thereby determining whether the protective lens meets the welding standard. If it is determined that the defective area is smaller than the area threshold, it is determined that the protective lens meets the welding standard. If it is determined that the defective area is not smaller than the area threshold, it is determined that the protective lens does not meet the welding standard.
[0070] In this embodiment, after obtaining the defective area of the real-time image, it is determined whether the defective area is less than the area threshold, so as to determine whether the protective lens meets the welding standard. Specifically, if it is determined that the defective area is less than the area threshold, it is determined that the protective lens meets the welding standard, and the laser welder can be used subsequently. If it is determined that the defective area is not less than the area threshold, it is determined that the protective lens does not meet the welding standard, and the laser welder is stopped from being used until the protective lens is repaired or replaced.
[0071] The area threshold can be determined manually based on previous experience, experiments or tests. The area threshold is set to 2300 pixels, based on 0.03 mm (length) * 0.03 mm (width) * 2300 (pixels) = 2.07 mm 2 , the area threshold is 2.07mm 2 The defective area is less than 2300 pixels, which is less than 2.07mm. 2 When the defective area is less than the area threshold, the protective lens is judged to meet the welding standard. When the defective area is not less than 2300 pixels, that is, not less than 2.07mm 2When the defective area is judged to be not less than the area threshold, the protective lens is judged to be not in compliance with the welding standard.
[0072] refer to Figure 2 The embodiment of the present invention also provides a protective lens detection device, which is applied to an optical welding device, referring to Figure 3 The laser welding device comprises a laser welding mechanism, wherein the laser welding mechanism comprises a laser welder and a protective lens arranged at the end of the laser welder, referring to Figure 2 , the protective lens detection device comprises:
[0073] An acquisition unit 10, used for acquiring a real-time image of the protective lens when the laser welder is not in use;
[0074] A comparison unit 20, configured to compare the real-time image with a reference image and obtain a comparison result;
[0075] A judging unit 30, configured to judge whether the protective lens meets the welding standard according to the comparison result, and if so, use the laser welder, and if not, stop using the laser welder;
[0076] Wherein, the reference image is generated based on the intact protective lens.
[0077] Continue to refer Figure 3 The laser welding device also includes a three-dimensional motion mechanism and a camera mechanism. The three-dimensional motion mechanism includes a first motion component, a second motion component and a third motion component. The laser welding mechanism is arranged on the first motion component, the first motion component is arranged on the second motion component, and the second motion component is arranged on the third motion component. The first motion component drives the laser welding mechanism to move in the first direction, the second motion component drives the laser welding mechanism and the first motion component to move in the second direction, and the third motion component drives the laser welding mechanism, the first motion component and the second motion component to move in the third direction; the camera mechanism is arranged on the second motion component. After the second motion component drives the laser welding mechanism and the first motion component to move in the second direction, the position of the camera mechanism corresponds to the position of the protective lens 120. Among them, the first direction can be as follows Figure 3 The z direction shown, the second direction can be as follows Figure 3 The y direction shown, the third direction can be as follows Figure 3 The x direction is shown.
[0078] The first motion mechanism includes a first guide rail 211, a first guide plate 212 and a first driving member 213. The first guide plate 212 is arranged on the first guide rail 211, and the laser welding mechanism is arranged on the first guide plate 212. Under the drive of the first driving member 213, the first guide plate 212 moves on the first guide rail 211 to drive the laser welding mechanism to move in the first direction. The first guide rail 211 is arranged in the first direction, and the first driving member 213 can be a linear motor, which drives the first guide plate 212 to drive the laser welding mechanism to move on the first guide rail 211, thereby realizing the movement of the laser welding mechanism in the first direction.
[0079] The second motion mechanism includes a second guide rail 221, a second guide plate 222, and a second driving member 223. The second guide plate 222 is arranged on the second guide rail 221, and the first motion assembly is arranged on the second guide plate 222. Under the drive of the second driving member 223, the second guide plate 222 moves on the second guide rail 221 to drive the laser welding mechanism and the first motion assembly to move in the second direction. The second guide rail 221 is arranged in the second direction, and the second driving member 223 can be a linear motor, which drives the second guide plate 222 to drive the laser welding mechanism and the first motion assembly to move on the second guide rail 221, thereby realizing the movement of the laser welding mechanism and the first motion assembly in the second direction.
[0080] The third motion assembly includes a third guide rail 231, a third guide plate 232 and a third driving member 233. The third guide plate 232 is arranged on the third guide rail 231, and the second motion assembly is arranged on the third guide plate 232. Under the drive of the third driving member 233, the third guide plate 232 moves on the third guide rail 231 to drive the laser welding mechanism, the first motion assembly and the second motion assembly to move in the third direction. The third guide rail 231 is arranged in the third direction, and the third driving member 233 can be a linear motor, which drives the third guide plate 232 to drive the laser welding mechanism, the first motion assembly and the second motion assembly to move on the third guide rail 231, so as to realize the movement of the laser welding mechanism, the first motion assembly and the second motion assembly in the third direction.
[0081] The camera mechanism is arranged at one end of the second guide rail 221, and the end is positioned toward the laser welding mechanism. The camera mechanism is fixedly arranged at one end of the second guide rail 221, and when the third motion component drives the laser welding mechanism, the first motion component and the second motion component to move toward the third direction, the camera mechanism will also be driven to move toward the third direction, but when the first motion component drives the laser welding mechanism to move toward the first direction, the camera mechanism will not be driven to move, and when the second motion component drives the laser welding mechanism and the first motion component to move toward the second direction, the camera mechanism will not be driven to move.
[0082] refer to Figure 3 and Figure 4The photographing mechanism includes a fixing seat 310 disposed at the end position and a camera 320 disposed on the fixing seat 310. The fixing seat 310 provides support for the camera 320. After the second motion component drives the laser welding mechanism and the first motion component to move toward the second direction, the position of the camera 320 corresponds to the position of the protective lens 120, and the camera 320 can take a photo of the protective lens 120.
[0083] Continue to refer Figure 3 The laser welding device also includes a workbench 400, on which a work area 410 for placing the workpiece to be welded is provided. The laser welding process of the laser welding device is as follows: after the workpiece to be welded is placed in the work area 410, the three-dimensional motion mechanism can drive the laser welder 110 to move in three dimensions, for example, the first motion component drives the laser welder 110 to move in a first direction, the second motion component drives the laser welder 110 to move in a second direction, and the third motion component drives the laser welder 110 to move in a third direction, so that the laser welder 110 can perform laser welding on the workpiece to be welded at any number of positions, and in this process, the camera mechanism will not hinder the laser welder 110.
[0084] The laser welding device further includes a vacuum adsorption mechanism, which is disposed on the working area 410. The vacuum adsorption mechanism includes a plurality of adsorption holes disposed on the working area 410 and a vacuum pump connected to the adsorption holes. After the workpiece to be welded is placed in the working area 410, the vacuum pump is started to absorb the space between the workpiece to be welded and the working area 410 through the adsorption holes, so that a vacuum is generated between the two, thereby adsorbing the workpiece to be welded on the working area 410.
[0085] The workpiece to be welded may also be fixed on the working area 410 by other means. For example, the working area 410 may be provided with a plurality of fixing parts such as fixing blocks. After the workpiece to be welded is placed in the working area 410, the workpiece to be welded abuts against the fixing blocks, and the workpiece to be welded is fixed by the fixing blocks.
[0086] The laser welder 110 includes a laser, an optical system and a welding head. The laser generates a high-energy-density laser beam. After adjustment and transmission by the optical system, the welding head focuses and aligns the laser beam so that the laser beam acts accurately on the workpiece to be welded.
[0087] In this embodiment, when the laser welder is not in use, for example, before laser welding, when laser welding is paused, or after laser welding, a real-time image of the protective lens is obtained, and the real-time image is compared with the reference image to obtain a comparison result. Then, based on the comparison result, it is determined whether the protective lens meets the welding standards. If so, the laser welder can be used subsequently. If not, the laser welder is stopped and the laser welder can only be used after the protective lens is repaired or replaced.
[0088] What can be achieved is that when it is necessary to detect the protective lens, the three-dimensional motion mechanism can be controlled to reset its origin first, and after it is restored to the initial position, the second motion component can be controlled to drive the laser welding mechanism to move in the second direction, so that the position of the camera mechanism corresponds to the position of the protective lens, and then the camera mechanism can take a picture of the protective lens, that is, obtain a real-time image of the protective lens. It is also possible to set the initial position, that is, the position of the camera mechanism, to correspond to the position of the protective lens, and when it is necessary to detect the protective lens, the three-dimensional motion mechanism can be controlled to reset its origin, and after it is restored to the initial position, the position of the camera mechanism corresponds to the position of the protective lens.
[0089] The reference image is generated based on the intact protective lens. That is, a good (also understood as unburned) protective lens is obtained in advance, and the protective lens is photographed to obtain an image of the intact protective lens, i.e., the reference image. When the protective lens is subsequently tested, the difference between the real-time image of the real-time protective lens and the reference image of the intact protective lens is compared to determine whether the real-time protective lens meets the welding standard.
[0090] If it is judged that the protective lens meets the welding standards, the laser welder can be used subsequently, so as to ensure the welding quality of the laser welder. Specifically, the protective lens meets the welding standards. When the laser welder is used subsequently, the protective lens can effectively block the damage of impurities such as spatter, smoke and dust generated during the welding process to the laser welder (such as the welding head of the laser welder), ensure the stability of the optical performance of the laser welder, so as to stabilize the laser output, help to obtain uniform and consistent welding quality, and reduce welding defects caused by laser output fluctuations, such as uneven welds, pores and other problems. In addition, the protective lens can protect the laser welder from damage and extend the service life of the laser welder. The stable performance of the laser welder can maintain good welding accuracy and efficiency for a long time. For the product, high-quality welding effects can be continuously obtained, and product quality fluctuations caused by failures or performance degradation of the laser welder can be reduced. Therefore, in the present invention, by collecting real-time images of the protective lens and intelligently detecting the quality of the protective lens in real time, the laser welder can be used only when the protective quality of the protective lens is better, thereby ensuring the better welding quality of the laser welder.
[0091] In some specific implementations of the present application, the comparison unit includes:
[0092] The comparison module is used to compare the real-time image with a reference image to obtain the defective area of the real-time image.
[0093] In this embodiment, after obtaining the real-time image of the protective lens, the real-time image and the reference image are compared to obtain the defective area of the real-time image, which is the comparison result. If there is no burnt part of the protective lens, the defective area of the real-time image is 0. If there is a burnt part of the protective lens, the defective area of the real-time image is a value greater than 0, which is determined according to the size of the defective area. By defining the comparison result by the defective area and adopting a numerical method, a more accurate comparison result can be obtained, which is convenient for subsequent judgment of whether the protective lens meets the welding standard.
[0094] In some specific implementations of the present application, the comparison module includes:
[0095] A region acquisition submodule, used for comparing the real-time image with the reference image to acquire the difference region between the two;
[0096] An area acquisition submodule, used for acquiring the defective area of the real-time image according to the distinguished area;
[0097] The defective area is measured in pixels.
[0098] If there is no burnt part on the protective lens, the conventional reference image is completely black, and the acquired real-time image is also completely black. If there is a burnt part on the protective lens, the conventional reference image is completely black, and the acquired real-time image has some light-colored parts (such as gray) lighter than black in addition to the black part. The light-colored part is caused by impurities sticking to the protective lens during welding. The light-colored part is the difference area between the real-time image and the reference image, and the area of the difference area is the bad area of the real-time image. By using the difference area between the real-time image and the reference image, it is possible to obtain a more accurate bad area, that is, to obtain an accurate comparison result, which is convenient for subsequent judgment of whether the protective lens meets the welding standards.
[0099] If there are multiple difference areas between the real-time image and the reference image, and the multiple difference areas are not connected to each other, the defective area of the real-time image is obtained by calculating the sum of the multiple difference areas.
[0100] In some specific implementations of the present application, the judging unit includes:
[0101] The judgment module is used to judge whether the defective area is smaller than an area threshold, so as to judge whether the protective lens meets the welding standard. If the defective area is smaller than the area threshold, the protective lens is judged to meet the welding standard; if the defective area is not smaller than the area threshold, the protective lens is judged to not meet the welding standard.
[0102] In this embodiment, after obtaining the defective area of the real-time image, it is determined whether the defective area is less than the area threshold, so as to determine whether the protective lens meets the welding standard. Specifically, if it is determined that the defective area is less than the area threshold, it is determined that the protective lens meets the welding standard, and the laser welder can be used subsequently. If it is determined that the defective area is not less than the area threshold, it is determined that the protective lens does not meet the welding standard, and the laser welder is stopped from being used until the protective lens is repaired or replaced.
[0103] The area threshold can be determined manually based on previous experience, experiments or tests. The area threshold is set to 2300 pixels, based on 0.03 mm (length) * 0.03 mm (width) * 2300 (pixels) = 2.07 mm 2 , the area threshold is 2.07mm 2 The defective area is less than 2300 pixels, which is less than 2.07mm. 2 When the defective area is less than the area threshold, the protective lens is judged to meet the welding standard. When the defective area is not less than 2300 pixels, that is, not less than 2.07mm 2 When the defective area is judged to be not less than the area threshold, the protective lens is judged to be not in compliance with the welding standard.
[0104] An embodiment of the present invention further provides a computer device, comprising:
[0105] Memory, used to store programs;
[0106] A processor is used to execute the program, and the program is specifically used to implement the protective lens detection method described in any one of the above embodiments.
[0107] An embodiment of the present invention further provides a storage medium, wherein the storage medium stores executable instructions, and when the instructions are executed by a processor, the protective lens detection method described in any one of the above embodiments is implemented.
[0108] Exemplarily, the computer program can be divided into one or more modules, one or more modules are stored in the memory and executed by the processor to complete the present invention. One or more modules can be a series of computer program instruction segments that can complete specific functions, and the instruction segments are used to describe the execution process of the computer program in the computer device. For example, the computer program can be divided into the steps of the protective lens detection method provided by each of the above method embodiments.
[0109] Those skilled in the art will appreciate that the above description of the computer device is merely an example and does not constitute a limitation on the computer device. The computer device may include more or fewer components than described above, or a combination of certain components, or different components, such as input and output devices, network access devices, buses, etc.
[0110] The processor may be a central processing unit (CPU), 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. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the computer device, and uses various interfaces and lines to connect various parts of the entire computer device.
[0111] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the computer device by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as an interface display function, an interface interaction function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as a map interface, a selection interface, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0112] If the module / unit integrated in the computer device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable storage medium can include: any entity or device that can carry the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, electrical signal and software distribution medium, etc.
[0113] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0114] The above-described embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the present invention. It should be pointed out that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the attached claims.
Claims
1. A protective lens detection method, characterized in that: Applicable to a laser welding device, the laser welding device includes a laser welding mechanism, the laser welding mechanism includes a laser welder and a protective lens arranged at the end of the laser welder, the protective lens detection method The following steps are involved: When the laser welder is not in use, obtaining a real-time image of the protective lens; Comparing the real-time image with the reference image to obtain a comparison result; Determine whether the protective lens meets the welding standard according to the comparison result, and if so, use the laser welder; if not, stop using the laser welder; Wherein, the reference image is generated based on the intact protective lens.
2. The protective lens detection method according to claim 1, characterized in that: The step of comparing the real-time image with the reference image to obtain a comparison result comprises the following steps: The real-time image is compared with a reference image to obtain a defective area of the real-time image.
3. The protective lens detection method according to claim 2, characterized in that: The step of comparing the real-time image with the reference image to obtain the defective area of the real-time image comprises the following steps: Comparing the real-time image with the reference image to obtain the difference area between the two; The defective area of the real-time image is acquired according to the distinguished area.
4. The protective lens detection method according to claim 2, characterized in that: The step of judging whether the protective lens meets the welding standard according to the comparison result comprises the following steps: It is determined whether the defective area is smaller than an area threshold, thereby determining whether the protective lens meets the welding standard. If it is determined that the defective area is smaller than the area threshold, it is determined that the protective lens meets the welding standard. If it is determined that the defective area is not smaller than the area threshold, it is determined that the protective lens does not meet the welding standard.
5. A protective lens detection device, characterized in that: Applied to an optical welding device, the laser welding device includes a laser welding mechanism, the laser welding mechanism includes a laser welder and a protective lens arranged at the end of the laser welder, and the protective lens detection device includes: An acquisition unit, used for acquiring a real-time image of the protective lens when the laser welder is not in use; A comparison unit, used for comparing the real-time image with a reference image to obtain a comparison result; A judging unit, used for judging whether the protective lens meets the welding standard according to the comparison result, and if so, using the laser welder, and if not, stopping using the laser welder; Wherein, the reference image is generated based on the intact protective lens.
6. The protective lens detection device according to claim 5, characterized in that: The comparison unit comprises: The comparison module is used to compare the real-time image with a reference image to obtain the defective area of the real-time image.
7. The protective lens detection method according to claim 6, characterized in that: The comparison module comprises: A region acquisition submodule, used for comparing the real-time image with the reference image to acquire the difference region between the two; The area acquisition submodule is used to acquire the defective area of the real-time image according to the distinguished area.
8. The protective lens detection device according to claim 6, characterized in that: The judging unit comprises: The judgment module is used to judge whether the defective area is smaller than an area threshold, so as to judge whether the protective lens meets the welding standard. If the defective area is smaller than the area threshold, the protective lens is judged to meet the welding standard; if the defective area is not smaller than the area threshold, the protective lens is judged to not meet the welding standard.
9. A computer device, characterized in that: include: Memory, used to store programs; A processor is used to execute the program, wherein the program is specifically used to implement the protective lens detection method as described in any one of claims 1 to 4.
10. A storage medium, characterized in that: The storage medium stores executable instructions, and when the instructions are executed by the processor, the protective lens detection method according to any one of claims 1 to 4 is implemented.