CN116571875A - Laser processing and detecting integrated equipment and method based on active projection technology - Google Patents
Laser processing and detecting integrated equipment and method based on active projection technology Download PDFInfo
- Publication number
- CN116571875A CN116571875A CN202310854015.3A CN202310854015A CN116571875A CN 116571875 A CN116571875 A CN 116571875A CN 202310854015 A CN202310854015 A CN 202310854015A CN 116571875 A CN116571875 A CN 116571875A
- Authority
- CN
- China
- Prior art keywords
- laser processing
- processing
- laser
- tube
- lead screw
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000012545 processing Methods 0.000 title claims abstract description 127
- 238000005516 engineering process Methods 0.000 title claims abstract description 27
- 238000000034 method Methods 0.000 title description 18
- 230000003287 optical effect Effects 0.000 claims abstract description 33
- 238000001514 detection method Methods 0.000 claims abstract description 28
- 230000001681 protective effect Effects 0.000 claims abstract description 21
- 239000000428 dust Substances 0.000 claims description 45
- 238000009434 installation Methods 0.000 claims description 8
- 239000000463 material Substances 0.000 claims description 8
- 238000005259 measurement Methods 0.000 claims description 6
- 210000000056 organ Anatomy 0.000 claims description 6
- 230000011218 segmentation Effects 0.000 claims description 6
- 241001292396 Cirrhitidae Species 0.000 claims description 5
- 230000008859 change Effects 0.000 claims description 5
- 238000000605 extraction Methods 0.000 claims description 5
- 238000007689 inspection Methods 0.000 claims description 5
- 238000012360 testing method Methods 0.000 claims description 5
- 238000004458 analytical method Methods 0.000 claims description 4
- 238000005452 bending Methods 0.000 claims description 3
- 238000004364 calculation method Methods 0.000 claims description 3
- 238000001914 filtration Methods 0.000 claims description 3
- 230000008676 import Effects 0.000 claims description 3
- 238000007781 pre-processing Methods 0.000 claims description 3
- 230000006870 function Effects 0.000 description 33
- 230000008569 process Effects 0.000 description 12
- 230000003068 static effect Effects 0.000 description 9
- 230000007547 defect Effects 0.000 description 8
- 238000010586 diagram Methods 0.000 description 7
- 230000010363 phase shift Effects 0.000 description 5
- 101150059273 PTR1 gene Proteins 0.000 description 4
- 238000005286 illumination Methods 0.000 description 3
- 239000011159 matrix material Substances 0.000 description 3
- 230000005856 abnormality Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000003384 imaging method Methods 0.000 description 2
- 239000011800 void material Substances 0.000 description 2
- 230000018199 S phase Effects 0.000 description 1
- 238000002679 ablation Methods 0.000 description 1
- 238000010521 absorption reaction Methods 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000005336 cracking Methods 0.000 description 1
- 230000001186 cumulative effect Effects 0.000 description 1
- 230000032798 delamination Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 238000007667 floating Methods 0.000 description 1
- 238000012804 iterative process Methods 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000003647 oxidation Effects 0.000 description 1
- 238000007254 oxidation reaction Methods 0.000 description 1
- 230000008439 repair process Effects 0.000 description 1
- 150000003384 small molecules Chemical class 0.000 description 1
Classifications
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B23—MACHINE TOOLS; METAL-WORKING NOT OTHERWISE PROVIDED FOR
- B23K—SOLDERING OR UNSOLDERING; WELDING; CLADDING OR PLATING BY SOLDERING OR WELDING; CUTTING BY APPLYING HEAT LOCALLY, e.g. FLAME CUTTING; WORKING BY LASER BEAM
- B23K26/00—Working by laser beam, e.g. welding, cutting or boring
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B23—MACHINE TOOLS; METAL-WORKING NOT OTHERWISE PROVIDED FOR
- B23K—SOLDERING OR UNSOLDERING; WELDING; CLADDING OR PLATING BY SOLDERING OR WELDING; CUTTING BY APPLYING HEAT LOCALLY, e.g. FLAME CUTTING; WORKING BY LASER BEAM
- B23K26/00—Working by laser beam, e.g. welding, cutting or boring
- B23K26/02—Positioning or observing the workpiece, e.g. with respect to the point of impact; Aligning, aiming or focusing the laser beam
- B23K26/03—Observing, e.g. monitoring, the workpiece
- B23K26/032—Observing, e.g. monitoring, the workpiece using optical means
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B23—MACHINE TOOLS; METAL-WORKING NOT OTHERWISE PROVIDED FOR
- B23K—SOLDERING OR UNSOLDERING; WELDING; CLADDING OR PLATING BY SOLDERING OR WELDING; CUTTING BY APPLYING HEAT LOCALLY, e.g. FLAME CUTTING; WORKING BY LASER BEAM
- B23K26/00—Working by laser beam, e.g. welding, cutting or boring
- B23K26/02—Positioning or observing the workpiece, e.g. with respect to the point of impact; Aligning, aiming or focusing the laser beam
- B23K26/04—Automatically aligning, aiming or focusing the laser beam, e.g. using the back-scattered light
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B23—MACHINE TOOLS; METAL-WORKING NOT OTHERWISE PROVIDED FOR
- B23K—SOLDERING OR UNSOLDERING; WELDING; CLADDING OR PLATING BY SOLDERING OR WELDING; CUTTING BY APPLYING HEAT LOCALLY, e.g. FLAME CUTTING; WORKING BY LASER BEAM
- B23K26/00—Working by laser beam, e.g. welding, cutting or boring
- B23K26/02—Positioning or observing the workpiece, e.g. with respect to the point of impact; Aligning, aiming or focusing the laser beam
- B23K26/06—Shaping the laser beam, e.g. by masks or multi-focusing
- B23K26/064—Shaping the laser beam, e.g. by masks or multi-focusing by means of optical elements, e.g. lenses, mirrors or prisms
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B23—MACHINE TOOLS; METAL-WORKING NOT OTHERWISE PROVIDED FOR
- B23K—SOLDERING OR UNSOLDERING; WELDING; CLADDING OR PLATING BY SOLDERING OR WELDING; CUTTING BY APPLYING HEAT LOCALLY, e.g. FLAME CUTTING; WORKING BY LASER BEAM
- B23K26/00—Working by laser beam, e.g. welding, cutting or boring
- B23K26/08—Devices involving relative movement between laser beam and workpiece
- B23K26/082—Scanning systems, i.e. devices involving movement of the laser beam relative to the laser head
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B23—MACHINE TOOLS; METAL-WORKING NOT OTHERWISE PROVIDED FOR
- B23K—SOLDERING OR UNSOLDERING; WELDING; CLADDING OR PLATING BY SOLDERING OR WELDING; CUTTING BY APPLYING HEAT LOCALLY, e.g. FLAME CUTTING; WORKING BY LASER BEAM
- B23K26/00—Working by laser beam, e.g. welding, cutting or boring
- B23K26/14—Working by laser beam, e.g. welding, cutting or boring using a fluid stream, e.g. a jet of gas, in conjunction with the laser beam; Nozzles therefor
- B23K26/142—Working by laser beam, e.g. welding, cutting or boring using a fluid stream, e.g. a jet of gas, in conjunction with the laser beam; Nozzles therefor for the removal of by-products
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B23—MACHINE TOOLS; METAL-WORKING NOT OTHERWISE PROVIDED FOR
- B23K—SOLDERING OR UNSOLDERING; WELDING; CLADDING OR PLATING BY SOLDERING OR WELDING; CUTTING BY APPLYING HEAT LOCALLY, e.g. FLAME CUTTING; WORKING BY LASER BEAM
- B23K26/00—Working by laser beam, e.g. welding, cutting or boring
- B23K26/70—Auxiliary operations or equipment
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P10/00—Technologies related to metal processing
- Y02P10/25—Process efficiency
Landscapes
- Physics & Mathematics (AREA)
- Optics & Photonics (AREA)
- Engineering & Computer Science (AREA)
- Plasma & Fusion (AREA)
- Mechanical Engineering (AREA)
- Laser Beam Processing (AREA)
- Length Measuring Devices By Optical Means (AREA)
Abstract
本发明公开了基于主动投影技术的激光加工检测一体化设备及检测方法,包括防护房,在防护房的内部设置有激光加工装置,在防护房的侧壁上设置有相机;激光加工装置包括底座,在底座的上方设置有工作台,在工作台上设置有激光发生器以及振镜;激光发生器与振镜通过光路系统连接;在防护房的内部还设置有结构光投影仪,结构光投影仪设置在防护房侧壁的上端。通过本发明中的装置,减小了光路的体积,节约了激光加工装置所占用的空间。通过设置相机和结构光投影仪对加工的工件进行检测,通过检测结果得出工件的加工是否存在误差,根据误差信息进行调整和纠正,达到辅助激光加工装置对工件加工的目的,保证了加工质量以及加工效率。
The invention discloses laser processing and detection integrated equipment and a detection method based on active projection technology, comprising a protective room, a laser processing device is arranged inside the protective room, and a camera is arranged on the side wall of the protective room; the laser processing device includes a base , a workbench is set above the base, and a laser generator and a galvanometer are set on the workbench; the laser generator and the galvanometer are connected through an optical system; a structured light projector is also set inside the protective room, and the structured light projection The instrument is set on the upper end of the side wall of the protective room. Through the device in the invention, the volume of the optical path is reduced, and the space occupied by the laser processing device is saved. The processed workpiece is detected by setting up a camera and a structured light projector, and whether there is an error in the processing of the workpiece can be obtained through the detection result, and adjusted and corrected according to the error information, so as to achieve the purpose of assisting the laser processing device in processing the workpiece and ensure the processing quality. and processing efficiency.
Description
技术领域technical field
本发明属于激光加工技术领域,具体为基于主动投影技术的激光加工检测一体化设备及检测方法。The invention belongs to the technical field of laser processing, and in particular relates to integrated laser processing and detection equipment and a detection method based on active projection technology.
背景技术Background technique
紫外激光加工通过光化学消融作用实现,即依靠紫外激光能量打断原子或分子间的键合,使其转化为小分子并气化、蒸发。紫外激光聚焦光斑非常小,且加工热影响区域微乎其微,因而能够进行超精细雕刻、特殊材料加工。紫外激光加工采用的是冷光源,波长仅为355nm,聚焦光斑的直径小,各种材料对紫外光的吸收率较高,且热影响力也极小(可忽略不计)。这种特性使得紫外激光加工可实现精细的加工效果。Ultraviolet laser processing is realized by photochemical ablation, that is, relying on ultraviolet laser energy to break the bonds between atoms or molecules, transform them into small molecules, and gasify and evaporate them. The focused spot of ultraviolet laser is very small, and the processing heat-affected area is very small, so it can carry out ultra-fine engraving and special material processing. Ultraviolet laser processing uses a cold light source, the wavelength is only 355nm, the diameter of the focused spot is small, the absorption rate of various materials for ultraviolet light is high, and the thermal influence is also very small (negligible). This characteristic enables UV laser processing to achieve fine processing effects.
现有技术中,紫外激光加工设备由激光器发射出激光,再通过光路系统进入振镜内部,经过振镜偏转和聚焦后作用于工件表面,由于激光器产生的激光不能通过光纤线传输,所以光路和激光器必须在同一平面内,调整激光焦距时激光器、光路、振镜相对位置必须不变,这将导致整个光路占用空间较大,在一些空间较小的场所无法使用,同时大功率的激光器重量较重,对光路进行焦距调节的升降系统要同时带动激光器、光路、振镜一起运动,因此对升降平台的负载要求较高。In the prior art, the ultraviolet laser processing equipment emits laser light from the laser, and then enters the inside of the galvanometer through the optical path system, and acts on the surface of the workpiece after being deflected and focused by the galvanometer. Since the laser generated by the laser cannot be transmitted through the optical fiber line, the optical path and The laser must be in the same plane. When adjusting the laser focal length, the relative positions of the laser, the optical path, and the galvanometer must remain unchanged. This will cause the entire optical path to take up a large space and cannot be used in some places with small spaces. At the same time, the weight of high-power lasers is relatively heavy. The lifting system that adjusts the focal length of the optical path must simultaneously drive the laser, optical path, and vibrating mirror to move together, so the load requirements for the lifting platform are relatively high.
激光在加工材料时,具有可加工复杂织构且无刀具损伤引入等特点,但激光加工在实际应用过程中容易出现锥度、波纹等加工缺陷,而热影响区的存在亦会引起工件的氧化、分层、开裂等现象。因此,本发明提出一种基于主动投影技术的激光加工检测一体化设备及检测方法,在对材料进行加工时,能够对材料的表面缺陷进行检测,根据检测信息对激光加工过程进行调整和纠正,达到辅助激光加工装置对工件加工的目的。When processing materials, laser has the characteristics of being able to process complex textures without introducing tool damage, but laser processing is prone to processing defects such as taper and corrugation in the actual application process, and the existence of the heat-affected zone will also cause oxidation of the workpiece, Delamination, cracking and other phenomena. Therefore, the present invention proposes a laser processing and detection integrated equipment and detection method based on active projection technology, which can detect the surface defects of the material when processing the material, and adjust and correct the laser processing process according to the detection information. The purpose of assisting the laser processing device in processing the workpiece is achieved.
结构光三维重建是一种基于光学原理和计算机视觉技术的三维形状检测方法。它利用结构光投射器将特定编码的光模式投射到目标物体上,通过捕捉被物体表面反射或散射的光,并分析其变形信息,从而获取物体表面的三维几何形状。Structured light 3D reconstruction is a 3D shape detection method based on optical principles and computer vision technology. It uses a structured light projector to project a specific coded light pattern onto the target object, and obtains the three-dimensional geometry of the object surface by capturing the light reflected or scattered by the object surface and analyzing its deformation information.
在过去目标物体的三维重建常常需要使用昂贵的激光扫描仪或复杂的摄影测量系统来获取其几何信息。然而,随着计算机视觉和投影技术的发展,结构光三维重建成为一种更加高效和经济的方法,广泛应用于计算机图形学、计算机视觉、虚拟现实、工业制造等领域。结构光三维重建的基本原理是通过投射结构化的光模式(通常是条纹或编码图案)到目标物体上,然后利用相机或传感器捕捉物体表面反射或散射的光,通过分析被捕捉到的光模式在物体表面的变形,可以推断出物体表面的深度或三维坐标。In the past, the 3D reconstruction of target objects often required the use of expensive laser scanners or complex photogrammetry systems to obtain their geometric information. However, with the development of computer vision and projection technology, structured light 3D reconstruction has become a more efficient and economical method, which is widely used in computer graphics, computer vision, virtual reality, industrial manufacturing and other fields. The basic principle of structured light 3D reconstruction is to project a structured light pattern (usually stripes or coded patterns) onto the target object, and then use a camera or sensor to capture the light reflected or scattered on the surface of the object, and analyze the captured light pattern Deformation on the surface of the object, the depth or three-dimensional coordinates of the object surface can be inferred.
发明内容Contents of the invention
本发明的目的在于提供基于主动投影技术的激光加工检测一体化设备及检测方法,以解决背景技术中提出的,在现有技术中光路占用空间较大,在一些空间较小的场所无法使用以及对光路进行焦距调节的升降系统要同时带动激光器、光路、振镜一起运动,而一些大功率的激光器重量较重对升降平台的负载要求较高的问题,以及激光加工在实际应用过程中对于成形误差不能及时检测的问题,比如加工过程容易出现的锥度、波纹等加工缺陷。The purpose of the present invention is to provide laser processing and detection integrated equipment and detection method based on active projection technology to solve the problem in the background technology that the optical path occupies a large space in the prior art and cannot be used in some places with small space. The lifting system that adjusts the focal length of the optical path must simultaneously drive the laser, the optical path, and the vibrating mirror to move together, and some high-power lasers are heavy, which requires a higher load on the lifting platform, and the actual application of laser processing in the process of forming Problems that errors cannot be detected in time, such as processing defects such as taper and ripple that are prone to occur during processing.
为解决上述技术问题,本发明所采用的技术方案是:In order to solve the problems of the technologies described above, the technical solution adopted in the present invention is:
基于主动投影技术的激光加工检测一体化设备,包括防护房,在防护房的内部设置有激光加工装置;Integrated laser processing and testing equipment based on active projection technology, including a protective room, where a laser processing device is installed inside the protective room;
激光加工装置包括底座,在底座的上方设置有工作台,在工作台上设置有激光发生器以及振镜;其中,激光发生器与振镜通过光路系统连接;在工作台上还设置有加工台,加工台设置在振镜的下方,加工台用于安装工件;The laser processing device includes a base, and a worktable is arranged above the base, and a laser generator and a vibrating mirror are arranged on the working table; wherein, the laser generator and the vibrating mirror are connected through an optical system; a processing table is also arranged on the working table , the processing table is set under the vibrating mirror, and the processing table is used to install the workpiece;
在防护房的内部设置有结构光投影仪,结构光投影仪设置在防护房侧壁的上端;结构光投影仪用于将编码好的条纹投影到工件表面,在防护房的侧壁上还设置有相机,相机用于记录被成像工件高度调制的变形条纹图像。A structured light projector is arranged inside the protective room, and the structured light projector is set on the upper end of the side wall of the protective room; the structured light projector is used to project the coded stripes onto the surface of the workpiece, and a There are cameras, which are used to record images of deformed fringes that are highly modulated by the imaged workpiece.
根据上述技术方案,光路系统包括光筒、激光折射筒以及伸缩筒;其中,光筒包括第一光筒和第二光筒,激光折射筒包括第一折射筒、第二折射筒以及第三折射筒;第一光筒的一端与激光发生器连接,第一光筒的另一端与第一折射筒连接;第二光筒的一端与第一折射筒连接,第二光筒的另一端与第二折射筒连接;According to the above technical solution, the optical path system includes an optical tube, a laser refracting tube, and a telescopic tube; wherein, the optical tube includes a first optical tube and a second optical tube, and the laser refracting tube includes a first refracting tube, a second refracting tube, and a third refracting tube. One end of the first light tube is connected with the laser generator, the other end of the first light tube is connected with the first refracting tube; one end of the second light tube is connected with the first refracting tube, and the other end of the second light tube is connected with the first refracting tube Two refractor connection;
第二折射筒通过伸缩筒与第三折射筒连接,第三折射筒与振镜连接。The second refracting cylinder is connected with the third refracting cylinder through the telescopic cylinder, and the third refracting cylinder is connected with the vibrating mirror.
根据上述技术方案,伸缩筒包括第一连接段和第二连接段;其中,第一连接段的一端与第二折射筒连接,第二连接段与第三折射筒连接,第一连接段和第二连接段之间通过管状风琴罩连接。According to the above technical solution, the telescopic cylinder includes a first connecting section and a second connecting section; wherein, one end of the first connecting section is connected to the second refracting cylinder, the second connecting section is connected to the third refracting cylinder, and the first connecting section and the second refracting cylinder are connected. The two connecting sections are connected through a tubular organ cover.
根据上述技术方案,工作台上包括固定座以及支撑立柱;其中,支撑立柱固定设置在固定座上,支撑立柱的上方设置有横梁,激光发生器固定设置在横梁上。According to the above technical solution, the workbench includes a fixing seat and a supporting column; wherein, the supporting column is fixedly arranged on the fixing seat, a beam is arranged above the supporting column, and the laser generator is fixedly arranged on the beam.
根据上述技术方案,横梁上还设置有驱动组件,驱动组件用于带动振镜上下移动。According to the above technical solution, a driving assembly is also arranged on the beam, and the driving assembly is used to drive the vibrating mirror to move up and down.
根据上述技术方案,驱动组件包括滑轨座、驱动装置以及安装台;其中,滑轨座固定设置在横梁上,驱动装置设置在滑轨座的上方,在滑轨座的内部设置有丝杠,驱动装置用于驱动丝杠转动;According to the above technical solution, the driving assembly includes a slide rail seat, a driving device and a mounting table; wherein, the slide rail seat is fixedly arranged on the beam, the driving device is arranged above the slide rail seat, and a lead screw is arranged inside the slide rail seat. The driving device is used to drive the screw to rotate;
安装台与滑轨座滑动连接,且安装台穿过滑轨座与丝杠连接;通过丝杠转动,带动安装台上下移动;振镜固定设置在安装台上。The installation platform is slidingly connected with the slide rail seat, and the installation platform passes through the slide rail seat and is connected with the lead screw; the rotation of the lead screw drives the installation platform to move up and down; the oscillating mirror is fixedly arranged on the installation platform.
根据上述技术方案,激光加工装置还包括除尘装置;除尘装置用于除去激光加工过程中的灰尘。According to the above technical solution, the laser processing device further includes a dust removal device; the dust removal device is used to remove dust during laser processing.
根据上述技术方案,除尘装置包括集尘罩、集尘管道以及集尘箱;其中,集尘罩设置在加工台的侧面,且集尘罩的开口面向加工台设置;集尘箱设置在底座的侧面,集尘管道用于连接集尘罩与集尘箱。According to the above technical solution, the dust removal device includes a dust collection hood, a dust collection pipe, and a dust collection box; wherein, the dust collection cover is arranged on the side of the processing table, and the opening of the dust collection hood is arranged facing the processing table; the dust collection box is arranged on the side of the base. On the side, the dust collection pipe is used to connect the dust collection hood and the dust collection box.
根据上述技术方案,在工作台上还设置有滑动平台、第一驱动装置和第二驱动装置;其中,加工台设置在滑动平台上,滑动平台与工作台滑动连接;第一驱动装置驱动滑动平台在工作台上左右移动,第二驱动装置驱动加工台在滑动平台上前后移动;According to the above technical solution, a sliding platform, a first driving device and a second driving device are also arranged on the workbench; wherein, the processing table is arranged on the sliding platform, and the sliding platform is slidably connected to the workbench; the first driving device drives the sliding platform Move left and right on the worktable, and the second driving device drives the processing table to move back and forth on the sliding platform;
第一驱动装置包括第一电机和第一丝杠;第二驱动装置包括第二电机和第二丝杠;其中,第一丝杠转动设置在工作台的内部,滑动平台设置在第一转动丝杠上,第一电机驱动第一丝杠转动;第二丝杠设置在滑动平台的内部,加工台滑动设置在第二丝杠上,第二电机驱动第二丝杠转动。The first driving device includes a first motor and a first leading screw; the second driving device includes a second motor and a second leading screw; wherein, the first leading screw is rotated inside the workbench, and the sliding platform is arranged on the first rotating screw On the rod, the first motor drives the first lead screw to rotate; the second lead screw is arranged inside the sliding platform, the processing table is slidably arranged on the second lead screw, and the second motor drives the second lead screw to rotate.
基于主动投影技术的激光加工检测一体化设备的检测方法,包括以下步骤:The detection method of laser processing and detection integrated equipment based on active projection technology includes the following steps:
步骤S1,将标定板水平置于工作台,进行双目标定;Step S1, placing the calibration board horizontally on the workbench for dual-target calibration;
步骤S2,利用GeneratePattern算法生成黑白条纹,将其写入结构光投影仪对工件表面投影,并通过相机采集变形条纹,从而获取工件的包裹相位;Step S2, use the GeneratePattern algorithm to generate black and white stripes, write them into the structured light projector to project the surface of the workpiece, and collect the deformed stripes through the camera, so as to obtain the wrapping phase of the workpiece;
步骤3,经PhaseAnalyse算法做相位解包,对经过双目标定后的两台相机(200)获取的图像进行立体匹配,计算左右图像中对应像素的水平偏移量,即视差,根据视差信息计算分析获得三维信息;步骤4,利用高效、鲁棒式图像处理及分割技术对采集三维的数据进行去噪、滤波、配准等预处理操作;再导入GOMSoftware进行点云重建,对重建出的点云进行点云拼接、分割、特征提取、网格化等处理操作,以获取更加完整、准确的表面织构几何形貌特征,实现无接触式测量;Step 3: Perform phase unpacking by the PhaseAnalyse algorithm, perform stereo matching on the images acquired by the two cameras (200) after dual-target positioning, and calculate the horizontal offset of the corresponding pixels in the left and right images, that is, the parallax, calculated according to the parallax information Analyze and obtain 3D information; step 4, use efficient and robust image processing and segmentation technology to perform preprocessing operations such as denoising, filtering, and registration on the collected 3D data; then import GOMSoftware for point cloud reconstruction, and reconstruct the points The cloud performs point cloud stitching, segmentation, feature extraction, gridding and other processing operations to obtain more complete and accurate surface texture geometric features and realize non-contact measurement;
步骤5,对比理想所需点云图,利用Halcon分析材料激光加工表面锥度、波纹度及弯曲特征,并将特征位置反馈至激光加工装置,对工件的表面织构的结构特征进行优化,直到测量平面与目标平面表面平整、无起伏或凹凸,即公差范围在±20μm,在弯曲处,角度变化小于或等于1°。Step 5. Compare the ideal point cloud image, use Halcon to analyze the taper, waviness and bending characteristics of the material laser processing surface, and feed back the feature position to the laser processing device to optimize the structural characteristics of the surface texture of the workpiece until the measurement plane It is flat with the target plane surface, without ups and downs or bumps, that is, the tolerance range is ±20μm, and at the bend, the angle change is less than or equal to 1°.
与现有技术相比,本发明具有以下有益效果:Compared with the prior art, the present invention has the following beneficial effects:
通过本发明中的装置,将激光发生器以及振镜设置在工作台上的上方,并通过光路系统连接激光发生器以及振镜,减小了光路的体积,节约了激光加工装置所占用的空间。Through the device in the present invention, the laser generator and the vibrating mirror are arranged above the workbench, and the laser generator and the vibrating mirror are connected through the optical path system, which reduces the volume of the optical path and saves the space occupied by the laser processing device .
并且,通过在防护房的内部设置相机和结构光投影仪,通过结构光投影仪将编码好的条纹投影到被成像的工件表面,再通过设置的相机来捕捉变形条纹,对完成加工的工件进行检测,通过检测结果得出工件的加工是否存在误差,当检测结果表明工件加工存在误差时,将误差信息传递给激光控制中心,激光控制中心根据误差信息对加工过程进行调整和纠正。In addition, by setting a camera and a structured light projector inside the protective room, the encoded stripes are projected onto the surface of the imaged workpiece through the structured light projector, and then the deformed stripes are captured by the set camera, and the processed workpiece is processed Detection, through the detection results, it is found whether there is an error in the processing of the workpiece. When the detection result shows that there is an error in the processing of the workpiece, the error information is transmitted to the laser control center, and the laser control center adjusts and corrects the processing process according to the error information.
达到辅助激光加工装置对工件加工的目的,从而保证了加工质量以及加工效率。The purpose of assisting the laser processing device in processing the workpiece is achieved, thereby ensuring the processing quality and processing efficiency.
附图说明Description of drawings
图1为本发明整体结构的侧视结构示意图;Fig. 1 is the side view structural representation of overall structure of the present invention;
图2为本发明整体正视结构示意图;Fig. 2 is a schematic diagram of the overall front view structure of the present invention;
图3为本发明激光加工装置结构示意图之一;Fig. 3 is one of structural schematic diagrams of the laser processing device of the present invention;
图4为本发明激光加工装置结构示意图之二;Fig. 4 is the second structural diagram of the laser processing device of the present invention;
图5为本发明A处局部放大示意图;Fig. 5 is the partially enlarged schematic diagram of place A of the present invention;
图6为本发明驱动组件剖视结构示意图;6 is a schematic cross-sectional structure diagram of the drive assembly of the present invention;
图7为本发明驱动组件立体结构示意图;Fig. 7 is a schematic diagram of the three-dimensional structure of the drive assembly of the present invention;
图8为本发明工件加工不符合要求的点云分析结果图;Fig. 8 is the point cloud analysis result figure that the workpiece processing of the present invention does not meet the requirements;
图9为本发明工件加工符合要求的点云分析结果图。Fig. 9 is a diagram of point cloud analysis results of workpiece processing in the present invention meeting the requirements.
图中标记:100-防护房,200-相机,300-激光加工装置,400-底座,500-工作台,600-激光发生器,700-振镜,800-加工台,900-结构光投影仪,110-第一光筒,111-第二光筒,112-第一折射筒,113-第二折射筒,114-第三折射筒,115-伸缩筒,116-第一连接段,117-第二连接段,118-管状风琴罩,119-固定座,120-支撑立柱,121-横梁,122-驱动组件,123-滑轨座,124-驱动装置,125-安装台,126-丝杠,127-除尘装置,128-集尘罩,129-集尘管道,130-集尘箱,131-滑动平台。Marks in the figure: 100-protective room, 200-camera, 300-laser processing device, 400-base, 500-worktable, 600-laser generator, 700-galvanometer, 800-processing table, 900-structured light projector , 110-first light tube, 111-second light tube, 112-first refraction tube, 113-second refraction tube, 114-third refraction tube, 115-telescopic tube, 116-first connecting section, 117- The second connecting section, 118-tubular organ cover, 119-fixing seat, 120-supporting column, 121-beam, 122-driving assembly, 123-slide rail seat, 124-driving device, 125-installation platform, 126-lead screw , 127-dust removal device, 128-dust collection hood, 129-dust collection pipeline, 130-dust collection box, 131-sliding platform.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.
实施例一Embodiment one
如图1所示,基于主动投影技术的激光加工检测一体化设备及检测方法,包括防护房100,在防护房100的内部设置有激光加工装置300,在防护房100的侧壁上设置有相机200,相机200用于记录被成像工件高度调制的变形条纹图像;As shown in Figure 1, the laser processing and detection integrated equipment and detection method based on active projection technology includes a protective room 100, a laser processing device 300 is arranged inside the protective room 100, and a camera is arranged on the side wall of the protective room 100 200, the camera 200 is used to record the deformed fringe image modulated by the height of the imaged workpiece;
如图2所示,激光加工装置300包括底座400,在底座400的上方设置有工作台500,在工作台500上设置有激光发生器600以及振镜700;其中,激光发生器600与振镜700通过光路系统连接;在工作台500上还设置有加工台800,加工台800设置在振镜700的下方,加工台800用于安装工件;As shown in Figure 2, the laser processing device 300 includes a base 400, a workbench 500 is arranged above the base 400, and a laser generator 600 and a vibrating mirror 700 are arranged on the workbench 500; wherein, the laser generator 600 and the vibrating mirror 700 is connected through an optical path system; a processing table 800 is also provided on the workbench 500, and the processing table 800 is arranged below the vibrating mirror 700, and the processing table 800 is used for installing workpieces;
在防护房100的内部设置有结构光投影仪900,结构光投影仪900设置在防护房100侧壁的上端;结构光投影仪900用于将编码好的条纹投影到工件表面,在防护房100的侧壁上还设置有相机200,相机200用于记录被成像工件高度调制的变形条纹图像。A structured light projector 900 is arranged inside the protective room 100, and the structured light projector 900 is arranged on the upper end of the side wall of the protective room 100; A camera 200 is also arranged on the side wall of the camera 200, and the camera 200 is used to record the deformed fringe image modulated by the height of the imaged workpiece.
通过本发明中的装置,将激光发生器600以及振镜700设置在工作台500上的上方,并通过光路系统连接激光发生器600以及振镜700,减小了光路的体积,节约了激光加工装置300所占用的空间。Through the device in the present invention, the laser generator 600 and the vibrating mirror 700 are arranged above the workbench 500, and the laser generator 600 and the vibrating mirror 700 are connected through the optical path system, which reduces the volume of the optical path and saves laser processing. The space occupied by the device 300.
并且,通过在防护房100的内部设置相机200和结构光投影仪900,通过结构光投影仪900将编码好的条纹投影到被成像的工件表面,再通过设置的相机200来捕捉变形条纹,对完成加工的工件进行检测,通过检测结果得出工件的加工是否存在误差,当检测结果表明工件加工存在误差时,将误差信息传递给激光控制中心,激光控制中心根据误差信息对加工过程进行调整和纠正。Moreover, by setting the camera 200 and the structured light projector 900 inside the protective room 100, the encoded fringes are projected onto the surface of the imaged workpiece through the structured light projector 900, and then the set camera 200 is used to capture the deformed fringes. The processed workpiece is inspected, and whether there is an error in the processing of the workpiece is obtained through the inspection result. When the inspection result shows that there is an error in the processing of the workpiece, the error information is transmitted to the laser control center, and the laser control center adjusts the processing process according to the error information. correct.
达到辅助激光加工装置300对工件加工的目的,从而保证了加工质量以及加工效率。The purpose of assisting the laser processing device 300 in processing the workpiece is achieved, thereby ensuring the processing quality and processing efficiency.
实施例二Embodiment two
本实施例为实施例一的进一步细化。This embodiment is a further refinement of Embodiment 1.
如图4所示,光路系统包括光筒、激光折射筒以及伸缩筒115;其中,光筒包括第一光筒110和第二光筒111,激光折射筒包括第一折射筒112、第二折射筒113以及第三折射筒114;第一光筒110的一端与激光发生器600连接,第一光筒110的另一端与第一折射筒112连接;第二光筒111的一端与第一折射筒112连接,第二光筒111的另一端与第二折射筒113连接;As shown in Figure 4, the optical path system includes an optical cylinder, a laser refracting cylinder, and a telescopic cylinder 115; wherein, the optical cylinder includes a first optical cylinder 110 and a second optical cylinder 111, and the laser refracting cylinder includes a first refracting cylinder 112, a second refracting cylinder cylinder 113 and the third refraction cylinder 114; one end of the first light cylinder 110 is connected to the laser generator 600, and the other end of the first light cylinder 110 is connected to the first refraction cylinder 112; one end of the second light cylinder 111 is connected to the first refraction cylinder The tube 112 is connected, and the other end of the second optical tube 111 is connected with the second refracting tube 113;
第二折射筒113通过伸缩筒115与第三折射筒114连接,第三折射筒114与振镜700连接。The second refracting cylinder 113 is connected to the third refracting cylinder 114 through the telescopic cylinder 115 , and the third refracting cylinder 114 is connected to the vibrating mirror 700 .
进一步的,第一光筒110和第二光筒111均为空心圆柱结构;第一光筒110的两端需要做密封处理,第二光筒111的两端也需要密封处理。Further, both the first light cylinder 110 and the second light cylinder 111 are hollow cylindrical structures; both ends of the first light cylinder 110 need to be sealed, and both ends of the second light cylinder 111 also need to be sealed.
进一步的,激光折射筒的内部固定设置有(例如粘接固定)折射镜片,通过激光折射筒内部设置的折射镜片使得激光发生90°的折射。Further, the laser refracting tube is fixed with (for example, glued and fixed) a refracting lens inside, and the laser is refracted by 90° through the refracting lens installed inside the laser refracting tube.
如图5所示,伸缩筒115包括第一连接段116和第二连接段117;其中,第一连接段116的一端与第二折射筒113连接,第二连接段117与第三折射筒114连接,第一连接段116和第二连接段117之间通过管状风琴罩118连接。As shown in Figure 5, the telescopic cylinder 115 includes a first connecting section 116 and a second connecting section 117; wherein, one end of the first connecting section 116 is connected to the second refracting cylinder 113, and the second connecting section 117 is connected to the third refracting cylinder 114 Connection, the first connection section 116 and the second connection section 117 are connected through a tubular organ cover 118 .
进一步的,如图5所示,管状风琴罩118的一端与第二连接段117固定连接,管状风琴罩118的另一端与第一连接段116固定连接,管状风琴罩118具有一定的伸缩性。Further, as shown in FIG. 5 , one end of the tubular bellows 118 is fixedly connected to the second connecting section 117 , and the other end of the tubular bellows 118 is fixedly connected to the first connecting section 116 . The tubular bellows 118 has a certain degree of stretchability.
由于第二连接段117与第三折射筒114固定连接,第三折射筒114又与振镜700固定连接,当驱动组件122带动振镜700向下移动时,会带动第三折射筒114以及第二连接段117一起向下移动,使得管状风琴罩118发生变形,从而将管状风琴罩118拉长。Since the second connecting section 117 is fixedly connected to the third refracting tube 114, and the third refracting tube 114 is fixedly connected to the vibrating mirror 700, when the driving assembly 122 drives the vibrating mirror 700 to move downward, it will drive the third refracting tube 114 and the vibrating mirror 700 to move downward. The two connecting sections 117 move downward together, so that the tubular bellows 118 is deformed, thereby elongating the tubular bellows 118 .
通过驱动组件122以及伸缩筒115来改变振镜700的高度,调整了激光焦距,使得激光加工装置300的加工更为灵活;又能保证激光发生器600、光路系统、振镜相对位置保持不变,保证了加工效果;并且,本发明中的装置对于对升降系统的负载要求也会更低。The height of the vibrating mirror 700 is changed by the driving assembly 122 and the telescopic tube 115, and the focal length of the laser is adjusted, making the processing of the laser processing device 300 more flexible; and ensuring that the relative positions of the laser generator 600, the optical path system, and the vibrating mirror remain unchanged , to ensure the processing effect; moreover, the device in the present invention has lower requirements on the load of the lifting system.
进一步的,管状风琴罩118采用现有装置,例如:采用上银KK118管状风琴罩。Further, the tubular organ cover 118 adopts an existing device, for example, adopts Shangyin KK118 tubular organ cover.
进一步的,振镜700采用现有装置,例如:FL7210-3D-300型动态聚焦振镜。Further, the vibrating mirror 700 adopts an existing device, for example: FL7210-3D-300 dynamic focusing vibrating mirror.
进一步的,相机200采用现有装置,例如:海康威视的MV-CH120-11UM相机。Further, the camera 200 adopts an existing device, for example, the MV-CH120-11UM camera of Hikvision.
工作台500上包括固定座119以及支撑立柱120;其中,支撑立柱120固定设置在固定座119上,支撑立柱120的上方设置有横梁121,激光发生器600固定设置在横梁121上;横梁121上还设置有驱动组件122,驱动组件122用于带动振镜700上下移动。The workbench 500 includes a fixed seat 119 and a supporting column 120; wherein, the supporting column 120 is fixedly arranged on the fixed seat 119, and a beam 121 is arranged above the supporting column 120, and the laser generator 600 is fixedly arranged on the beam 121; on the beam 121 A driving assembly 122 is also provided, and the driving assembly 122 is used to drive the vibrating mirror 700 to move up and down.
如图3所示,通过将激光发生器600以及驱动组件122固定设置在横梁121上,在满足工件加工要求的前提下,也能有效的降低激光加工装置300的占用空间。As shown in FIG. 3 , by fixing the laser generator 600 and the driving assembly 122 on the beam 121 , the occupied space of the laser processing device 300 can be effectively reduced on the premise of meeting the processing requirements of the workpiece.
如图6和图7所示,驱动组件122包括滑轨座123、驱动装置124以及安装台125;其中,滑轨座123固定设置在横梁121上,驱动装置124设置在滑轨座123的上方,在滑轨座123的内部设置有丝杠126,驱动装置124用于驱动丝杠126转动;As shown in Figures 6 and 7, the drive assembly 122 includes a slide rail seat 123, a driving device 124, and a mounting table 125; wherein, the slide rail seat 123 is fixedly arranged on the beam 121, and the drive device 124 is arranged above the slide rail seat 123 , a lead screw 126 is arranged inside the slide rail seat 123, and the driving device 124 is used to drive the lead screw 126 to rotate;
安装台125与滑轨座123滑动连接,且安装台125穿过滑轨座123与丝杠126连接;通过丝杠126转动,带动安装台125上下移动;振镜700固定设置在安装台125上。The mounting table 125 is slidingly connected to the slide rail seat 123, and the mounting table 125 is connected to the screw 126 through the slide rail seat 123; the screw 126 is rotated to drive the mounting table 125 to move up and down; the vibrating mirror 700 is fixedly arranged on the mounting table 125 .
进一步的,驱动装置124采用电机。Further, the driving device 124 adopts a motor.
进一步的,在滑轨座123的内部还设置有轨道,安装台125与轨道滑动连接。Further, a track is provided inside the slide rail seat 123 , and the mounting table 125 is slidably connected to the track.
进一步的,轨道设置有两根,两根轨道分别设置在丝杠126的两侧。Further, there are two rails, and the two rails are respectively arranged on both sides of the lead screw 126 .
进一步的,滑轨座123包括安装座和盖板;其中,安装座固定设置在横梁121上,盖板与安装座之间设置有间隙,安装台125穿过间隙与滑轨座123滑动连接。Further, the slide rail seat 123 includes a mounting seat and a cover plate; wherein, the mounting seat is fixedly arranged on the beam 121 , a gap is provided between the cover plate and the mounting seat, and the mounting platform 125 is slidably connected with the slide rail seat 123 through the gap.
激光加工装置300还包括除尘装置127;除尘装置127用于除去激光加工过程中的灰尘。除尘装置127包括集尘罩128、集尘管道129以及集尘箱130;其中,集尘罩128设置在加工台800的侧面,且集尘罩128的开口面向加工台800设置;集尘箱130设置在底座400的侧面,集尘管道129用于连接集尘罩128与集尘箱130。The laser processing device 300 also includes a dust removal device 127; the dust removal device 127 is used to remove dust during laser processing. Dust removal device 127 comprises dust collection cover 128, dust collection pipeline 129 and dust collection box 130; Wherein, dust collection cover 128 is arranged on the side of processing table 800, and the opening of dust collection cover 128 is arranged facing processing table 800; Dust collection box 130 Set on the side of the base 400 , the dust collection pipe 129 is used to connect the dust collection cover 128 and the dust collection box 130 .
进一步的,在集尘箱130的内部设置有负压风机,通过负压风机将加工台800上产生的灰尘进行收集。Further, a negative pressure fan is provided inside the dust collecting box 130, and the dust generated on the processing table 800 is collected by the negative pressure fan.
在工作台上还设置有滑动平台131、第一驱动装置和第二驱动装置;其中,加工台设置在滑动平台131上,滑动平台131与工作台滑动连接;第一驱动装置驱动滑动平台131在工作台上左右移动,第二驱动装置驱动加工台在滑动平台131上前后移动;Also be provided with sliding platform 131, first driving device and second driving device on workbench; Wherein, processing station is arranged on sliding platform 131, and sliding platform 131 is slidingly connected with workbench; First driving device drives sliding platform 131 on The worktable moves left and right, and the second drive device drives the processing table to move back and forth on the sliding platform 131;
第一驱动装置包括第一电机和第一丝杠;第二驱动装置包括第二电机和第二丝杠;其中,第一丝杠转动设置在工作台的内部,滑动平台131设置在第一转动丝杠上,第一电机驱动第一丝杠转动;第二丝杠设置在滑动平台131的内部,加工台滑动设置在第二丝杠上,第二电机驱动第二丝杠转动。The first driving device includes a first motor and a first leading screw; the second driving device includes a second motor and a second leading screw; wherein, the first leading screw is rotated inside the workbench, and the sliding platform 131 is arranged on the first rotating On the lead screw, the first motor drives the first lead screw to rotate; the second lead screw is arranged inside the sliding platform 131, the processing table is slidably arranged on the second lead screw, and the second motor drives the second lead screw to rotate.
本发明的工作原理为:在使用时,通过激光发生器600与光路系统配合,将激光经过多次折射后,传递至振镜700,再经过振镜700对工件进行加工。The working principle of the present invention is as follows: when in use, the laser generator 600 cooperates with the optical path system to transmit the laser light to the vibrating mirror 700 after multiple refractions, and then process the workpiece through the vibrating mirror 700 .
当需要调整振镜700的高度时,通过驱动组件122带动振镜700、第三折射筒114以及第二连接段117一起向下移动,使得管状风琴罩118发生变形,从而将管状风琴罩118拉长,完成对振镜700的高度调整。When the height of the vibrating mirror 700 needs to be adjusted, the driving assembly 122 drives the vibrating mirror 700, the third refracting tube 114 and the second connecting section 117 to move downward together, so that the tubular bellows 118 is deformed, thereby pulling the tubular bellows 118 Long, to complete the height adjustment of the galvanometer 700.
实施例三Embodiment three
基于主动投影技术的激光加工检测一体化设备的检测方法,包括以下步骤:The detection method of laser processing and detection integrated equipment based on active projection technology includes the following steps:
步骤S1,将标定板水平置于工作台500,进行双目标定;Step S1, place the calibration plate horizontally on the workbench 500, and perform double-target calibration;
步骤S2,利用GeneratePattern算法生成黑白条纹,将其写入结构光投影仪900对工件表面投影,并通过相机200采集变形条纹,从而获取工件的包裹相位;Step S2, using the GeneratePattern algorithm to generate black and white stripes, writing them into the structured light projector 900 to project the surface of the workpiece, and collecting the deformed stripes through the camera 200, so as to obtain the wrapping phase of the workpiece;
步骤S3,经PhaseAnalyse算法做相位解包,对经过双目标定后的两台相机(200)获取的图像进行立体匹配,计算左右图像中对应像素的水平偏移量,即视差,根据视差信息计算分析获得三维信息;Step S3: Perform phase unpacking by the PhaseAnalyse algorithm, perform stereo matching on the images acquired by the two cameras (200) after dual-target positioning, and calculate the horizontal offset of the corresponding pixels in the left and right images, that is, the parallax, which is calculated according to the parallax information Analyze and obtain three-dimensional information;
步骤S4,利用高效、鲁棒式图像处理及分割技术对采集三维的数据进行去噪、滤波、配准等预处理操作;再导入GOMSoftware进行点云重建,对重建出的点云进行点云拼接、分割、特征提取、网格化等处理操作,以获取更加完整、准确的表面织构几何形貌特征,实现无接触式测量;Step S4, use efficient and robust image processing and segmentation technology to perform preprocessing operations such as denoising, filtering, and registration on the collected 3D data; then import GOMSoftware for point cloud reconstruction, and perform point cloud splicing on the reconstructed point cloud , Segmentation, feature extraction, meshing and other processing operations to obtain more complete and accurate surface texture geometric features and realize non-contact measurement;
步骤S5,对比理想所需点云图,利用Halcon分析材料激光加工表面锥度、波纹度及弯曲特征,并将特征位置反馈至激光加工装置,对工件的表面织构的结构特征进行优化,直到测量平面与目标平面表面平整、无起伏或凹凸,即公差范围在±20μm,在弯曲处,角度变化小于或等于1°。Step S5, compare the ideal required point cloud image, use Halcon to analyze the taper, waviness and bending characteristics of the material laser processing surface, and feed back the feature position to the laser processing device to optimize the structural characteristics of the surface texture of the workpiece until the measurement plane It is flat with the target plane surface, without ups and downs or bumps, that is, the tolerance range is ±20μm, and at the bend, the angle change is less than or equal to 1°.
Halcon利用其图像处理和机器视觉算法来实现工件表面缺陷的识别。使用Halcon的特征提取算法,从图像中提取表面缺陷的特征。这些特征可以包括纹理、形状、边缘等,根据不同的缺陷类型选择相应的特征提取方法。Halcon uses its image processing and machine vision algorithms to realize the identification of workpiece surface defects. Using Halcon's feature extraction algorithm, features of surface defects are extracted from the image. These features can include texture, shape, edge, etc., and select the corresponding feature extraction method according to different defect types.
对左右图像中的相位值进行匹配,找到左图像中的每个像素点在右图像中相位差最小的匹配点。对每个匹配点,计算左右图像中对应像素的水平偏移量,即视差。利用三角测距原理建立深度与视差的几何关系,从而得到目标物体表面上各点的深度信息。Match the phase values in the left and right images, and find the matching point where each pixel in the left image has the smallest phase difference in the right image. For each matching point, calculate the horizontal offset of the corresponding pixel in the left and right images, that is, the disparity. The geometric relationship between depth and parallax is established by using the principle of triangulation ranging, so as to obtain the depth information of each point on the surface of the target object.
与纯双目立体匹配相比,基于结构光的双目立体匹配的优势:Compared with pure binocular stereo matching, the advantages of binocular stereo matching based on structured light:
鲁棒性更强:结构光投射了编码信息到目标物体表面,通过添加特征信息,可以提高匹配的鲁棒性。相比于纯双目匹配,结构光提供了额外的约束条件,减小了受光照变化和纹理缺失等因素的影响。Stronger robustness: Structured light projects coded information onto the surface of the target object. By adding feature information, the robustness of matching can be improved. Compared with pure binocular matching, structured light provides additional constraints, reducing the influence of factors such as illumination changes and texture loss.
匹配点密集:结构光在目标物体表面上形成了编码信息,这样可以得到更多的匹配点,提高了深度估计的密集程度。相对于纯双目匹配,结构光提供了更多的特征点,可以获得更高的匹配精度和稠密度。Intensive matching points: Structured light forms encoded information on the surface of the target object, so that more matching points can be obtained, which improves the density of depth estimation. Compared with pure binocular matching, structured light provides more feature points, which can achieve higher matching accuracy and density.
光照影响小:结构光投射的编码信息可以有效降低光照变化对深度估计的影响。通过结构光的编码,匹配过程更加稳定,减少了光照条件变化引起的深度估计误差。Small impact of illumination: The encoded information of structured light projection can effectively reduce the impact of illumination changes on depth estimation. Through the encoding of structured light, the matching process is more stable, reducing the depth estimation error caused by changes in lighting conditions.
进一步的,GeneratePattern算法的具体实现为:Further, the specific implementation of the GeneratePattern algorithm is:
function[Is,Is_img]=GeneratePattern(A,B,T,N,W,H)Is=cell(N,1);function[Is,Is_img]=GeneratePattern(A,B,T,N,W,H)Is=cell(N,1);
Is_img=cell(N,1);Is_img=cell(N,1);
xs=1:W;xs=1:W;
f_2pi=1./double(T)*2.*pi;fork=0:N-1Is{k+1}=A+B*cos(f_2pi*xs+2*k/N*pi);Is_img{k+1}=repmat(Is{k+1}/255.,H,1);f_2pi=1./double(T)*2.*pi;fork=0:N-1Is{k+1}=A+B*cos(f_2pi*xs+2*k/N*pi);Is_img{k +1}=repmat(Is{k+1}/255.,H,1);
endend
GeneratePattern函数首先创建了大小为N的空单元格数组Is和Is_img,用于存储生成的条纹图案和图像结果。再创建了一个从1到W的行向量xs,用于表示图案的横坐标。然后计算了一个常数f_2pi,用于后续计算相位变化量。接下来,使用循环从0到N-1,生成每个相移步骤中的条纹图案。条纹图案使用余弦函数进行生成,其中f_2pi表示相位变化量。生成的条纹图案存储在Is数组中,同时将其转换为图像格式,并储在Is_img数组中。The GeneratePattern function first creates empty cell arrays Is and Is_img with a size of N to store the generated stripe pattern and image results. A row vector xs from 1 to W is created to represent the abscissa of the pattern. Then a constant f_2pi is calculated for the subsequent calculation of the phase change. Next, generate the fringe pattern in each phase shift step using a cycle from 0 to N-1. The fringe pattern is generated using a cosine function, where f_2pi represents the amount of phase change. The generated stripe pattern is stored in the Is array, and it is converted into an image format at the same time, and stored in the Is_img array.
函数输入参数:Function input parameters:
A:条纹的基准亮度(取值范围:0-255)A: The benchmark brightness of the stripes (value range: 0-255)
B:条纹的振幅(取值范围:0-255)B: Amplitude of stripes (value range: 0-255)
T:条纹的周期(单位:像素)T: period of stripes (unit: pixel)
N:相移步数(条纹的数量)N: Number of phase shift steps (number of fringes)
W:图案的宽度(单位:像素)W: Width of pattern (unit: pixel)
H:图案的高度(单位:像素)H: the height of the pattern (unit: pixel)
通过GeneratePattern算法,可以根据需要自定义振幅、相位、周期和条纹数目。这能够灵活地生成不同形状、频率和对比度的条纹图案,以满足结构光成像需求。通过调整参数,可以精确控制每个条纹的相移程度和形状。可得高质量的条纹图案,由于使用余弦函数生成条纹图案,通过GeneratePattern算法在生成条纹时具有较高的信号质量和较低的噪声水平,有助于提高结构光成像的精度和稳定性。易于实现:代码使用MATLAB编写,并且使用简单直观的语法和函数。这使得实现条纹生成算法变得简单而高效,不需要复杂的编程技巧。Through the GeneratePattern algorithm, the amplitude, phase, period and number of stripes can be customized as required. This enables flexible generation of fringe patterns of different shapes, frequencies, and contrasts for structured light imaging needs. By adjusting the parameters, the degree and shape of each fringe's phase shift can be precisely controlled. High-quality fringe patterns can be obtained. Since the fringe patterns are generated using the cosine function, the GeneratePattern algorithm has high signal quality and low noise levels when generating fringes, which helps to improve the accuracy and stability of structured light imaging. Ease of Implementation: Code is written in MATLAB and uses simple and intuitive syntax and functions. This makes implementing the streak generation algorithm simple and efficient, without the need for complex programming skills.
实施例四Embodiment four
PhaseAnalyse算法具体实现为:The PhaseAnalyse algorithm is specifically implemented as:
#include<opencv2/opencv.hpp>#include <opencv2/opencv.hpp>
#include<stdint.h>#include <stdint.h>
#include<string>#include<string>
#include<fstream>#include <fstream>
Using namespace cv;Using namespace cv;
using namespace std;using namespace std;
1、#include<opencv2/opencv.hpp>:用于引入OpenCV库的头文件,包括了用于图像处理、计算机视觉和机器学习的函数和类。1. #include<opencv2/opencv.hpp>: The header file used to introduce the OpenCV library, including functions and classes for image processing, computer vision and machine learning.
2、#include<stdint.h>:用于引入stdint.h头文件,stdint.h头文件定义了固定大小的整数类型,例如uint8_t、int16_t等。2. #include<stdint.h>: used to introduce the stdint.h header file, which defines fixed-size integer types, such as uint8_t, int16_t, etc.
3、#include<string>:用于引入string头文件,string头文件提供了用于操作字符串的函数和类。3. #include<string>: used to introduce the string header file, which provides functions and classes for manipulating strings.
4、#include<fstream>:用于引入fstream头文件,fstream头文件提供了用于读写文件的函数和类。4. #include<fstream>: used to introduce the fstream header file, which provides functions and classes for reading and writing files.
#define F32 float#define F32 float
#define PIXEL uint8_t#define PIXEL uint8_t
#define PI 3.1415926535897932384626433832795#define PI 3.1415926535897932384626433832795
#define PI2 (PI*2)#define PI2 (PI*2)
static int m_dFreq[5]={1,3,9,27,85};static int m_dFreq[5]={1,3,9,27,85};
static int m_nHeight;static int m_nHeight;
static int m_nWidth;static int m_nWidth;
1、#define F32 float:定义了宏常量F32,表示float类型。通过定义,使用F32可以替代float类型的使用。1. #define F32 float: defines the macro constant F32, indicating the float type. By definition, the use of F32 can replace the use of float type.
2、#define PIXEL uint8_t:定义了宏常量PIXEL,表示uint8_t类型。通过定义,使用PIXEL可以替代uint8_t类型的使用。2. #define PIXEL uint8_t: defines the macro constant PIXEL, representing the uint8_t type. By definition, the use of PIXEL can replace the use of uint8_t type.
3、#define PI 3.1415926535897932384626433832795:定义了宏常量PI,表示圆周率π的值。在代码中,使用PI可以代替具体的数值3.1415926535897932384626433832795。3. #define PI 3.1415926535897932384626433832795: defines the macro constant PI, indicating the value of pi. In the code, use PI instead of the specific value 3.1415926535897932384626433832795.
4、#define PI2(PI*2):定义了宏常量PI2,表示圆周率π的两倍。在代码中,使用PI2可以代替具体的数值PI*2。4. #define PI2(PI*2): Defines the macro constant PI2, which means twice the circumference ratio π. In the code, use PI2 to replace the specific value PI*2.
5、static int m_dFreq[5]={1,3,9,27,85}:定义了一个静态整型数组m_dFreq,包含了5个元素。这个数组被初始化为{1,3,9,27,85}。5. static int m_dFreq[5]={1,3,9,27,85}: defines a static integer array m_dFreq, which contains 5 elements. This array is initialized to {1,3,9,27,85}.
6、static int m_nHeight;和static int m_nWidth:定义了两个静态整型变量m_nHeight和m_nWidth,但没有给其赋初始值。这意味着它们的初始值将为0(在静态存储区初始化为0)。6. static int m_nHeight; and static int m_nWidth: Two static integer variables m_nHeight and m_nWidth are defined, but no initial value is assigned to them. This means that their initial value will be 0 (initialized to 0 in static memory).
相位解包(Phase Unwrap)的函数的具体实现如下:The specific implementation of the Phase Unwrap function is as follows:
voidPhaseUnWrap(Mat&phaseHetero,Mat&phaseWrap,Mat&phaseUnwrap,floatfrqHetero,float frqWrap){voidPhaseUnWrap(Mat&phaseHetero,Mat&phaseWrap,Mat&phaseUnwrap,floatfrqHetero,float frqWrap){
F32*ptr0=(F32*)phaseHetero.data;F32*ptr0=(F32*)phaseHetero.data;
F32*ptr1=(F32*)phaseWrap.data;F32*ptr1=(F32*)phaseWrap.data;
F32*ptr=(F32*)phaseUnwrap.data;F32*ptr=(F32*)phaseUnwrap.data;
float R=frqWrap/frqHetero;float R=frqWrap/frqHetero;
for(inty=0;y<m_nHeight;y++){for(inty=0;y<m_nHeight;y++){
floatphaWrapPrev=ptr1[0];floatphaWrapPrev=ptr1[0];
int NWrap=0;int NWrap=0;
for (int x=0;x<m_nWidth;x++){for (int x=0;x<m_nWidth;x++){
int xy=y*m_nWidth+x;int xy=y*m_nWidth+x;
F32&phaUnwrap=ptr[xy];F32&phaUnwrap=ptr[xy];
F32 phaHeter=ptr0[xy];F32 phaHeter=ptr0[xy];
F32 phaWrap=ptr1[xy];F32 phaWrap=ptr1[xy];
NWrap=(int)((phaHeter*R-phaWrap)/PI2+0.5);NWrap=(int)((phaHeter*R-phaWrap)/PI2+0.5);
phaUnwrap=NWrap*PI2+phaWrap;phaUnwrap=NWrap*PI2+phaWrap;
}}}}}}
通过上述算法对输入的相位图像进行解包操作,将相位图像的不连续性进行修复,生成连续的相位图像。函数的输入参数包括三个矩阵类型的参数:phaseHetero、phaseWrap和phaseUnwrap。分别表示杂波相位、包裹相位和解包相位。这些相位图像通常是以浮点数(F32)类型存储的。函数首先将相位图像的数据指针转换为F32类型的指针,即ptr0指向phaseHetero的数据,ptr1指向phaseWrap的数据,ptr指向phaseUnwrap的数据。接下来,函数根据给定的频率参数(frqHetero和frqWrap)计算R值,R=frqWrap/frqHetero。这个R值用于将包裹相位映射到杂波相位上。R=frqWrap/frqHetero,可以得到一个比例系数。将包裹相位乘以这个比例系数,即可将包裹相位映射到与杂波相位相同的频率范围上,使其具有相同的变化规律。然后,函数使用双重循环遍历整个图像,从左上角到右下角。在每个像素位置处,函数计算解包相位的值。首先获取当前位置的杂波相位、包裹相位和解包相位的值。接下来,函数根据相位差和R值计算出相位的包裹数(NWrap)。然后,根据包裹数和包裹相位的值,计算出解包相位的值。解包相位通过将包裹数乘以2π并加上包裹相位来得到。最后,函数返回解包后的相位图像,存储在phaseUnwrap矩阵中。The above algorithm is used to unpack the input phase image, repair the discontinuity of the phase image, and generate a continuous phase image. The input parameters of the function include three matrix type parameters: phaseHetero, phaseWrap and phaseUnwrap. denote the clutter phase, wrapped phase and unwrapped phase, respectively. These phase images are usually stored as floating point numbers (F32). The function first converts the data pointer of the phase image into an F32 type pointer, that is, ptr0 points to the data of phaseHetero, ptr1 points to the data of phaseWrap, and ptr points to the data of phaseUnwrap. Next, the function calculates the R value according to the given frequency parameters (frqHetero and frqWrap), R=frqWrap/frqHetero. This R value is used to map the wrapped phase onto the clutter phase. R=frqWrap/frqHetero, you can get a proportional coefficient. By multiplying the wrapped phase by this scale factor, the wrapped phase can be mapped to the same frequency range as the clutter phase, so that it has the same variation law. Then, the function uses a double loop to iterate through the entire image, from top left to bottom right. At each pixel location, the function computes the value of the unwrapped phase. First get the values of clutter phase, wrap phase and unwrap phase at the current position. Next, the function calculates the wrapping number (NWrap) of the phase according to the phase difference and the R value. Then, based on the wrapping number and wrapping phase values, the value of the unwrapping phase is calculated. The unwrapping phase is obtained by multiplying the wrapping number by 2π and adding the wrapping phase. Finally, the function returns the unwrapped phase image, stored in the phaseUnwrap matrix.
PhaseAnalyse算法具有简单而高效、代码实现简洁,易于理解和使用。它基于简单的数学运算,没有复杂的算法和迭代过程,因此执行速度较快。The PhaseAnalyse algorithm is simple and efficient, the code implementation is concise, and it is easy to understand and use. It is based on simple mathematical operations without complex algorithms and iterative processes, so the execution speed is relatively fast.
多频率解包:算法实现了多频率相位解包算法,使用了不同的相移图案,能够更准确地恢复相位信息。这种多频率解包方法可以提高解包的可靠性和准确性。Multi-frequency unpacking: The algorithm implements a multi-frequency phase unpacking algorithm, which uses different phase shift patterns to recover phase information more accurately. This multi-frequency unpacking method can improve the reliability and accuracy of unpacking.
算法可以根据需要进行修改和调整。可以自定义相移图案的频率、幅度等参数,以适应不同的应用场景和实验需求。Algorithms can be modified and adjusted as needed. The frequency, amplitude and other parameters of the phase shift pattern can be customized to suit different application scenarios and experimental requirements.
公式的理解:Understanding of the formula:
1、首先,计算差值phaHeter*R-phaWrap。这个差值表示包裹相位相对于杂波相位的偏移量。1. First, calculate the difference phaHeter*R-phaWrap. This difference represents the offset of the wrapped phase relative to the clutter phase.
2、将差值除以2π(即PI2),以将偏移量转化为包裹数的单位。这样得到的结果表示包裹相位相对于杂波相位的包裹数偏移。2. Divide the difference by 2π (ie PI2) to convert the offset into the unit of the number of packages. The result thus obtained represents the wrapping number shift of the wrapping phase relative to the clutter phase.
3、加上0.5,是为了进行四舍五入,将浮点数结果转换为整数。3. Adding 0.5 is for rounding and converting the floating-point result to an integer.
通过相位解包代码实现了相位解包的操作,通过修复相位图像的不连续性,生成连续的相位图像。The phase unpacking operation is realized by the phase unpacking code, and the continuous phase image is generated by repairing the discontinuity of the phase image.
void ImgShowAbsPhase(Mat mat,float offset, string title) {void ImgShowAbsPhase(Mat mat, float offset, string title) {
Mat show = mat / offset;Mat show = mat / offset;
imshow(title, show);imshow(title, show);
waitKey(0);}waitKey(0);}
1、创建一个新的Mat对象show,作为显示的图像。1. Create a new Mat object show as the displayed image.
2、将输入的相位图像mat除以offset,得到调整后的图像。相位图像的缩放因子,用于调整显示的对比度。将相位图像除以offset,可以将相位值映射到合适的显示范围。2. Divide the input phase image mat by offset to get the adjusted image. Scaling factor for the phase image, used to adjust the contrast of the display. Dividing the phase image by offset maps the phase values to the appropriate display range.
3、使用OpenCV的imshow函数在一个窗口中显示调整后的相位图像show,窗口的标题为title。3. Use the imshow function of OpenCV to display the adjusted phase image show in a window, and the title of the window is title.
调用waitKey(0)函数,等待用户按下键盘上的任意键,以保持窗口的显示。Call the waitKey(0) function to wait for the user to press any key on the keyboard to keep the window displayed.
该函数的作用是将相位图像进行缩放和显示,使用户可以观察相位分布的特征。通常在相位解包等处理步骤之后,使用该函数显示最终的相位结果。The function of this function is to zoom and display the phase image, so that the user can observe the characteristics of the phase distribution. Typically after processing steps such as phase unwrapping, this function is used to display the final phase result.
void DecodeMultiPhase5(Mat* imgShift, Mat&imgAbsPhase) {void DecodeMultiPhase5(Mat* imgShift, Mat&imgAbsPhase) {
F32* dPtr = (F32*)imgAbsPhase.data; F32* dPtr = (F32*)imgAbsPhase.data;
Mat imgPhase[5]; Mat imgPhase[5];
for (int k = 0; k<5; k++) imgPhase[k] = Mat::zeros(m_nHeight, m_nWidth, CV_32FC1); for (int k = 0; k<5; k++) imgPhase[k] = Mat::zeros(m_nHeight, m_nWidth, CV_32FC1);
for (int n = 0; n<4; n++) { for (int n = 0; n<4; n++) {
PIXEL* I0 = (PIXEL*)imgShift[4 * n + 0].data; PIXEL* I0 = (PIXEL*)imgShift[4 * n + 0].data;
PIXEL* I1 = (PIXEL*)imgShift[4 * n + 1].data; PIXEL* I1 = (PIXEL*)imgShift[4 * n + 1].data;
PIXEL* I2 = (PIXEL*)imgShift[4 * n + 2].data; PIXEL* I2 = (PIXEL*)imgShift[4 * n + 2].data;
PIXEL* I3 = (PIXEL*)imgShift[4 * n + 3].data; PIXEL* I3 = (PIXEL*)imgShift[4 * n + 3].data;
F32* pha = (F32*)imgPhase[n].data; F32* pha = (F32*)imgPhase[n].data;
for (int k = 0; k<m_nWidth * m_nHeight; k++) { for (int k = 0; k<m_nWidth * m_nHeight; k++) {
pha[k] =(float)atan2f((double)(I1[k] - I3[k]), (double)(I0[k] - I2[k])); pha[k] =(float)atan2f((double)(I1[k] - I3[k]), (double)(I0[k] - I2[k]));
if (pha[k]<0) if (pha[k]<0)
pha[k] +=PI2; pha[k] +=PI2;
}} }}
PIXEL* I[8]; PIXEL* I[8];
for (int k = 0; k<8; k++) for (int k = 0; k<8; k++)
I[k] = (PIXEL*)imgShift[16 + k].data; I[k] = (PIXEL*)imgShift[16 + k].data;
F32* pha = (F32*)imgPhase[4].data; F32* pha = (F32*)imgPhase[4].data;
float PI2_8 = PI2 / 8; float PI2_8 = PI2 / 8;
for (int k = 0; k<m_nWidth * m_nHeight; k++) { for (int k = 0; k<m_nWidth * m_nHeight; k++) {
double ssin = 0.0, scos = 0.0; double ssin = 0.0, scos = 0.0;
for (int i = 0; i<8; i++) { for (int i = 0; i<8; i++) {
ssin += I[i][k]* sin(PI2_8 * i); ssin += I[i][k]* sin(PI2_8 * i);
scos += I[i][k]* cos(PI2_8 * i);} scos += I[i][k]* cos(PI2_8 * i);}
pha[k] = (float)atan2f(ssin, scos); pha[k] = (float)atan2f(ssin, scos);
if (pha[k]<0) if (pha[k]<0)
pha[k] +=PI2; pha[k] +=PI2;
} }
ImgShowAbsPhase(imgPhase[0], PI2, "imgPhase_0"); ImgShowAbsPhase(imgPhase[0], PI2, "imgPhase_0");
ImgShowAbsPhase(imgPhase[1], PI2,"imgPhase_1"); ImgShowAbsPhase(imgPhase[1], PI2,"imgPhase_1");
ImgShowAbsPhase(imgPhase[2], PI2,"imgPhase_2"); ImgShowAbsPhase(imgPhase[2], PI2,"imgPhase_2");
ImgShowAbsPhase(imgPhase[3], PI2,"imgPhase_3"); ImgShowAbsPhase(imgPhase[3], PI2,"imgPhase_3");
ImgShowAbsPhase(imgPhase[4],PI2, "imgPhase_4");ImgShowAbsPhase(imgPhase[4],PI2, "imgPhase_4");
Mat imgAbsPhase1 = Mat::zeros(m_nHeight, m_nWidth, CV_32FC1); Mat imgAbsPhase1 = Mat::zeros(m_nHeight, m_nWidth, CV_32FC1);
Mat imgAbsPhase2 = Mat::zeros(m_nHeight, m_nWidth, CV_32FC1); Mat imgAbsPhase2 = Mat::zeros(m_nHeight, m_nWidth, CV_32FC1);
Mat imgAbsPhase3 = Mat::zeros(m_nHeight, m_nWidth, CV_32FC1); Mat imgAbsPhase3 = Mat::zeros(m_nHeight, m_nWidth, CV_32FC1);
Mat M1 = Mat::zeros(m_nHeight, m_nWidth, CV_32FC1); Mat M1 = Mat::zeros(m_nHeight, m_nWidth, CV_32FC1);
Mat M2 = Mat::zeros(m_nHeight, m_nWidth, CV_32FC1); Mat M2 = Mat::zeros(m_nHeight, m_nWidth, CV_32FC1);
Mat M3 = Mat::zeros(m_nHeight, m_nWidth, CV_32FC1); Mat M3 = Mat::zeros(m_nHeight, m_nWidth, CV_32FC1);
PhaseUnWrap(imgPhase[0], imgPhase[1], imgAbsPhase1, m_dFreq[0],m_dFreq[1]); PhaseUnWrap(imgPhase[0], imgPhase[1], imgAbsPhase1, m_dFreq[0], m_dFreq[1]);
PhaseUnWrap(imgAbsPhase1, imgPhase[2],imgAbsPhase2, m_dFreq[1],m_dFreq[2]); PhaseUnWrap(imgAbsPhase1, imgPhase[2], imgAbsPhase2, m_dFreq[1], m_dFreq[2]);
PhaseUnWrap(imgAbsPhase2, imgPhase[3],imgAbsPhase3, m_dFreq[2],m_dFreq[3]); PhaseUnWrap(imgAbsPhase2, imgPhase[3], imgAbsPhase3, m_dFreq[2], m_dFreq[3]);
PhaseUnWrap(imgAbsPhase3, imgPhase[4], imgAbsPhase, m_dFreq[3],m_dFreq[4]); PhaseUnWrap(imgAbsPhase3, imgPhase[4], imgAbsPhase, m_dFreq[3], m_dFreq[4]);
ImgShowAbsPhase(imgAbsPhase1, 3 * PI2, "imgAbsPhase1"); ImgShowAbsPhase(imgAbsPhase1, 3 * PI2, "imgAbsPhase1");
ImgShowAbsPhase(imgAbsPhase2, 9 * PI2, "imgAbsPhase2"); ImgShowAbsPhase(imgAbsPhase2, 9 * PI2, "imgAbsPhase2");
ImgShowAbsPhase(imgAbsPhase3, 27 * PI2,"imgAbsPhase3"); ImgShowAbsPhase(imgAbsPhase3, 27 * PI2,"imgAbsPhase3");
ImgShowAbsPhase(imgAbsPhase, 81 * PI2, "imgAbsPhase"); ImgShowAbsPhase(imgAbsPhase, 81 * PI2, "imgAbsPhase");
imwrite("phase1.bmp", imgPhase[0]); imwrite("phase1.bmp", imgPhase[0]);
imwrite("phase2.bmp", imgPhase[1]); imwrite("phase2.bmp", imgPhase[1]);
imwrite("phase3.bmp", imgPhase[2]); imwrite("phase3.bmp", imgPhase[2]);
imwrite("phase4.bmp", imgPhase[3]); imwrite("phase4.bmp", imgPhase[3]);
imwrite("phase5.bmp", imgPhase[4]); imwrite("phase5.bmp", imgPhase[4]);
imwrite("unphase.bmp", imgAbsPhase); imwrite("unphase.bmp", imgAbsPhase);
return;} return;}
函数接受一个图像数组 imgShift 和一个Mat对象的引用 imgAbsPhase作为输入。使用一个大小为5的Mat 对象数组imgPhase 进行初始化。每个imgPhase元素都被初始化为与imgAbsPhase具有相同尺寸的全零矩阵。接下来是一个循环,循环变量为n,从0到3遍历。在循环内部,对于每个n的值,函数从imgShift 数组中获取四个图像I0、I1、I2和I3。这些图像对应于不同的相移步骤。然后,函数遍历m_nWidth*m_nHeight个像素,对于每个像素,使用atan2f函数计算相位值pha。相位值的计算基于图像I0、I1、I2和I3中像素值之间的差异。如果相位值pha小于0,则将其增加PI2,以确保相位值在0到2π之间。The function takes as input an image array imgShift and a reference to a Mat object imgAbsPhase. Initialize with a Mat object array imgPhase of size 5. Each imgPhase element is initialized as an all-zero matrix with the same dimensions as imgAbsPhase. Next is a loop, the loop variable is n, traversing from 0 to 3. Inside the loop, for each value of n, the function gets four images I0, I1, I2 and I3 from the imgShift array. These images correspond to different phase shift steps. Then, the function iterates over m_nWidth*m_nHeight pixels, and for each pixel, calculates the phase value pha using the atan2f function. The calculation of the phase value is based on the difference between the pixel values in images I0, I1, I2 and I3. If the phase value pha is less than 0, it is increased by PI2 to ensure that the phase value is between 0 and 2π.
接下来,函数处理最后一组八步相移的图像。将这些图像存储在名为I的指针数组中。然后,函数遍历m_nWidth*m_nHeight个像素,对于每个像素,使用正弦和余弦函数计算ssin和scos的累积值。这些累积值用于计算相位值pha。类似于之前的步骤,如果相位值pha小于0,则将其增加PI2。最后,函数调用ImgShowAbsPhase函数显示imgPhase数组中的每个元素,并将其保存为图像文件。然后,调用PhaseUnWrap函数对imgPhase数组进行相位展开,得到imgAbsPhase。最后,函数将imgAbsPhase保存为图像文件,并返回。Next, the function processes the final set of eight-step phase-shifted images. Store these images in an array of pointers called I. Then, the function iterates over m_nWidth*m_nHeight pixels, and for each pixel, calculates the cumulative values of ssin and scos using the sine and cosine functions. These accumulated values are used to calculate the phase value pha. Similar to the previous step, if the phase value pha is less than 0, increase it by PI2. Finally, the function calls the ImgShowAbsPhase function to display each element in the imgPhase array and save it as an image file. Then, call the PhaseUnWrap function to unwrap the phase of the imgPhase array to obtain imgAbsPhase. Finally, the function saves imgAbsPhase as an image file and returns it.
实施例五Embodiment five
如图8所示,点云图展现了工件加工相应的缺陷区域,表现为点云数据的异常或缺失。然后本装置根据点云分析的结果,确定缺陷的位置、形状和大小,以及完好区域的尺寸特征。基于这些信息,本装置针对尺寸不符合要求的问题,调整激光功率、扫描速度、光斑直径等,优化加工过程。经过参数调整后,检测结果如图9,加工工件的图案的尺寸符合要求,预留的方块长度、宽度和厚度都达到了预期的10mm×10mm×1mm,点云呈现出与设计一致的形状和尺寸,没有明显的异常或缺失。As shown in Figure 8, the point cloud image shows the corresponding defect area of the workpiece processing, which is manifested as the abnormality or lack of point cloud data. The device then determines the location, shape, and size of the defect, as well as the dimensional characteristics of the intact area, based on the results of the point cloud analysis. Based on these information, this device adjusts the laser power, scanning speed, spot diameter, etc. to optimize the processing process for the problem that the size does not meet the requirements. After parameter adjustment, the test result is shown in Figure 9. The size of the pattern of the processed workpiece meets the requirements, and the length, width and thickness of the reserved squares have reached the expected 10mm×10mm×1mm. The point cloud presents a shape consistent with the design and Dimensions, no apparent abnormalities or omissions.
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is a relationship between these entities or operations. There is no such actual relationship or sequence. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article or apparatus comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements of or also include elements inherent in such a process, method, article, or apparatus.
最后应说明的是:以上所述仅为本发明的优选实施例而已,并不用于限制本发明,尽管参照前述实施例对本发明进行了详细的说明,对于本领域的技术人员来说,其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。Finally, it should be noted that: the above is only a preferred embodiment of the present invention, and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, for those skilled in the art, it still The technical solutions recorded in the foregoing embodiments may be modified, or some technical features thereof may be equivalently replaced. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310854015.3A CN116571875B (en) | 2023-07-13 | 2023-07-13 | Integrated laser processing and detection equipment and detection method based on active projection technology |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310854015.3A CN116571875B (en) | 2023-07-13 | 2023-07-13 | Integrated laser processing and detection equipment and detection method based on active projection technology |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116571875A true CN116571875A (en) | 2023-08-11 |
CN116571875B CN116571875B (en) | 2023-11-03 |
Family
ID=87540007
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310854015.3A Active CN116571875B (en) | 2023-07-13 | 2023-07-13 | Integrated laser processing and detection equipment and detection method based on active projection technology |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116571875B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116571875B (en) * | 2023-07-13 | 2023-11-03 | 西南交通大学 | Integrated laser processing and detection equipment and detection method based on active projection technology |
Citations (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104028897A (en) * | 2014-05-20 | 2014-09-10 | 广东大族粤铭激光科技股份有限公司 | Fully-closed laser marking machine |
WO2016145582A1 (en) * | 2015-03-13 | 2016-09-22 | 香港应用科技研究院有限公司 | Phase deviation calibration method, 3d shape detection method and system, and projection system |
CN106643563A (en) * | 2016-12-07 | 2017-05-10 | 西安知象光电科技有限公司 | Table type large visual field three-dimensional scanning device and method |
CN109940270A (en) * | 2019-04-08 | 2019-06-28 | 西安交通大学 | A seven-axis five-link ultrafast laser processing system |
CN110068984A (en) * | 2018-01-24 | 2019-07-30 | 光群雷射科技股份有限公司 | Optical projector, the method for optical projection and electronic device |
CN111545899A (en) * | 2020-05-28 | 2020-08-18 | 锡凡半导体无锡有限公司 | Optical system structure for laser processing |
CN112352424A (en) * | 2018-07-02 | 2021-02-09 | 华为技术有限公司 | Method and apparatus for motion vector prediction |
CN114101898A (en) * | 2021-11-30 | 2022-03-01 | 西南交通大学 | A laser processing device |
CN216990406U (en) * | 2022-03-29 | 2022-07-19 | 上海华镜玻璃制品有限公司 | Lens laser carving machine |
CN217618374U (en) * | 2022-07-19 | 2022-10-21 | 深圳市普洛德精密科技有限公司 | Laser cutting machine seals light path |
CN115345822A (en) * | 2022-06-08 | 2022-11-15 | 南京航空航天大学 | Automatic three-dimensional detection method for surface structure light of aviation complex part |
CN115482268A (en) * | 2022-09-20 | 2022-12-16 | 上海交通大学 | High-precision three-dimensional shape measurement method and system based on speckle matching network |
CN218745516U (en) * | 2022-11-22 | 2023-03-28 | 温州星耀激光科技有限公司 | Laser processing device |
CN219026370U (en) * | 2022-12-30 | 2023-05-16 | 昆山镭跃激光科技有限公司 | Ultraviolet laser processing equipment |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116571875B (en) * | 2023-07-13 | 2023-11-03 | 西南交通大学 | Integrated laser processing and detection equipment and detection method based on active projection technology |
-
2023
- 2023-07-13 CN CN202310854015.3A patent/CN116571875B/en active Active
Patent Citations (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104028897A (en) * | 2014-05-20 | 2014-09-10 | 广东大族粤铭激光科技股份有限公司 | Fully-closed laser marking machine |
WO2016145582A1 (en) * | 2015-03-13 | 2016-09-22 | 香港应用科技研究院有限公司 | Phase deviation calibration method, 3d shape detection method and system, and projection system |
CN106643563A (en) * | 2016-12-07 | 2017-05-10 | 西安知象光电科技有限公司 | Table type large visual field three-dimensional scanning device and method |
CN110068984A (en) * | 2018-01-24 | 2019-07-30 | 光群雷射科技股份有限公司 | Optical projector, the method for optical projection and electronic device |
CN112352424A (en) * | 2018-07-02 | 2021-02-09 | 华为技术有限公司 | Method and apparatus for motion vector prediction |
CN109940270A (en) * | 2019-04-08 | 2019-06-28 | 西安交通大学 | A seven-axis five-link ultrafast laser processing system |
CN111545899A (en) * | 2020-05-28 | 2020-08-18 | 锡凡半导体无锡有限公司 | Optical system structure for laser processing |
CN114101898A (en) * | 2021-11-30 | 2022-03-01 | 西南交通大学 | A laser processing device |
CN216990406U (en) * | 2022-03-29 | 2022-07-19 | 上海华镜玻璃制品有限公司 | Lens laser carving machine |
CN115345822A (en) * | 2022-06-08 | 2022-11-15 | 南京航空航天大学 | Automatic three-dimensional detection method for surface structure light of aviation complex part |
CN217618374U (en) * | 2022-07-19 | 2022-10-21 | 深圳市普洛德精密科技有限公司 | Laser cutting machine seals light path |
CN115482268A (en) * | 2022-09-20 | 2022-12-16 | 上海交通大学 | High-precision three-dimensional shape measurement method and system based on speckle matching network |
CN218745516U (en) * | 2022-11-22 | 2023-03-28 | 温州星耀激光科技有限公司 | Laser processing device |
CN219026370U (en) * | 2022-12-30 | 2023-05-16 | 昆山镭跃激光科技有限公司 | Ultraviolet laser processing equipment |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116571875B (en) * | 2023-07-13 | 2023-11-03 | 西南交通大学 | Integrated laser processing and detection equipment and detection method based on active projection technology |
Also Published As
Publication number | Publication date |
---|---|
CN116571875B (en) | 2023-11-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113237435B (en) | High-light-reflection surface three-dimensional vision measurement system and method | |
CN112629441B (en) | 3D curved glass contour scanning detection method and system | |
JP4480488B2 (en) | Measuring device, computer numerical control device, and program | |
CN102184566A (en) | Micro projector mobile phone platform-based portable three-dimensional scanning system and method | |
CN111353997B (en) | Real-time three-dimensional surface defect detection method based on fringe projection | |
CN109269438A (en) | Structured light illumination microscopic measurement method for detecting multilayer complex micro-nano structure | |
CN110864650A (en) | Flatness measuring method based on fringe projection | |
CN107990846B (en) | Active-passive combined depth information acquisition method based on single-frame structured light | |
CN116571875B (en) | Integrated laser processing and detection equipment and detection method based on active projection technology | |
KR20210002821A (en) | Large reflector 3D surface shape measuring method by using Fringe Pattern Reflection Technique | |
CN111815697A (en) | Dynamic three-dimensional measurement method for thermal deformation | |
CN117073579A (en) | Structured light binocular three-dimensional measurement system and method based on stripe projection | |
CN116993901A (en) | Three-dimensional image reconstruction method based on binocular structured light | |
JP3781438B2 (en) | 3D surface shape measuring device | |
CN112414304B (en) | Three-dimensional measurement method of weld surface after welding based on laser grating projection | |
Li et al. | Three-dimensional reconstruction based on binocular structured light with an error point filtering strategy | |
Zhang et al. | Freight train gauge-exceeding detection based on three-dimensional stereo vision measurement | |
CN117450955A (en) | Three-dimensional measurement method of thin objects based on spatial annular features | |
CN114234852B (en) | Multi-ocular structured light 3D measurement method and system based on optimal mapping point set matching | |
Liao et al. | Phase sensitivity based fringe angle optimization in telecentric fringe projection profilometry | |
Huang et al. | 3-D Optical measurement using phase shifting based methods | |
CN205679194U (en) | A kind of contactless gauging instrument | |
Varman | A moiré system for producing numerical data of the profile of a turbine blade using a computer and video store | |
JP4674121B2 (en) | 3D measuring device, 3D measuring method, and 3D measuring program | |
CN114018177B (en) | Three-dimensional measurement method for mirror surface object based on speckle pattern |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right |
Effective date of registration: 20240801 Address after: 610031 No. two, section 111, ring road, Chengdu, Sichuan, China Patentee after: SOUTHWEST JIAOTONG University Country or region after: China Patentee after: Jiang Liang Address before: 610036 section 1, 2nd Ring Road North, Chengdu, Sichuan Province Patentee before: SOUTHWEST JIAOTONG University Country or region before: China |
|
TR01 | Transfer of patent right |