Three-dimensional profile measurement method and non-contact three-dimensional profile measurement apparatus
Patent Information
- Application Number
- CN202610985936.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-02
- Publication Date
- 2026-09-22
AI Technical Summary
传统的中心提取算法,如Steger法、重心法或梯度过零点法等,在遇到此类杂光时,极易错误地将杂光点识别为激光中心点,导致最终重建的三维点云出现显著的噪声、毛刺甚至轮廓扭曲,极大降低了测量的准确性、可靠性与鲁棒性
[0007]本申请实施例的三维轮廓测量方法, 一方面,通过照明模块照射待测样品,并采集待测样品的图像,得到照明图像,并依据照明图像的图像特征,确定照明图像中的聚焦区域信息和离焦区域信息;另一方面,采集待测样品的激光线图像;进而,依据照明图像中的聚焦区域信息和离焦区域信息,对激光线图像进行中心线提取,并依据所提取的中心线,确定待测样品的三维轮廓信息,通过引入侧面照明模块,依据照明模块照射待测样品的情况下采集的照明图像,并确定照明图像中的聚焦区域信息和离焦区域信息,依据照明图像中的聚焦区域信息和离焦区域信息,辅助针对激光线图像的中心线提取,提高了中心线提取的准确性,进而,可以提高三维轮廓测量的准确性。
Smart Images

Figure CN122793045A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of machine vision technology, and in particular to a three-dimensional contour measurement method and a non-contact three-dimensional contour measurement device. Background Technology
[0002] A line laser profile sensor (or line laser scanner) is a widely used non-contact 3D profile measurement device. Its basic working principle is triangulation: a line laser beam is projected onto the surface of an object to form a laser stripe, and a camera captures the deformed image of the stripe from another angle; by extracting the center line of the laser stripe in the image, the 3D profile information of the object's surface can be calculated.
[0003] However, in practical industrial measurements, this technology faces a long-standing and prominent problem: stray light interference from complex surfaces. For example, when measuring samples with features such as V-grooves, strong reflections or scattering can easily occur at the bottom of the groove, producing interference light bands on the camera image that are mixed with the real laser stripes. These stray lights severely interfere with the accurate extraction of the center line. Traditional center extraction algorithms, such as the Steger method, the centroid method, or the gradient zero-crossing method, are prone to misidentifying stray light points as laser center points when encountering such stray lights. This results in significant noise, burrs, and even contour distortion in the final reconstructed 3D point cloud, greatly reducing the accuracy, reliability, and robustness of the measurement. Summary of the Invention
[0004] In view of this, this application provides a three-dimensional contour measurement method and a non-contact three-dimensional contour measurement device.
[0005] According to a first aspect of the embodiments of this application, a three-dimensional contour measurement method is provided, applied to a non-contact three-dimensional contour measurement device, the non-contact three-dimensional contour measurement device including a line laser contour sensor and an illumination module, the illumination module being located on the side of the line laser contour sensor; the method includes: The sample to be tested is illuminated by an illumination module, and an image of the sample is acquired to obtain an illumination image; Based on the image features of the illumination image, the focus area information and defocus area information in the illumination image are determined; wherein, the imaging quality of the focus area is higher than that of the defocus area. Acquire the laser line image of the sample to be tested; Based on the weighted mask, the center line of the laser line image is extracted; wherein, the weighted mask is used to assign weights to pixels in the laser line image to help determine the optimal center point of each column of the laser line image; Based on the centerline, the three-dimensional contour information of the sample to be tested is determined.
[0006] According to a second aspect of the embodiments of this application, a non-contact three-dimensional contour measurement device is provided, including a laser contour sensor and an illumination module. The illumination module is located on the side of the laser contour sensor, and the laser contour sensor uses the method provided in the first aspect to realize the three-dimensional contour measurement of the sample to be measured.
[0007] The three-dimensional contour measurement method of this application embodiment, on the one hand, illuminates the sample to be tested through an illumination module and acquires an image of the sample to be tested to obtain an illumination image, and determines the focused area information and defocus area information in the illumination image based on the image features; on the other hand, it acquires a laser line image of the sample to be tested; then, based on the focused area information and defocus area information in the illumination image, it extracts the center line of the laser line image, and determines the three-dimensional contour information of the sample to be tested based on the extracted center line. By introducing a side illumination module, based on the illumination image acquired when the sample to be tested is illuminated by the illumination module, and determining the focused area information and defocus area information in the illumination image, the center line extraction of the laser line image is assisted by the focused area information and defocus area information in the illumination image, thereby improving the accuracy of center line extraction and thus improving the accuracy of three-dimensional contour measurement. Attached Figure Description
[0008] Figure 1 This is a flowchart illustrating a three-dimensional contour measurement method provided in an embodiment of this application; Figure 2 This is a schematic diagram of a lighting image provided in an embodiment of this application; Figure 3 This is a schematic diagram of a focused area map provided in an embodiment of this application; Figure 4 This is a schematic diagram of a weight mask provided in an embodiment of this application; Figure 5 This is a schematic diagram of a laser line image provided in an embodiment of this application; Figure 6 This is a schematic diagram of a laser line image for suppressing stray light, provided in an embodiment of this application; Figure 7 This is a schematic diagram of the laser line image centerline extraction result for suppressing stray light, provided in an embodiment of this application. Figure 8 This is a schematic diagram illustrating the specific processing flow of a three-dimensional contour measurement method based on side auxiliary lighting provided in an embodiment of this application; Figure 9 This is a schematic diagram of the external shape of a line laser profile sensor provided in an embodiment of this application; Figure 10 This is a schematic diagram of a line laser profile sensor for a side-deployed lighting module provided in an embodiment of this application; Figure 11 This is a schematic diagram of a line laser profile sensor with an illumination module located on the left side of the camera, as provided in an embodiment of this application. Figure 12 This is a schematic diagram of a line laser profile sensor with an illumination module located on the right side of a camera, as provided in an embodiment of this application. Figure 13 This is a schematic diagram of a line laser profile sensor with an illumination module located on both sides of a camera, as provided in an embodiment of this application. Detailed Implementation
[0009] To enable those skilled in the art to better understand the technical solutions provided in the embodiments of this application, and to make the above-mentioned objectives, features and advantages of the embodiments of this application more apparent and understandable, the technical solutions in the embodiments of this application will be further described in detail below with reference to the accompanying drawings.
[0010] It should be noted that the sequence number of each step in the embodiments of this application does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0011] Please see Figure 1 This is a flowchart illustrating a three-dimensional contour measurement method provided in an embodiment of this application. The method can be applied to a non-contact three-dimensional contour measurement device, which includes a line laser contour sensor and an illumination module. The illumination module is located on the side of the line laser contour sensor. Figure 1 As shown, the three-dimensional contour measurement method may include the following steps: Step S100: Illuminate the sample to be tested through the illumination module and acquire an image of the sample to obtain an illumination image.
[0012] Step S120: Based on the image features of the illumination image, determine the focus area information and defocus area information in the illumination image; wherein, the imaging quality of the focus area is higher than that of the defocus area.
[0013] In this embodiment of the application, it is considered that the real laser stripe signal usually appears in the depth of field range where the camera image is clearest (i.e., the focused area), while most of the interference stray light is complex in origin and its imaging position is often random, and most of it will fall outside the depth of field range (i.e., the out-of-focus area, which can also be called the defocused area).
[0014] Therefore, by introducing a side illumination module to actively acquire the focal area information of the sample under test, and incorporating this information into the laser center extraction algorithm, the signal of the focal area can be intelligently prioritized, while suppressing interference from the out-of-focus area.
[0015] Accordingly, in the embodiments of this application, the sample to be tested can be illuminated at a preset angle by an illumination module, and an image of the sample to be tested can be acquired to obtain an illumination image.
[0016] For example, the line laser can be turned off during the acquisition of an illumination image of the sample to be tested.
[0017] For example, the sample to be tested can be placed on a stage, the line laser of the line laser profilometer can be turned off, and the illumination module can be turned on. The illumination angle can be adjusted to provide lateral illumination, thereby enhancing the contrast of the surface texture. The exposure time, gain, and other parameters of the line laser profilometer's camera can be adjusted to ensure that the image is not overexposed and that details are visible, thus acquiring the illuminated image.
[0018] For example, the lighting module can be fixedly connected to the line laser profile sensor, for instance, by means of a bracket or other structure. Alternatively, the lighting module can be deployed independently of the line laser profile sensor.
[0019] For example, the illumination angle of the illumination module is adjustable, and the line laser profile sensor can control the illumination angle of the illumination module.
[0020] For the obtained illumination image, the image features of the illumination image can be determined, and based on the image features of the illumination image, the focus area information and defocus area information in the illumination image can be determined.
[0021] For example, the image features of the above-mentioned illuminated image may include, but are not limited to, one or more features such as sharpness, texture and edge information, and high-frequency and low-frequency information.
[0022] Taking sharpness as an example, considering that the sharpness of pixels in the focused area is higher than that of pixels in the out-of-focus area, the focused area information and the out-of-focus area information in the lighting image can be determined based on the sharpness of each pixel in the lighting image or the sharpness of pixels in a specific area.
[0023] Among these methods, image sharpness evaluation functions (such as the Laplacian operator, variance function, or gradient function) can be used to determine the sharpness of each pixel in the illuminated image.
[0024] Taking texture and edge information as an example, considering that the edges of the focused area are sharp and the texture is rich, while the edges of the out-of-focus area are smooth and the texture is smoothed or disappears, the focused area information and the out-of-focus area information in the illumination image can be determined based on the texture and edge information of the illumination image.
[0025] Taking high-frequency and low-frequency information as an example, considering that the high-frequency information in the focused area is abundant and the high-frequency information in the out-of-focus area is largely lost, the high-frequency information of the illumination image can be extracted. For example, the high-frequency component energy can be extracted by Fourier transform to determine the focused area information and the out-of-focus area information in the illumination image.
[0026] For example, the focus area information may include the location of the focus area in the image, and the defocus area information may include the location of the defocus area in the image.
[0027] Step S130: Acquire the laser line image of the sample to be tested.
[0028] In this embodiment of the application, a line laser can be enabled to project the line laser onto the surface of the sample to be tested, and an image containing laser stripes (which can be called a laser line image) can be acquired by the camera of the line laser profile sensor.
[0029] For example, the illumination module can be turned off during the acquisition of laser line images of the sample to be tested.
[0030] Step S140: Based on the focused area information and defocused area information in the illumination image, extract the center line of the laser line image.
[0031] In this embodiment of the application, after determining the focus area information and defocus area information in the illumination image in the manner described above, and acquiring the laser line image, the center line of the laser line image can be extracted based on the focus area information and defocus area information in the illumination image.
[0032] For example, the focus area and defocus area in the laser line image can be determined based on the focus area information and defocus area information in the illumination image, and the center line of the laser line image can be extracted based on the focus area and defocus area in the laser line image, according to the basic logic that the laser line is located in the focus area of the laser line image.
[0033] For example, the position of the focused area in the illumination image is the same as the position of the focused area in the laser line image; the position of the defocused area in the illumination image is the same as the position of the defocused area in the laser line image.
[0034] Step S150: Determine the three-dimensional contour information of the sample to be tested based on the extracted center line.
[0035] For example, the three-dimensional contour information of the sample to be tested can be determined based on the extracted centerline and in combination with triangulation.
[0036] It can be seen that, in Figure 1In the illustrated method, on one hand, the sample to be tested is illuminated by an illumination module, and an image of the sample is acquired to obtain an illumination image. Based on the image features of the illumination image, the focus area information and defocus area information in the illumination image are determined. On the other hand, a laser line image of the sample to be tested is acquired. Then, based on the focus area information and defocus area information in the illumination image, the center line of the laser line image is extracted, and the three-dimensional contour information of the sample to be tested is determined based on the extracted center line. By introducing a side illumination module, the illumination image acquired when the sample to be tested is illuminated by the illumination module is used to determine the focus area information and defocus area information in the illumination image. Based on the focus area information and defocus area information in the illumination image, the center line extraction of the laser line image is assisted, which improves the accuracy of center line extraction and thus improves the accuracy of three-dimensional contour measurement.
[0037] In some embodiments, determining the focus area information and defocus area information in the illumination image based on the image features of the illumination image may include: An image sharpness evaluation function is used to calculate the sharpness distribution map of the illumination image. Based on the sharpness distribution map, the in-focus area information and out-of-focus area information in the illumination image are determined.
[0038] For example, taking the aforementioned image features as sharpness, an image sharpness evaluation function can be used to calculate the sharpness of the illumination image. For instance, the sharpness of the illumination image can be calculated pixel by pixel or every other pixel to generate a sharpness distribution map.
[0039] For example, taking the Laplacian operator as the image sharpness evaluation function, the illumination image can be converted into a grayscale image, a 3×3 Laplacian kernel can be used to perform a convolution operation on the grayscale image, the absolute value of the calculation result can be taken and normalized to generate a sharpness distribution map.
[0040] In one example, determining the in-focus and out-of-focus areas in an illuminated image based on a sharpness distribution map may include: Generate a weighted mask based on the sharpness distribution map; Based on the weighted mask, the in-focus and out-of-focus areas in the illumination image are determined.
[0041] For example, a weighted mask can be generated based on the sharpness distribution of the illumination image. Pixels with higher weights have higher sharpness than pixels with lower weights.
[0042] For example, based on the generated weight mask, it is possible to distinguish between in-focus and out-of-focus areas in an image.
[0043] For example, pixels with a weight exceeding a preset weight threshold are pixels in the focused area; pixels with a weight not exceeding the preset weight threshold are pixels in the out-of-focus area.
[0044] In one example, a weighted mask can be used as the focus and defocus information of the illumination image. This weighted mask can be used to assist in the extraction of the center line of the laser line image. For example, the weighted mask can be used to assign weights to pixels in the laser line image to help determine the optimal center point of every column of the laser line image, thereby achieving the extraction of the center point.
[0045] In one example, generating a weight mask based on the sharpness distribution map can include: An adaptive thresholding strategy is applied to the sharpness distribution map and binarized to generate a binarized focus area map; Morphological optimization is performed on the binarized focal region map to generate a weight mask.
[0046] For example, taking the Gaussian adaptive thresholding method, a threshold is calculated for each pixel within its local neighborhood. The size of the local neighborhood (i.e., the neighborhood block size) can be set to a positive odd value, such as 11. That is, for each pixel in the image, the algorithm takes an 11-pixel × 11-pixel square window centered on that pixel, calculates the Gaussian weighted average of the sharpness values of all pixels within the window, and then subtracts a constant offset (e.g., C=2) as the binarization threshold for that pixel. Based on the adaptively determined thresholds for each pixel, the sharpness distribution map is binarized to generate a binarized focus region map.
[0047] Specifically, for any pixel in the sharpness distribution map, if the sharpness of the pixel is greater than the threshold of the pixel, the pixel value of the pixel in the binarized focus area map is set to 255 (representing white, i.e. the initially determined focus area); otherwise, it is set to 0 (representing black, i.e. the out-of-focus area).
[0048] As an example, the morphological optimization process described above may include: Morphological dilation is performed on the binarized focused region map, and discrete noise points are removed.
[0049] For example, a circular structuring element with a radius of 3 pixels is used for dilation to connect adjacent small focused regions; area filtering is performed to remove connected regions with an area less than 100 pixels and to remove discrete noise points. After the above processing, the final binary weighted mask is obtained.
[0050] In one example, generating a weight mask based on the sharpness distribution map can include: Based on the sharpness distribution map, the sharpness of the lighting image is normalized, and the normalized sharpness of the lighting image is determined as the focus confidence of the lighting image, generating a focus confidence map; A weighted mask is generated based on the focus confidence map; the weight of a pixel is positively correlated with the focus confidence of the pixel.
[0051] For example, considering that the focused area of an illumination image typically has higher sharpness, the value obtained by normalizing the sharpness distribution map is used to determine the sharpness of the illumination image as the focus confidence level of the illumination image.
[0052] For example, based on the sharpness distribution map, the sharpness of each pixel can be normalized to determine the normalized sharpness of each pixel, and the normalized sharpness of each pixel can be determined as the focus confidence of each pixel, thereby generating a focus confidence map.
[0053] For example, pixels in the focus confidence map whose focus confidence is higher than a preset confidence threshold belong to the focus region.
[0054] For example, a weighted mask can be generated based on the focus confidence map, wherein the weight of a pixel is positively correlated with the focus confidence of the pixel.
[0055] For example, for any pixel, the focus confidence of that pixel can be used as the weight of that pixel in the weight mask.
[0056] In some embodiments, the above-mentioned extraction of the centerline of the laser line image based on the focused area information and the defocused area information in the illumination image may include: Center points are extracted from the laser line image to obtain candidate center points; For any column of a laser line image, if there are multiple candidate center points in that column, the weight of each candidate center point is determined based on the focused area information and the defocused area information in the illumination image, and the candidate center point with the highest weight is determined as the center point of that column; the weight of pixels in the focused area is higher than the weight of pixels in the defocused area. Determine the center line of the laser line image based on the center point of each column.
[0057] For example, center point extraction methods such as gradient zero-crossing method or gray-scale centroid method can be used to extract the center point of laser line image.
[0058] Taking the gradient zero-crossing method as an example, the gray-scale distribution of the laser line cross-section usually presents a peak (brightest at the center). After taking the first derivative of this distribution curve, its peak value corresponds to the point where the gray-scale changes the fastest (i.e., the edge point), while the zero-crossing point of the second derivative corresponds to the extreme point of the first derivative, which is the peak position of the gray-scale distribution, i.e., the center of the laser line.
[0059] For each column in the image (perpendicular to the laser stripe), calculate the first and second derivatives of its gray-level distribution. Within each column, precisely locate the "zero-crossing point" where the second derivative changes from positive to negative or vice versa. This point corresponds to the maximum value of the gray-level distribution (the center of the laser line). Based on discrete pixels, interpolate the data near the zero-crossing point (e.g., linear interpolation, quadratic fitting) to obtain the center coordinates with sub-pixel accuracy.
[0060] For example, for any column of a laser line image, if there are multiple candidate center points in the column, each candidate center point can be assigned a weight based on the focus area information and defocus area information in the illumination image, and the candidate center point with the highest weight can be determined as the center point of the column.
[0061] For example, a relatively higher weight can be assigned to the candidate center point of the in-focus area, while a relatively lower weight can be assigned to the candidate center point of the out-of-focus area.
[0062] In one example, the weights of each candidate center point can be determined based on a weight mask.
[0063] For example, once the center points of each column are determined, the center line of the laser line image can be determined based on the center points of each column.
[0064] In some embodiments, the above-mentioned extraction of the center point of the laser line image based on the focus area information and defocus area information in the illumination image may include: Center points are extracted from the laser line image to obtain candidate center points; For any column of the laser line image, if there is only one candidate center point in that column, the laser line image is corrected using the focused area information and the defocused area information in the illumination image; whereby the focused area retains the original laser line information, and the defocused area suppresses background stray light; Based on the corrected laser line image, extract the center point of the column; Determine the center line of the laser line image based on the center point of each column.
[0065] For example, in order to improve the accuracy of center point extraction, for any column of the laser line image, if the number of candidate center points in that column is one, the laser line image can be corrected by using the focus area information and defocus area information in the illumination image, retaining the original laser line information in the focus area, and suppressing (removing or shielding) the laser line (background stray light) information in the defocus area, thus obtaining the corrected laser line image.
[0066] For example, a weighted correction can be applied to the laser line image based on a weighted mask, preserving the original laser line information in high-weight areas (such as areas with weights exceeding a preset weight threshold) while suppressing background stray light in low-weight areas (such as areas with weights not exceeding a preset weight threshold).
[0067] For example, given a corrected laser line image, the center point of the column can be extracted based on the corrected laser line image, and the center line of the laser line image can be determined based on the center points of each column.
[0068] To enable those skilled in the art to better understand the technical solutions provided in the embodiments of this application, the technical solutions provided in the embodiments of this application are described below in conjunction with specific application scenarios.
[0069] In this embodiment, by introducing an independent side illumination source, the focal length distribution of the entire field of view (i.e., determining the focused area and the defocused area) can be obtained independently and a priori without relying on the laser itself. This prior knowledge is then used as weight information and incorporated into the laser stripe centerline extraction algorithm to guide the algorithm to retain the signal in the focused area and suppress the signal in the defocused area, thereby effectively removing stray light.
[0070] In this embodiment, on the one hand, the illumination module (i.e., the side illumination module) installed on the side of the online laser profilometer can be activated to illuminate the surface of the sample under test at a set angle. With the line laser off, the camera of the line laser profilometer acquires a surface image (i.e., an illumination image) of the sample under test generated by the side illumination at set exposure parameters. A schematic diagram can be shown as follows: Figure 2 As shown.
[0071] By using an image sharpness evaluation function (such as the Laplacian operator, variance function, or gradient function) to calculate the sharpness distribution map (also known as a sharpness scatter plot) for the illuminated image pixel by pixel, a sharpness distribution map can be obtained. The areas with higher values in this map (areas with values exceeding the corresponding threshold) are the camera's focus areas, indicating that the image details in these areas are clear and the depth of field is appropriate.
[0072] Applying an adaptive thresholding strategy to the sharpness distribution map and performing binarization yields a binarized focus region map (also known as a focus scatter plot), as illustrated below. Figure 3 As shown.
[0073] Based on the focal region map, a morphological dilation operation can be used to obtain a mask image (which can be called a weighted mask) that can select the laser lines in the focal region. A schematic diagram of this mask is shown below. Figure 4 As shown.
[0074] On the other hand, the side illumination module can be turned off, the line laser can be activated, and the line laser can be projected onto the surface of the sample to be tested. The image containing the laser stripes (i.e., the laser line image) can be acquired by the camera of the line laser profile sensor. A schematic diagram can be shown as follows. Figure 5 As shown.
[0075] Based on the obtained focus area information (such as Figure 4 The weighted centerline of the laser image is extracted using a weighted mask (as shown). During the extraction process (e.g., using the gradient zero-crossing method or the centroid method), each pixel in the laser line image can be assigned a weight based on the weighted mask. This weight is positively correlated with the focus confidence of the corresponding pixel position (e.g., a normalized sharpness value can be used as the weight).
[0076] The aforementioned weighting mechanism effectively suppresses the interference of stray light in the defocused area on the laser stripe centerline extraction algorithm.
[0077] For example, a laser line image that suppresses stray light can be as follows: Figure 6 As shown, the center line extraction result of the laser line image with suppressed stray light can be as follows: Figure 7 As shown.
[0078] The specific processing procedure is explained below with reference to the attached diagram.
[0079] like Figure 8 As shown, the specific processing flow of the three-dimensional contour measurement method based on side-assisted lighting may include: 1. LED Optimized Illumination: Adjust the LED light source to the specified illumination angle, and take a picture of the LED illumination on the side of the sample to be tested, which is recorded as Image I.
[0080] 2. Focus area calculation: Apply the Laplacian operator to I to enhance details, calculate the focus area of the image, and generate a focus area map I_focus (i.e., a sharpness distribution map).
[0081] 3. Generate a focused region map: Perform adaptive thresholding and binarization on I_focus to generate a binarized focused region map I_focus_scatter (marking potential effective regions).
[0082] 4. Construct a weight mask: Perform morphological dilation (expanding the connected region) on I_focus_scatter and remove discrete noise points to generate a weight mask I_focus_mask (the white area represents the high weight region).
[0083] 5. Laser line image acquisition: Capture the laser line image, denoted as I_laser.
[0084] 6. Preliminary center point extraction: Calculate the center point position of the laser line for I_laser to obtain the candidate center point set C_raw.
[0085] 7. Determine the number of center points: Determine the number of candidate center points for each column.
[0086] 8. For any column, if the number of candidate center points is one, further processing of the laser line image is performed: a. Generate a new mask: Combining the weighted mask I_focus_mask and the parameters of the original laser line image from the specific contour sensor, a more accurate image mask I_mask_new is generated. b. Stray light suppression processing: Using I_mask_new as weights, the original laser line image I_laser is weighted: high-weight regions (white regions) retain the original laser line information, low-weight regions (black regions) suppress background stray light, outputting an optimized laser line image I_laser_new, and calculating the center point C based on the optimized laser line image I_laser_new.
[0087] 9. For any column, if there are multiple candidate center points (due to stray light interference): enter the multi-center point optimization process: based on the weight mask, assign different priorities to the candidate center points C_raw (the higher the weight, the higher the priority), and use the algorithm to select the center point C with the highest priority from the candidate points.
[0088] This application provides a non-contact three-dimensional contour measurement device, including a line laser contour sensor and an illumination module. The illumination module is located on the side of the line laser contour sensor. The laser contour sensor uses the method described in the above embodiments to realize the three-dimensional contour measurement of the sample to be measured.
[0089] For example, the lighting angle of the lighting module is adjustable.
[0090] For example, a schematic diagram of the outline of a line laser profile sensor can be shown as follows: Figure 9 As shown.
[0091] The illumination module (also known as the side illumination source module) can illuminate the overlapping area of "optical axis-1" (the optical axis of the line laser) and "optical axis-2" (the optical axis of the camera) at a specific "angle-1". A schematic diagram can be seen as follows: Figure 10 As shown.
[0092] For example, the light emitted by the lighting module is a uniform surface light source, and its mounting angle is adjustable. "Angle-1" is the angle between the optical axis of the lighting module and "optical axis-1", and the adjustable range of "Angle-1" is 0~90°.
[0093] For example, the mounting location of the lighting module can be expanded to the following three forms: 1) The lighting module is located on the left side of the camera.
[0094] For example, the lighting module illuminates the overlapping area of "optical axis-1" and "optical axis-2" at a specific "angle-2", as shown in the schematic diagram. Figure 11 As shown.
[0095] For example, the light emitted by the lighting module is a uniform surface light source, and its mounting angle is adjustable. "Angle-2" is the angle between the optical axis of the lighting module and "optical axis-1", and the adjustable range of "Angle-2" is 0~90°.
[0096] 2) The lighting module is located on the right side of the camera.
[0097] For example, the lighting module illuminates the overlapping area of "optical axis-1" and "optical axis-2" at a specific "angle-3", as shown in the schematic diagram. Figure 12 As shown.
[0098] For example, the light emitted by the lighting module is a uniform surface light source, and its mounting angle is adjustable. "Angle-3" is the angle between the optical axis of the lighting module and "optical axis-1", and the adjustable range of "Angle-3" is 0~90°.
[0099] 3) The lighting modules are located on the left and right sides of the camera. For example, the illumination module may include two illumination modules (which may be referred to as illumination module 1 and illumination module 2) located on the left and right sides of the camera. Illumination module 1 illuminates the area where "optical axis-1" and "optical axis-2" overlap at a specific "angle-2"; illumination module 2 illuminates the area where "optical axis-1" and "optical axis-2" overlap at a specific "angle-3". A schematic diagram of this can be shown below. Figure 13 As shown.
[0100] For example, the emitted light from both lighting module 1 and lighting module 2 is a uniform surface light source, and its mounting angle is adjustable. "Angle-2" is the angle between the optical axis of lighting module 1 and "optical axis-1", and "Angle-3" is the angle between the optical axis of lighting module 2 and "optical axis-1". The adjustable range of "Angle-2" and "Angle-3" is 0~90°.
[0101] In some embodiments, the non-contact three-dimensional contour measuring device further includes: an adjustable angle bracket, comprising a rotating hinge mechanism and a locking device, wherein the adjustable angle bracket is fixedly connected to the main body of the lighting module; The rotating hinge mechanism is used to make the angle between the optical axis of the lighting module and the optical axis of the target continuously adjustable within a preset angle range; The locking device includes a mechanical limiting structure or an electronic limiting unit for fixing the included angle and preventing over-range adjustment.
[0102] In some embodiments, the adjustable angle bracket further includes: The drive unit is used to achieve automatic angle adjustment; An angle feedback unit, including an encoder or potentiometer, is used to monitor the included angle parameters in real time.
[0103] It should be noted that, in the embodiments of this application, the above-described method of adjusting the lighting angle of the lighting module by means of a bracket (such as an adjustable angle bracket) is merely a specific example of lighting angle adjustment, and is not intended to limit the scope of protection of this application. In the embodiments of this application, the lighting angle of the lighting module can also be adjusted in other ways, such as by using an electric drive mechanism (such as a rotating shaft driven by a motor) to precisely control the lighting angle of the lighting module; or by manually adjusting and cooperating with a locking mechanism to achieve angle positioning; or by using a hinge structure with multiple preset positions or slots to achieve graded adjustment of the lighting angle.
[0104] In some embodiments, the lighting module includes a uniform surface light source generating device, wherein: The uniform surface light source generating device includes: a light source array, an optical diffusion layer, and a reflection structure; The light source array consists of multiple LED or LD light sources arranged in a matrix. The optical diffusion layer covers the light-emitting side of the light source array; The reflective structure is located on the back side and circumference of the light source array, and its surface is covered with a high reflectivity coating.
[0105] For example, the LD light source can be externally driven and supports high-frequency switching, thereby enabling high-frequency cyclic lighting when multiple auxiliary light sources are used simultaneously.
[0106] In some embodiments, the non-contact three-dimensional contour measurement device further includes: an illumination angle control system, including a control module, a drive module, and a communication interface; The control module is used to receive the included angle setting command and send the bracket rotation angle adjustment command to the drive module; The drive module is used to adjust the rotation angle of the bracket according to the bracket rotation angle adjustment command; The communication interface supports wired or wireless protocols for connecting to external devices and transmitting angle parameters.
[0107] For example, the lighting angle control system may include, but is not limited to, the aforementioned adjustable angle bracket or other systems capable of controlling the lighting angle of the lighting module.
[0108] In some embodiments, the lighting module may include a multispectral light source device, which may include at least one monochromatic light source unit with wavelengths covering 100 nanometers to 1400 nanometers. The monochromatic light source unit can work independently or in combination to generate monochromatic light or multispectral mixed light output.
[0109] In one example, the multispectral light source device also includes: The temperature control module is used to control the temperature of the monochromatic light source unit and stabilize the output wavelength of the light source.
[0110] For example, since temperature affects the performance of a light source, temperature changes may cause the light source to be unable to output a stable wavelength, which may affect the lighting effect.
[0111] Therefore, multispectral light source devices can also be equipped with a temperature control module to control the temperature of each monochromatic light source unit and stabilize the output wavelength of the light source.
[0112] It should be noted that, in the embodiments of this application, the lighting module is not limited to using a multispectral light source device. For example, the lighting module can also use a non-variable spectrum light source device, the specific implementation of which will not be elaborated here.
[0113] In some embodiments, the lighting module includes a plurality of lighting modules arranged in a ring around the target area, with the optical axes of each lighting module intersecting in the overlapping area of optical axis-1 and optical axis-2.
[0114] In one example, the non-contact 3D contour measurement device also includes a controller (such as a central controller) for adjusting the angle parameters of each lighting module.
[0115] For example, the controller can synchronously adjust the included angle parameters of each lighting module.
Claims
1. A three-dimensional contour measurement method, characterized in that, An application is made to a non-contact three-dimensional contour measurement device, the non-contact three-dimensional contour measurement device including a line laser contour sensor and an illumination module, the illumination module being located on the side of the line laser contour sensor; the method includes: The sample to be tested is illuminated by an illumination module, and an image of the sample is acquired to obtain an illumination image; Based on the image features of the illumination image, the focus area information and defocus area information in the illumination image are determined; wherein, the imaging quality of the focus area is higher than that of the defocus area. Acquire the laser line image of the sample to be tested; Based on the focused area information and defocused area information in the illumination image, the center line of the laser line image is extracted; Based on the centerline, the three-dimensional contour information of the sample to be tested is determined.
2. The method according to claim 1, characterized in that, The step of determining the focused area information and defocused area information in the illumination image based on the image features of the illumination image includes: An image sharpness evaluation function is used to calculate the sharpness distribution map of the illumination image. Based on the sharpness distribution map, the focus area information and defocus area information in the illumination image are determined.
3. The method according to claim 2, characterized in that, The step of determining the in-focus and out-of-focus areas in the illumination image based on the sharpness distribution map includes: Based on the aforementioned sharpness distribution map, a weighted mask is generated; Based on the weighted mask, the in-focus and out-of-focus areas in the illumination image are determined.
4. The method according to claim 3, characterized in that, The step of generating a weighted mask based on the sharpness distribution map includes: An adaptive thresholding strategy is applied to the sharpness distribution map and binarization is performed to generate a binarized focus region map; The binarized focus region map is subjected to morphological optimization processing to generate the weight mask.
5. The method according to claim 4, characterized in that, The morphological optimization process includes: Morphological dilation is performed on the binarized focused region map, and discrete noise points are removed.
6. The method according to claim 3, characterized in that, The step of generating a weighted mask based on the sharpness distribution map includes: Based on the sharpness distribution map, the sharpness of the lighting image is normalized, and the normalized sharpness of the lighting image is determined as the focus confidence of the lighting image, thereby generating a focus confidence map; A weighted mask is generated based on the focus confidence map; wherein the weight of a pixel is positively correlated with the focus confidence of the pixel.
7. The method according to claim 1, characterized in that, The step of extracting the centerline of the laser line image based on the focused area information and defocused area information in the illumination image includes: The center point of the laser line image is extracted to obtain candidate center points; For any column of the laser line image, if there are multiple candidate center points in the column, the weight of each candidate center point is determined based on the focused area information and the defocused area information in the illumination image, and the candidate center point with the highest weight is determined as the center point of the column; the weight of pixels in the focused area is higher than the weight of pixels in the defocused area. The center line of the laser line image is determined based on the center point of each column.
8. The method according to claim 1, characterized in that, The step of extracting the center point of the laser line image based on the focused area information and defocused area information in the illumination image includes: The center point of the laser line image is extracted to obtain candidate center points; For any column of the laser line image, if the number of candidate center points in that column is one, the laser line image is corrected using the focused area information and the defocused area information in the illumination image; wherein, the focused area retains the original laser line information, and the defocused area suppresses background stray light; Based on the corrected laser line image, extract the center point of the column; The center line of the laser line image is determined based on the center point of each column.
9. A non-contact three-dimensional contour measuring device, characterized in that, The device includes a line laser profile sensor and an illumination module, wherein the illumination module is located on the side of the line laser profile sensor, and the laser profile sensor employs the method described in any one of claims 1-7 to achieve three-dimensional profile measurement of the sample to be tested.
10. The non-contact three-dimensional contour measuring device according to claim 9, characterized in that, Also includes: An adjustable angle bracket includes a rotating hinge mechanism and a locking device, and the adjustable angle bracket is fixedly connected to the main body of the lighting module; The rotating hinge mechanism is used to make the angle between the optical axis of the lighting module and the optical axis of the line laser continuously adjustable within a preset angle range; The locking device includes a mechanical limiting structure or an electronic limiting unit for fixing the included angle and preventing over-adjustment; wherein, the adjustable angle bracket further includes: The drive unit is used to achieve automatic angle adjustment; An angle feedback unit, including an encoder or potentiometer, is used to monitor the included angle parameters in real time; And / or, the lighting module includes a uniform surface light source generating device, wherein: The uniform surface light source generating device includes: a light source array, an optical diffusion layer, and a reflection structure; The light source array consists of multiple LED or LD light sources arranged in a matrix. The optical diffusion layer covers the light-emitting side of the light source array; The reflective structure is located on the back side and around the circumference of the light source array, and its surface is covered with a high reflectivity coating. And / or, The non-contact three-dimensional contour measurement device also includes: an illumination angle control system, comprising a control module, a drive module, and a communication interface; The control module is used to receive the included angle setting command and send the bracket rotation angle adjustment command to the drive module; The drive module is used to adjust the rotation angle of the bracket according to the bracket rotation angle adjustment command; The communication interface supports wired or wireless protocols for connecting to external devices and transmitting angle parameters; And / or, The lighting module includes a multispectral light source device, which may include at least one monochromatic light source unit. The multispectral light source device further includes: The temperature control module is used to control the temperature of the monochromatic light source unit; And / or, The illumination module includes multiple illumination modules arranged in a ring around the target area, with the optical axes of each illumination module intersecting in the area where the optical axis of the line laser coincides with the optical axis of the camera. The non-contact three-dimensional contour measurement device also includes a controller for adjusting the included angle parameters of each lighting module.