Image reconstruction method, device and equipment

By acquiring and fusing the light strip center lines of line structured light images with different brightness levels, the problem in the existing technology that the light strip center line acquisition depends on image quality is solved, and the accuracy and reliability of three-dimensional reconstruction are improved.

CN112669438BActive Publication Date: 2024-09-24HANGZHOU HIKROBOT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011622241.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-31
Publication Date
2024-09-24
Estimated Expiration
2040-12-31

AI Technical Summary

Technical Problem

In the existing technology, the acquisition of the light strip centerline of a line structured light image depends on the image quality, resulting in poor three-dimensional reconstruction results. Especially when the ambient light intensity and surface material properties are complex, it is difficult to accurately obtain the light strip centerline.

Method used

By acquiring multiple initial line structured light images of different brightness levels, the light strip centerline and its reliability index are determined, and based on fusion of these information, the target light stripe centerline is obtained, thereby achieving three-dimensional reconstruction.

Benefits of technology

The accuracy and reliability of three-dimensional reconstruction are improved. Independent of image quality, the center line of light strips can be accurately obtained under low-quality image conditions, which enhances the effect of three-dimensional reconstruction of line structured light.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000
    Figure 00000000_0000
Patent Text Reader

Abstract

The present application provides an image reconstruction method, device and equipment, the method comprising: obtaining multiple initial line structured light images of different brightness levels; determining the light bar center line of the initial line structured light image, and determining the reliability index of the light bar center line based on the characteristic information of the light bar center line; selecting the line structured light image to be fused, and based on the reliability index of the light bar center line of the initial line structured light image and the reliability index of the light bar center line of the line structured light image to be fused, fusing the light bar center line of the initial line structured light image and the light bar center line of the line structured light image to be fused to obtain the target light bar center line; replacing the light bar center line of the initial line structured light image with the target light bar center line to obtain the target line structured light image; and performing three-dimensional reconstruction based on multiple target line structured light images corresponding to the multiple initial line structured light images. Through the scheme of the present application, the light bar center line of the line structured light image is accurately obtained, and the three-dimensional reconstruction effect of complex materials is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to an image reconstruction method, device and equipment. Background Art

[0002] The line structured light measurement system consists of a laser and a camera. The laser is used to project line structured light onto the surface of the target to be measured (i.e., the object to be measured), and the camera is used to shoot the target to be measured to obtain an image with line structured light, i.e., a line structured light image. After obtaining the line structured light image, the center line of the light strip of the line structured light image can be obtained, and the center line of the light strip can be converted according to the pre-calibrated sensor parameters to obtain the spatial coordinates (i.e., three-dimensional coordinates) of the target to be measured at the current position. Based on the spatial coordinates of the target to be measured at the current position, three-dimensional reconstruction (i.e., three-dimensional reconstruction) of the target to be measured can be achieved.

[0003] From the above content, it can be seen that obtaining the center line of the light strip of the line structured light image is an important step in achieving 3D reconstruction. How to accurately obtain the center line of the light strip of the line structured light image directly affects the effect of 3D reconstruction. However, in the relevant technology, the method of obtaining the center line of the light strip of the line structured light image depends to a large extent on the image quality of the line structured light image, and the image quality depends on the intensity of the ambient light and the surface material properties of the measured target. Once the image quality is relatively poor, it will lead to the inability to accurately obtain the center line of the light strip of the line structured light image, which will lead to a relatively poor effect of 3D reconstruction. Summary of the invention

[0004] The present application provides an image reconstruction method, the method comprising:

[0005] Acquire multiple initial line structured light images with different brightness levels;

[0006] For each initial line structured light image, then:

[0007] Determine the light stripe center line of the initial line structured light image, and determine the reliability index of the light stripe center line based on the characteristic information of the light stripe center line; select the line structured light image to be fused from the multiple initial line structured light images; fuse the light stripe center line of the initial line structured light image and the light stripe center line of the line structured light image to be fused based on the reliability index of the light stripe center line of the initial line structured light image and the reliability index of the light stripe center line of the line structured light image to be fused to obtain a target light stripe center line; replace the light stripe center line of the initial line structured light image with the target light stripe center line to obtain a target line structured light image corresponding to the initial line structured light image;

[0008] Three-dimensional reconstruction is performed based on a plurality of target line structured light images corresponding to the plurality of initial line structured light images.

[0009] Exemplarily, the acquiring of a plurality of initial line structured light images of different brightness levels includes:

[0010] The line structured light measurement system is controlled to adopt different imaging parameters to obtain a plurality of initial line structured light images with different brightness levels; wherein the line structured light measurement system comprises at least a laser and a camera, the imaging parameters are parameters for determining the brightness level of the image, and the imaging parameters comprise at least one of the following: the gain of the camera, the exposure time of the camera, and the laser intensity of the laser.

[0011] Exemplarily, the determining the center line of the light strip of the initial line structured light image includes:

[0012] For each dimension of the initial line structured light image, the pixel points of the dimension are divided into a light stripe area and a background area by using a segmentation threshold, the grayscale value of the pixel points in the light stripe area is greater than the segmentation threshold, and the grayscale value of the pixel points in the background area is not greater than the segmentation threshold; wherein each dimension is each row or each column of the initial line structured light image;

[0013] For each light bar area, determining a center point of the light bar area;

[0014] If there is one center point in the dimension, the center point is determined as the center point of the light strip of the dimension; if there are at least two center points in the dimension, each center point is clustered to obtain the number of cluster points of each center point, and the center point with the largest number of cluster points is determined as the center point of the light strip of the dimension; wherein, when clustering the center points, the center points connected to the center point in other dimensions other than the dimension are searched by the neighborhood method, and the total number of connected center points and the center point is determined as the number of cluster points;

[0015] The light bar center line of the initial line structured light image is determined based on the light bar center points of all dimensions.

[0016] Exemplarily, the light bar center line includes a plurality of light bar center points, and the characteristic information of the light bar center line includes characteristic information of the plurality of light bar center points; and determining the reliability index of the light bar center line based on the characteristic information of the light bar center line includes:

[0017] For each light bar center point included in the light bar center line, a reliability index of the light bar center point is determined based on the number of cluster points of the light bar center point and the grayscale feature value of the light bar center point; wherein the reliability index of the light bar center point is positively correlated with the number of cluster points of the light bar center point, and the reliability index of the light bar center point is positively correlated with the grayscale feature value of the light bar center point;

[0018] The reliability index of the light bar center line is determined based on the reliability indexes of all the light bar center points of the light bar center line, and the reliability index of the light bar center line includes the reliability indexes of all the light bar center points.

[0019] Exemplarily, based on the reliability index of the light stripe center line of the initial line structured light image and the reliability index of the light stripe center line of the line structured light image to be fused, the light stripe center line of the initial line structured light image and the light stripe center line of the line structured light image to be fused are fused to obtain the target light stripe center line, including:

[0020] For each dimension of the initial line structured light image, determining whether a reliability index of a center point of a light strip of the dimension in the initial line structured light image is greater than a preset threshold;

[0021] If yes, the center point of the light stripe of the dimension in the initial line structured light image is determined as the center point of the target light stripe of the dimension; if no, the center point of the light stripe to be fused is selected from the center points of the light stripes of the dimension in all the line structured light images to be fused based on the reliability index of the center point of the light stripe of the dimension in the line structured light image to be fused, all the center points of the light stripe to be fused are interpolated to obtain the center point of the light stripe after interpolation, and the center point of the light stripe after interpolation is determined as the center point of the target light stripe of the dimension;

[0022] A target light strip center line of the initial line structured light image is determined based on the target light strip center points of all dimensions of the initial line structured light image.

[0023] The line structured light image to be fused corresponding to the initial line structured light image is an initial line structured light image having a brightness level different from that of the initial line structured light image; or a target line structured light image corresponding to an initial line structured light image having a brightness level different from that of the initial line structured light image, and the reliability index of the light strip center point of the dimension in the line structured light image to be fused is selected from the light strip center points of the dimension in all the line structured light images to be fused, including:

[0024] For each line structured light image to be fused, if the line structured light image to be fused is an initial line structured light image, when the reliability index of the center point of the light strip of the dimension in the line structured light image to be fused is greater than a preset threshold, the center point of the light strip of the dimension in the line structured light image to be fused is selected as the center point of the light strip to be fused; otherwise, it is prohibited to select the center point of the light strip of the dimension in the line structured light image to be fused as the center point of the light strip to be fused; if the line structured light image to be fused is a target line structured light image, the center point of the light strip of the dimension in the line structured light image to be fused is selected as the center point of the light strip to be fused.

[0025] Exemplarily, interpolating the center points of all the light strips to be merged to obtain the interpolated center points of the light strips includes: performing polynomial interpolation on the center points of all the light strips to be merged to obtain the interpolated center points of the light strips; or performing cubic spline interpolation on the center points of all the light strips to be merged to obtain the interpolated center points of the light strips.

[0026] The line structured light measurement system includes at least a laser and a camera, and the process of obtaining multiple initial line structured light images includes: when the object to be measured moves along a motion direction, the line structured light is projected onto the surface of the object to be measured by the laser, and the object to be measured is photographed by the camera to obtain multiple initial line structured light images; wherein, the object to be measured moves horizontally on the lower side of the line structured light measurement system along the motion direction, and during the movement of the object to be measured, each position between the starting position and the ending position of the object to be measured will pass through the designated position on the lower side of the line structured light measurement system in turn, and the laser projects the line structured light to the designated position.

[0027] The present application provides an image reconstruction device, the device comprising:

[0028] An acquisition module, used for acquiring a plurality of initial line structured light images of different brightness levels;

[0029] A determination module, configured to determine, for each initial line structured light image, a light stripe center line of the initial line structured light image, and determine a reliability index of the light stripe center line based on feature information of the light stripe center line;

[0030] A selection module, used for selecting a line structured light image to be fused from the multiple initial line structured light images;

[0031] A processing module is used to fuse the light strip center lines of the initial line structured light image and the light strip center lines of the line structured light image to be fused based on the reliability index of the light strip center lines of the initial line structured light image and the reliability index of the light strip center lines of the line structured light image to be fused, so as to obtain the target light strip center lines; replace the light strip center lines of the initial line structured light image with the target light strip center lines, so as to obtain the target line structured light image corresponding to the initial line structured light image; and a reconstruction module is used to perform three-dimensional reconstruction based on multiple target line structured light images corresponding to the multiple initial line structured light images.

[0032] The present application provides an image reconstruction device, comprising: a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor;

[0033] The processor is used to execute machine executable instructions to implement the following steps:

[0034] Acquire multiple initial line structured light images with different brightness levels;

[0035] For each initial line structured light image, then:

[0036] Determine the light stripe center line of the initial line structured light image, and determine the reliability index of the light stripe center line based on the characteristic information of the light stripe center line; select the line structured light image to be fused from the multiple initial line structured light images; fuse the light stripe center line of the initial line structured light image and the light stripe center line of the line structured light image to be fused based on the reliability index of the light stripe center line of the initial line structured light image and the reliability index of the light stripe center line of the line structured light image to be fused to obtain a target light stripe center line; replace the light stripe center line of the initial line structured light image with the target light stripe center line to obtain a target line structured light image corresponding to the initial line structured light image;

[0037] Three-dimensional reconstruction is performed based on a plurality of target line structured light images corresponding to the plurality of initial line structured light images.

[0038] It can be seen from the above technical solutions that in the embodiment of the present application, multiple initial line structured light images of different brightness levels can be obtained. For each initial line structured light image, the target light stripe center line of the initial line structured light image can be obtained based on the fusion of the initial line structured light image and the line structured light image to be fused, and the target line structured light image corresponding to the initial line structured light image can be obtained based on the target light stripe center line, and then three-dimensional reconstruction is performed based on the multiple target line structured light images. The above method obtains the target light stripe center line by fusing multiple line structured light images of different brightness levels, thereby accurately obtaining the light stripe center line of the line structured light image and improving the effect of three-dimensional reconstruction. The method of obtaining the light stripe center line of the line structured light image does not depend on the image quality of the line structured light image. Even if the image quality of the line structured light image is poor, the light stripe center line of the line structured light image can be accurately obtained, which leads to a better effect of three-dimensional reconstruction, improves the reliability of the light stripe center line, and is conducive to the realization of three-dimensional reconstruction of line structured light with a high frame rate. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments of the present application or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings of the embodiments of the present application.

[0040] Figure 1 It is a schematic diagram of a line structured light measurement system collecting a line structured light image;

[0041] Figure 2 This is a structural block diagram of an implementation of the present application;

[0042] Figure 3 is a flowchart of an image reconstruction method in one embodiment of the present application;

[0043] Figure 4 is a schematic diagram of center point denoising based on clustering in one embodiment of the present application;

[0044] Figure 5 is a schematic structural diagram of an image reconstruction device in one embodiment of the present application;

[0045] Figure 6 It is a hardware structure diagram of an image reconstruction device in one embodiment of the present application. DETAILED DESCRIPTION

[0046] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, rather than limiting the present application. The singular forms of "a", "said" and "the" used in the present application and claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to any or all possible combinations of one or more associated listed items.

[0047] It should be understood that, although the terms first, second, third, etc. may be used to describe various information in the embodiments of the present application, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, in addition, the word "if" used may be interpreted as "at..." or "when..." or "in response to determination".

[0048] In an embodiment of the present application, an image reconstruction method is proposed, which can be applied to an image reconstruction device. The image reconstruction device can be a line structured light measurement system, a management device (such as a back-end server), etc., and there is no restriction on this, as long as image reconstruction can be achieved. If the method is applied to an online structured light measurement system, the line structured light measurement system can collect line structured light images and execute the image reconstruction method based on the line structured light images. If the method is applied to a management device, the line structured light measurement system can collect line structured light images and send the line structured light images to the management device, and the management device executes the image reconstruction method based on the line structured light images.

[0049] See also Figure 1FIG. 1 is a schematic diagram of a line structured light measurement system collecting a line structured light image. The line structured light measurement system includes at least a laser and a camera (such as an analog camera or a network camera). Figure 1 The laser and camera are not shown in the figure. During the movement of the object to be measured (also referred to as the target to be measured or the object to be measured, and the target to be measured is taken as an example below) along the direction of movement (which can be uniform motion), a laser is used to project line structured light onto the surface of the target to be measured, and a camera is used to shoot the target to be measured to obtain a line structured light image. After obtaining the line structured light image, the center line of the light bar of the line structured light image can be obtained, and the center line of the light bar can be transformed to obtain the spatial coordinates of the target to be measured at the current position. Based on the spatial coordinates of the target to be measured at the current position, three-dimensional reconstruction (i.e., three-dimensional reconstruction) of the target to be measured can be achieved.

[0050] Acquiring the center line of the light strip of the line structured light image is an important step in achieving 3D reconstruction. How to accurately acquire the center line of the light strip of the line structured light image directly affects the effect of 3D reconstruction. In view of the above findings, the present application embodiment proposes a center line dynamic fusion method for multi-brightness line structured light images, see Figure 2 As shown, it is a structural block diagram of an embodiment of the present application. During the movement of the measured target, by adjusting the imaging parameters of the line structured light measurement system, line structured light images of multiple brightness levels are collected, and the light stripe center line of the line structured light images of different brightness levels is extracted and the reliability is evaluated to obtain the light stripe center line and reliability index of the line structured light image. For each line structured light image, the light stripe center line of the line structured light image can be fused based on the light stripe center line and the reliability index to obtain a more complete and accurate target light stripe center line corresponding to the structured light image, which is used for the subsequent three-dimensional reconstruction of the measured target.

[0051] In the above method, the target light strip center line is obtained by fusing multiple line structured light images of different brightness levels, thereby accurately obtaining the light strip center line of the line structured light image and improving the effect of three-dimensional reconstruction. The method of obtaining the light strip center line of the line structured light image does not depend on the image quality of the line structured light image. Even if the image quality of the line structured light image is poor, the light strip center line of the line structured light image can be accurately obtained, which leads to a better three-dimensional reconstruction effect and improves the reliability of the light strip center line.

[0052] The image reconstruction method of the embodiment of the present application is described below in conjunction with specific embodiments.

[0053] See also Figure 3 FIG. 1 is a flow chart of an image reconstruction method, which may include:

[0054] Step 301 : Acquire a plurality of initial line structured light images of different brightness levels.

[0055] Exemplarily, the line structured light measurement system may include at least a laser and a camera, and the process of acquiring multiple initial line structured light images may include but is not limited to: while the object to be measured moves along a motion direction, a line structured light is projected onto the surface of the object to be measured by a laser, and the object to be measured is photographed by a camera to obtain multiple initial line structured light images; wherein, the object to be measured moves horizontally (such as uniformly) along the motion direction at the bottom of the line structured light measurement system, and during the movement of the object to be measured, each position between the starting position and the ending position of the object to be measured will pass through the designated position on the bottom of the line structured light measurement system in turn, and the laser projects the line structured light to the designated position.

[0056] The designated position may be a position directly below the line structured light measurement system, a position to the left of the directly below the position, or a position to the right of the directly below the position. There is no restriction on the designated position, as long as it is located below the line structured light measurement system and the laser can project the line structured light to the designated position.

[0057] The starting position of the object to be measured may also be referred to as the head position of the object to be measured, that is, the frontmost position, and the ending position of the object to be measured may also be referred to as the tail position of the object to be measured, that is, the rearmost position.

[0058] When the object to be measured moves horizontally along the motion direction at the bottom of the line structured light measurement system, the starting position of the object to be measured first passes through the designated position at the bottom of the line structured light measurement system, and the ending position of the object to be measured finally passes through the designated position at the bottom of the line structured light measurement system, and each position between the starting position and the ending position of the object to be measured will pass through the designated position at the bottom of the line structured light measurement system in sequence.

[0059] During the movement of the object to be measured, each position of the object to be measured will pass through the designated position on the lower side of the line structured light measurement system in turn. Taking position A as an example, when position A passes through the designated position on the lower side of the line structured light measurement system, the laser can project the line structured light to the designated position, that is, project the line structured light to position A of the object to be measured. In this way, when the object to be measured is photographed by a camera to obtain an initial line structured light image, the initial line structured light image includes the object to be measured, and there is a line at position A of the object to be measured. This line is generated when the line structured light is projected to position A of the object to be measured, and is also the basis for subsequent data processing.

[0060] When the target is moving in uniform translation relative to the line structured light measurement system, the line structured light measurement system is controlled to adopt different imaging parameters to obtain a plurality of line structured light images with different brightness levels. For the convenience of distinction, the line structured light image obtained by the line structured light measurement system is called the initial line structured light image.

[0061] Exemplarily, the imaging parameter may be a parameter for determining the brightness level of an image, based on which, by controlling the line structured light measurement system to adopt different imaging parameters, a plurality of initial line structured light images of different brightness levels may be obtained. For example, when the line structured light measurement system adopts imaging parameter 1, an initial line structured light image of brightness level 1 may be obtained, and when the line structured light measurement system adopts imaging parameter 2, an initial line structured light image of brightness level 2 may be obtained, and so on.

[0062] The line structured light measurement system includes at least a laser and a camera. During the uniform translational motion of the target to be measured, the laser is used to project the line structured light onto the surface of the target to be measured, and the camera is used to shoot the target to be measured to obtain an initial line structured light image. From the above, it can be seen that the brightness level of the initial line structured light image is related to the laser and the camera. Therefore, the imaging parameters can be the imaging parameters of the laser and / or the imaging parameters of the camera. For example, the imaging parameters can include but are not limited to at least one of the following: the gain of the camera, the exposure time of the camera, and the laser intensity of the laser. For the convenience of description, the camera gain, the exposure time of the camera, and the laser intensity of the laser are used as examples for explanation.

[0063] Exemplarily, during the uniform translational motion of the measured target, the line structured light measurement system can acquire a line structured light image sequence from dark to bright by alternating a set of imaging parameters from low to high, and the line structured light image sequence includes multiple initial line structured light images of different brightness levels. Alternatively, a line structured light image sequence from bright to dark can be acquired by alternating a set of imaging parameters from high to low. Of course, other methods can also be used to acquire line structured light image sequences, as long as the line structured light image sequence can include multiple initial line structured light images of different brightness levels, and there is no limitation on this acquisition method.

[0064] Line structured light image sequence IMG = {IMG1, IMG2, ..., IMGT, IMG T+1 ,IMG T+2 ,…,IMG 2T ,…IMG N}, T represents the cycle of imaging parameters, and N represents the total number of initial line structured light images.

[0065] For example, assuming that there are T imaging parameters in total (a combination of gain 1, exposure time 1 and laser intensity 1 is used as one imaging parameter, a combination of gain 1, exposure time 1 and laser intensity 2 is used as another imaging parameter, and so on), the line structured light measurement system obtains an initial line structured light image IMG1 when the first imaging parameter is used, and obtains an initial line structured light image IMG2 when the line structured light measurement system uses the second imaging parameter. By analogy, the line structured light measurement system obtains an initial line structured light image IMG when the Tth imaging parameter is used. T At this time, the cycle of imaging parameters is completed and the next cycle of imaging parameters is carried out. When the line structured light measurement system adopts the first imaging parameter, the initial line structured light image IMG is obtained. T+1 When the line structured light measurement system uses the second imaging parameter, the initial line structured light image IMG is obtained. T+2 By analogy, the line structured light measurement system obtains the initial line structured light image IMG when the Tth imaging parameter is used 2T At this point, one cycle of imaging parameters is completed, and the next cycle of imaging parameters is carried out, and so on.

[0066] To summarize, by changing the camera gain, camera exposure time, laser intensity, etc. in turn according to the cycle T of imaging parameters, the initial line structured light images with multiple brightness levels can be obtained. In each cycle T, the brightness level of the initial line structured light image is different. The cycle T represents the type of imaging parameters, that is, there are T types of imaging parameters, and T types of imaging parameters correspond to T brightness levels.

[0067] In a possible implementation, when the line structured light measurement system uses different imaging parameters, the imaging parameter cycle mode can be a single variable adjustment mode, which means cycling a single parameter. For example, ① changing the gain of the camera, setting a set of gain sequences from low to high G = {G1, G2, ..., GT}; ② changing the exposure time of the camera, setting a set of exposure time sequences from short to long E = {E1, E2, ..., ET}; ③ changing the laser intensity of the laser, setting a set of laser intensity sequences from weak to strong I = {I1, I2, ..., IT}.

[0068] For example, assuming that the camera gain is G1 and G2, the camera exposure time is E1 and E2, and the laser intensity is I1 and I2, then, the camera gain and the camera exposure time are kept constant, and the laser intensity of the laser is changed. For example, the line structured light measurement system uses G1, E1 and I1 to obtain the line structured light image IMG1 of brightness level 1, and the line structured light measurement system uses G1, E1 and I2 to obtain the line structured light image IMG2 of brightness level 2. At this point, a cycle of imaging parameters is completed, and the line structured light measurement system uses G1, E1 and I1 again to obtain the line structured light image IMG3 of brightness level 1, and so on. Alternatively, the camera gain and the laser intensity of the laser are kept constant, and the camera exposure time is changed. Alternatively, the camera exposure time and the laser intensity of the laser are kept constant, and the camera gain is changed.

[0069] In another possible implementation, when the line structured light measurement system uses different imaging parameters, the imaging parameters may be cycled in a multi-variable adjustment mode, which refers to the coordinated cycling of at least two parameters. For example, the gain of the camera and the exposure time of the camera are changed, or the gain of the camera and the laser intensity of the laser are changed, or the exposure time of the camera and the laser intensity of the laser are changed, or the gain of the camera, the exposure time of the camera, and the laser intensity of the laser are changed.

[0070] For example, assuming that the camera gain is G1 and G2, the camera exposure time is E1 and E2, the laser intensity of the laser is I1 and I2, the line structured light measurement system uses G1, E1 and I1 to obtain the line structured light image IMG1 of brightness level 1, the line structured light measurement system uses G1, E1 and I2 to obtain the line structured light image IMG2 of brightness level 2, the line structured light measurement system uses G1, E2 and I1 to obtain the line structured light image IMG3 of brightness level 3, the line structured light measurement system uses G1, E2 and I2 to obtain the line structured light image IMG4 of brightness level 4, and the line structured light measurement system uses G1, E2 and I2 to obtain the line structured light image IMG4 of brightness level 4. The system adopts G2, E1 and I1 to obtain the line structured light image IMG5 of brightness level 5, the line structured light measurement system adopts G2, E1 and I2 to obtain the line structured light image IMG6 of brightness level 6, the line structured light measurement system adopts G2, E2 and I1 to obtain the line structured light image IMG7 of brightness level 7, the line structured light measurement system adopts G2, E2 and I2 to obtain the line structured light image IMG8 of brightness level 8, thus completing a cycle of imaging parameters, and the line structured light measurement system re-adopts G1, E1 and I1 to obtain the line structured light image IMG9 of brightness level 1, and so on.

[0071] Step 302 : for each initial line structured light image, determine the light stripe center line of the initial line structured light image, and determine the reliability index of the light stripe center line based on feature information of the light stripe center line.

[0072] Exemplarily, the light bar center line may include multiple light bar center points, that is, multiple light bar center points constitute the light bar center line. The light bar center line may be a row of light bar center lines of the initial line structured light image, or the light bar center line may be a column of light bar center lines of the initial line structured light image. Whether it is arranged in rows or columns depends on whether the installation position of the camera and the laser is in the vertical direction or the horizontal direction, and there is no limitation on this.

[0073] In a possible implementation, the following steps may be used to determine the center line of the light strip. Of course, the following determination method is only an example and is not limited thereto, as long as the center line of the light strip can be obtained.

[0074] Step a1: For each dimension of the initial line structured light image, use a segmentation threshold to segment the pixels of the dimension into a light strip area and a background area, the grayscale value of the pixels in the light strip area is greater than the segmentation threshold, and the grayscale value of the pixels in the background area is not greater than the segmentation threshold. Exemplarily, each dimension of the initial line structured light image is each row of the initial line structured light image, or each dimension of the initial line structured light image is each column of the initial line structured light image. Whether each dimension of the initial line structured light image is each row or each column is related to the direction of the installation position of the camera and the laser. For example, if the installation position of the camera and the laser is in a vertical direction (indicating that the line structured light projected onto the surface of the object is in a vertical direction), each dimension of the initial line structured light image is each column of the initial line structured light image. If the installation position of the camera and the laser is in a horizontal direction (indicating that the line structured light projected onto the surface of the object is in a horizontal direction), each dimension of the initial line structured light image is each row of the initial line structured light image.

[0075] Exemplarily, if the light strip center line is a row of light strip center lines of the initial line structured light image, then each dimension of the initial line structured light image is each column of the initial line structured light image, that is, the light strip center point is obtained for each column, and the light strip center points of each column of the initial line structured light image can form a row of light strip center lines.

[0076] If the light strip center line is a column of light strip center lines of the initial line structured light image, then each dimension of the initial line structured light image is each row of the initial line structured light image, that is, the light strip center point is obtained for each row, and the light strip center points of each row of the initial line structured light image can form a column of light strip center lines.

[0077] For example, for any initial line structured light image IMG of n∈N n, the segmentation threshold K can be used to segment the initial line structured light image IMG n The pixel points of each dimension are segmented, and the pixel point area with a gray value greater than K is segmented into the light strip area, and the pixel point area with a gray value not greater than K is segmented into the background area.

[0078] Obviously, for the initial line structured light image IMG n For each dimension of , there may be one light stripe region, at least two light stripe regions, or no light stripe region. If there is a light stripe region in the dimension, the light stripe region may include at least one pixel. In addition, if there is no light stripe region in the dimension, it means that the grayscale values ​​of all pixels in the dimension are not greater than the segmentation threshold K.

[0079] Exemplarily, the value of the segmentation threshold K can be configured based on experience, and the value of the segmentation threshold K can also be determined by the Otsu method or the histogram method, and there is no restriction on the value of the segmentation threshold K.

[0080] Step a2: for each light strip area, determine the center point of the light strip area.

[0081] For example, for the initial line structured light image IMG n For each dimension, there may be one light stripe area, at least two light stripe areas, or no light stripe area. If there is a light stripe area in this dimension, then for each light stripe area in this dimension, the center point of the light stripe area is determined, that is, the center coordinates of the light stripe area are calculated to obtain the center point of the light stripe area. The center point of the light stripe area is the center point of all the pixels in the light stripe area. There is no limitation on the determination method, as long as the center point of the light stripe area can be obtained. For example, the center point of the light stripe area can be determined by using the grayscale centroid method or the geometric center method. Of course, the above algorithms are just two examples.

[0082] For example, the initial line structured light image IMG n Each dimension is the initial line structured light image IMG n For example, for each column of the initial line structured light image IMG nFor the first column of the image processing system, if the grayscale value of the pixel in the first column is greater than the segmentation threshold, the pixel belongs to the light stripe area; if the grayscale value of the pixel in the first column is not greater than the segmentation threshold, the pixel belongs to the background area. For all pixels whose grayscale values ​​are greater than the segmentation threshold, adjacent pixels are grouped into the same light stripe area, and non-adjacent pixels are grouped into different light stripe areas. For example, the 1st to 5th pixels in the first column belong to light stripe area 1, the 6th to 11th pixels belong to the background area, the 12th to 20th pixels belong to light stripe area 2, and so on. For each light stripe area in the first column (such as light stripe area 1 and light stripe area 2, etc.), the center point of the light stripe area can be determined, such as the center point of light stripe area 1 is the 3rd pixel in the first column (the center point of pixels 1 to 5), and the center point of light stripe area 2 is the 16th pixel in the first column (the center point of pixels 12 to 20).

[0083] Step a3: For each dimension of the initial line structured light image, if there is a center point in the dimension, the center point is determined as the center point of the light strip in the dimension; if there are at least two center points in the dimension, each center point is clustered to obtain the number of cluster points of each center point, and the center point with the largest number of cluster points is determined as the center point of the light strip in the dimension. Thus, the center point of the light strip in the dimension can be obtained. Exemplarily, when clustering the center point, the center point connected to the center point in other dimensions outside the dimension is searched by the neighborhood method, and the total number of connected center points and the center point is determined as the number of cluster points.

[0084] For example, for the initial line structured light image IMG n For each dimension of , if there is no light bar area in this dimension, then there is no center point in this dimension, that is, there is no light bar center point in this dimension.

[0085] For the initial line structured light image IMG n For each dimension, if there is a light bar area in this dimension, there is a center point in this dimension, and the center point is directly determined as the center point of the light bar in this dimension.

[0086] For the initial line structured light image IMG n For each dimension, if there are at least two light bar areas in the dimension, there are at least two center points in the dimension, and there is a noise center point among at least two center points. Therefore, the noise center point needs to be removed and only one center point is retained as the light bar center point of the dimension.

[0087] See also Figure 4 As shown, it is a schematic diagram of clustering-based center point denoising for the initial line structured light image IMG nIn the fifth dimension (i.e., the fifth column), there are center point p1 (center point on the upper side of the fifth column) and center point p2 (center point on the lower side of the fifth column). Cluster center point p1 to obtain the number of cluster points of center point p1, that is, the number of all center points (i.e., gray pixels) connected to center point p1, including center point p1 itself. Obviously, the number of cluster points of center point p1 is 14; cluster center point p2 to obtain the number of cluster points of center point p2 is 6, that is, the number of all center points (i.e., gray pixels) connected to center point p2, including center point p2 itself. Then, center point p1 with the largest number of cluster points is determined as the center point of the light bar in the fifth dimension. For the tenth dimension (tenth column), there are center point p3 (center point on the upper side of the tenth column) and center point p4 (center point on the lower side of the tenth column). Center point p3 is clustered to obtain 14 clustering points for center point p3; center point p4 is clustered to obtain 6 clustering points for center point p4. Then, center point p3 with the largest number of clustering points is determined as the center point of the light bar in the tenth dimension.

[0088] The processing process for other dimensions is similar and will not be repeated here.

[0089] After the above processing is performed on each dimension, the center point of the light strip in that dimension can be obtained, and the initial line structured light image IMG n There is at most one light bar center point in each dimension of Figure 4 shown.

[0090] Exemplarily, when clustering the center point of one dimension, the neighborhood method can be used to search for center points connected to the center point in other dimensions outside the dimension, and the total number of connected center points and the center point, that is, the number of cluster points of the center point, can be counted. The search process of the neighborhood method is not limited in this embodiment.

[0091] See also Figure 4 As shown, the dark-marked pixels are the extracted center points (with sub-pixel accuracy in the row direction). There may be two or more center points in each column between the two dotted lines in the left figure. The result in the right figure is obtained after the clustering point denoising strategy is used to ensure that there is at most one light bar center point in each column.

[0092] Step a4: for each dimension of the initial line structured light image, after obtaining the light stripe center point of that dimension, the light stripe center line of the initial line structured light image can be determined based on the light stripe center points of all dimensions, that is, the light stripe center points of all dimensions are combined to form the light stripe center line of the initial line structured light image.

[0093] In a possible implementation, the light bar center line includes multiple light bar center points, and the reliability index of the light bar center line includes the reliability indexes of multiple light bar center points, that is, each light bar center point corresponds to a reliability index, and the characteristic information of the light bar center line includes the characteristic information of multiple light bar center points. On this basis, the reliability index of the light bar center line is determined based on the characteristic information of the light bar center line, which may include but is not limited to: for each light bar center point included in the light bar center line, based on the number of cluster points of the light bar center point and the grayscale characteristic value of the light bar center point, the reliability index of the light bar center point is determined. The reliability index of the light bar center point is positively correlated with the number of cluster points of the light bar center point, and the reliability index of the light bar center point is positively correlated with the grayscale characteristic value of the light bar center point. Then, the reliability index of the light bar center line is determined based on the reliability indexes of all the light bar center points of the light bar center line, for example, the reliability index of the light bar center line may include the reliability indexes of all the light bar center points. For example, assuming that the center line of the light bar includes light bar center point 1 and light bar center point 2, the reliability index of light bar center point 1 is determined based on the number of cluster points of light bar center point 1 and the grayscale eigenvalue of light bar center point 1, and the reliability index of light bar center point 2 is determined based on the number of cluster points of light bar center point 2 and the grayscale eigenvalue of light bar center point 2.

[0094] Exemplarily, the reliability index is used to evaluate the reliability of the center point of the light strip, and each center point of the light strip may correspond to a reliability index. For example, the reliability index of the center point of the light strip may be determined by the following formula: R = K × F gray In the above formula, R is the reliability index of the center point of the light strip, K is the number of cluster points of the center point of the light strip, and F gray is the grayscale characteristic value of the center point of the light strip. The grayscale characteristic value may include but is not limited to at least one of the following: contrast, Gaussian fitting reliability, and saturation.

[0095] Step 303 : for each initial line structured light image, a line structured light image to be fused is selected from a plurality of initial line structured light images, that is, a line structured light image to be fused corresponding to the initial line structured light image.

[0096] Exemplarily, for the line structured light image to be fused corresponding to the initial line structured light image, the line structured light image to be fused may be an initial line structured light image having a brightness level different from that of the initial line structured light image. Alternatively, the line structured light image to be fused may be a target line structured light image corresponding to an initial line structured light image having a brightness level different from that of the initial line structured light image. Of course, the line structured light image to be fused may also be an initial line structured light image having a brightness level the same as that of the initial line structured light image. Alternatively, the line structured light image to be fused may also be a target line structured light image corresponding to an initial line structured light image having a brightness level the same as that of the initial line structured light image.

[0097] Exemplarily, the number of line structured light images to be fused can be configured based on experience, without limitation, such as 1, 2, etc. In this embodiment, the number of line structured light images to be fused is taken as T as an example.

[0098] In a possible implementation manner, the line structured light image sequence IMG={IMG1, IMG2, . . . , IMG T ,IMG T+1 ,IMG T+2 ,…,IMG 2T ,…IMG N}, for the initial line structured light image IMG n , you can n Adjacent and inclusive IMG at all brightness levels n-T / 2 ,…,IMG n ,…,IMG n+T / 2 The center line of the light strip is subsequently fused, so IMG n-T / 2 ,…,IMG n ,…,IMG n+T / 2 Except IMG n The other initial line structured light images other than IMG are used as the line structured light images to be fused. Of course, in practical applications, if IMG n If the number of previous images is less than T / 2, you can n The initial line structured light image is then supplemented until the number of line structured light images to be fused is T. n If the number of subsequent images is less than T / 2, you can n The initial line structured light images are supplemented in the front until the number of line structured light images to be fused is T.

[0099] In another possible implementation, the line structured light image sequence IMG={IMG1, IMG2, . . . , IMG T ,IMG T+1 ,IMG T+2 ,…,IMG2T ,…IMG N}, for the initial line structured light image C i,n , can be used for C i,n Adjacent and including P of all brightness levels i ={D i,n-T / 2 ,…,D i,n-1 ,C i,n ,C i,n+1 ,…,C i,n+T / 2} is subsequently fused to the center line of the light strip. Therefore, P i ={D i,n-T / 2 ,…,D i,n-1 ,C i,n ,C i,n+1 ,…,C i,n+T / 2} except C i,n The other line structured light images are taken as the line structured light images to be fused.

[0100] For example, C i,n IMG = {IMG1, IMG2, ..., IMG T ,IMG T+1 ,IMG T+2 ,…,IMG 2T ,…IMG N}, {D i,n-T / 2 ,…,D i,n-1} can be IMG = {IMG1, IMG2, ..., IMG T ,IMG T+1 ,IMG T+2 ,…,IMG 2T ,…IMG N} in C i,n The target line structured light image corresponding to the previous initial line structured light image, and the method for obtaining the target line structured light image can be referred to in the subsequent embodiments. i,n+1 ,…,C i,n+T / 2} is IMG = {IMG1, IMG2, ..., IMG T ,IMG T+1 ,IMG T+2 ,…,IMG 2T ,…IMG N} in C i,n The initial line structured light image after.

[0101] Obviously, since there are T types of imaging parameters in total, that is, there are T types of brightness levels, the above-mentioned line structured light images to be fused may include line structured light images to be fused at all brightness levels.

[0102] Step 304, for each initial line structured light image, based on the reliability index of the light stripe center line of the initial line structured light image and the reliability index of the light stripe center line of the line structured light image to be fused (i.e., the line structured light image to be fused corresponding to the initial line structured light image), the light stripe center line of the initial line structured light image and the light stripe center line of the line structured light image to be fused are fused to obtain the target light stripe center line.

[0103] Exemplarily, the light stripe center line of the initial line structured light image includes multiple light stripe center points, and the reliability index of the light stripe center line includes the reliability index of multiple light stripe center points. The light stripe center line of the line structured light image to be fused includes multiple light stripe center points, and the reliability index of the light stripe center line includes the reliability index of multiple light stripe center points. Based on this, based on the reliability index of the light stripe center points of the initial line structured light image and the reliability index of the light stripe center points of the line structured light image to be fused, the light stripe center points of the initial line structured light image and the light stripe center points of the line structured light image to be fused are obtained to obtain the target light stripe center points, and all the target light stripe center points are combined into the target light stripe center line corresponding to the initial line structured light image.

[0104] In a possible implementation, the following steps may be used to obtain the center line of the target light strip. Of course, the following determination method is only an example and is not limited thereto, as long as the center line of the target light strip can be obtained.

[0105] Step b1: for each dimension (such as row or column) of the initial line structured light image, determine whether the reliability index of the center point of the light strip of the dimension in the initial line structured light image is greater than a preset threshold (which can be configured based on experience). If yes, then step b2 can be executed; if no, then step b3 can be executed.

[0106] Step b2, determine the center point of the light stripe of the dimension in the initial line structured light image as the center point of the target light stripe of the dimension. For example, for the first dimension of the initial line structured light image, if the reliability index of the center point of the light stripe of the first dimension in the initial line structured light image is greater than the preset threshold, then directly determine the center point of the light stripe of the first dimension as the center point of the target light stripe of the first dimension. For the second dimension of the initial line structured light image, if the reliability index of the center point of the light stripe of the second dimension in the initial line structured light image is not greater than the preset threshold, execute step b3 and subsequent steps to obtain the center point of the target light stripe of the second dimension.

[0107] Step b3: selecting the center point of the light strip to be fused from the center points of the light strips of the dimension in all the line structured light images to be fused based on the reliability index of the center points of the light strips of the dimension in the line structured light images to be fused.

[0108] Exemplarily, referring to step 303, the line structured light image to be fused corresponding to the initial line structured light image may be an initial line structured light image having a brightness level different from that of the initial line structured light image; or, the line structured light image to be fused corresponding to the initial line structured light image may be a target line structured light image corresponding to an initial line structured light image having a brightness level different from that of the initial line structured light image. On this basis, step b3 may include but is not limited to:

[0109] For each line structured light image to be fused, if the line structured light image to be fused is an initial line structured light image whose brightness level is different from that of the initial line structured light image, then: if the reliability index of the center point of the light stripe of the dimension in the line structured light image to be fused is greater than a preset threshold, the center point of the light stripe of the dimension in the line structured light image to be fused is selected as the center point of the light stripe to be fused. If the reliability index of the center point of the light stripe of the dimension in the line structured light image to be fused is not greater than the preset threshold, it may be prohibited to select the center point of the light stripe of the dimension in the line structured light image to be fused as the center point of the light stripe to be fused.

[0110] For each line structured light image to be fused, if the line structured light image to be fused is a target line structured light image corresponding to an initial line structured light image whose brightness level is different from that of the initial line structured light image, the center point of the light strip of this dimension in the line structured light image to be fused is directly selected as the center point of the light strip to be fused, without comparing the size relationship between the reliability index and the preset threshold.

[0111] For example, for the initial line structured light image IMG n , assuming that IMG n Corresponding to T line structured light images to be fused, these line structured light images to be fused are IMG n-T / 2 ,…,IMG n-1 ,IMG n+1 …,IMG n+T / 2 .

[0112] For IMG n The kth dimension of IMG n Whether the reliability index of the center point of the light bar of the kth dimension is greater than a preset threshold (the preset threshold is recorded as Thre, and the preset threshold can be configured based on experience). If not, then IMG n The center point of the light strip of the kth dimension is not used as the center point of the light strip to be fused. And,

[0113] For each line structured light image to be fused (in IMG n-T / 2 For example, the processing process of other line structured light images to be fused is the same). If IMG n-T / 2 is with IMG nDifferent target line structured light images corresponding to other initial line structured light images directly convert IMG n-T / 2 The center point of the light strip of the kth dimension is used as the center point of the light strip to be fused. n-T / 2 is with IMG n Different other initial line structured light images (i.e., not the target line structured light image), further determine IMG n-T / 2 Is the reliability index of the center point of the light bar of the kth dimension greater than the preset threshold? If so, IMG n-T / 2 The center point of the light strip of the kth dimension is taken as the center point of the light strip to be fused. If not, then IMG n-T / 2 The center point of the light strip of the kth dimension is not used as the center point of the light strip to be fused.

[0114] In summary, the initial line structured light image IMG can be obtained n The center point of the light strip to be fused in the kth dimension of , the number of the center points of the light strip to be fused can be multiple. Similarly, IMG n The center points of the light strips to be fused in other dimensions, that is, IMG can be obtained n The center point of the light strip to be fused in each dimension.

[0115] Step b4: for each dimension of the initial line structured light image, after obtaining the center point of the light strip to be fused in that dimension, all the center points of the light strips to be fused in that dimension can be interpolated to obtain the interpolated center point of the light strip, and the interpolated center point of the light strip is determined as the target center point of the light strip in that dimension.

[0116] For example, for IMG n The kth dimension of the image can be interpolated for all the center points of the light strips to be fused in the kth dimension, and the interpolated center point of the light strip is determined as the center point of the target light strip in the kth dimension.

[0117] Exemplarily, the interpolation method may include but is not limited to polynomial interpolation and cubic spline interpolation, etc., and there is no restriction on this interpolation method. If polynomial interpolation is adopted, polynomial interpolation can be performed on the center points of all the light strips to be fused in this dimension to obtain the center points of the light strips after interpolation, and there is no restriction on this polynomial interpolation process. If cubic spline interpolation is adopted, cubic spline interpolation can be performed on the center points of all the light strips to be fused in this dimension to obtain the center points of the light strips after interpolation, and there is no restriction on this cubic spline interpolation process.

[0118] Of course, the above are just a few examples of interpolation methods, and there is no limitation to this. As long as the center points of all the light strips to be fused in this dimension can be interpolated to obtain the interpolated center points of the light strips, it will be fine.

[0119] For example, considering that the target to be measured moves in one dimension (such as uniform motion), the change in surface height of the target to be measured during the movement will cause the coordinates of the center point of the light strip between adjacent frames to change, and the coordinates of the center point of the light strip are only related to the height of the object. Therefore, a center point motion compensation strategy based on interpolation is designed, that is, all the center points of the light strips to be fused in this dimension are interpolated to achieve motion compensation.

[0120] Step b5: after obtaining the target light strip center point of each dimension of the initial line structured light image, determine the target light strip center line of the initial line structured light image based on the target light strip center points of all dimensions of the initial line structured light image, that is, combine the target light strip center points of all dimensions of the initial line structured light image to obtain the target light strip center line of the initial line structured light image.

[0121] In a possible implementation, for each dimension of the initial line structured light image, the process of step b2 can be used to obtain the center point of the target light stripe of that dimension, or the processes of steps b3 and b4 can be used to obtain the center point of the target light stripe of that dimension. After obtaining the center points of the target light stripes of all dimensions of the initial line structured light image, the center points of the target light stripes of all dimensions of the initial line structured light image can be combined to obtain the center line of the target light stripe of the initial line structured light image.

[0122] In the above embodiment, for the initial line structured light image IMG n , assuming that IMG n The corresponding T line structured light images to be fused are IMG n-T / 2 ,…,IMG n-1 ,IMG n+1 …,IMG n+T / 2 , IMG n The reliability index of the center point of the light strip of the kth dimension is not greater than the preset threshold, and the IMG in the line structured light image to be fused n-T / 2 ,IMG n-1 ,IMG n+1 and IMG n+T / 2 If the reliability index of the center point of the light strip of the kth dimension of the image to be fused is greater than the preset threshold, and the reliability index of the center point of the light strip of the kth dimension of the remaining image in the line structured light image to be fused is not greater than the preset threshold, then IMG n-T / 2 ,IMG n-1 ,IMG n+1 and IMG n+T / 2 The center point of the light strip of the kth dimension is selected as the center point of the light strip to be fused. n-T / 2 The center point of the light strip of the kth dimension is denoted as s1, and IMG n-1 The center point of the light strip of the kth dimension is denoted as s2, and IMG n+1The center point of the light strip of the kth dimension is denoted as s3, and IMG n+T / 2 The center point of the light bar in the kth dimension is recorded as s4.

[0123] Then, all the center points of the light strips to be merged in the kth dimension can be interpolated, that is, s1, s2, s3 and s4 can be interpolated to obtain the interpolated light strip center point, which is subsequently recorded as s5, and the interpolated light strip center point s5 is determined as the target light strip center point of the kth dimension.

[0124] In addition, the initial line structured light image IMG n The above processing is also performed on other dimensions of , so that the initial line structured light image IMG can be obtained n The center point of the target light strip in each dimension is then converted into the initial line structured light image IMG n The center points of all target light strips constitute the target light strip center line.

[0125] In the above embodiment, s1, s2, s3 and s4 are interpolated. For example, polynomial interpolation and cubic spline interpolation are used to interpolate s1, s2, s3 and s4. Regarding how to interpolate s1, s2, s3 and s4, taking cubic spline interpolation as an example, the coordinates of multiple center points (such as s1, s2, s3 and s4) (such as when the k-th dimension is the k-th column, the coordinate is the horizontal coordinate value) and the frame numbers of the multiple center points (indicating that the center point is the frame number of the T line structured light images to be fused, such as IMG where s1 is located) are known. n-T / 2 It is the first frame image, IMG where s2 is located n-1 is the T / 2-1 frame image, and so on), a function relationship can be fitted (that is, the function relationship is fitted by the cubic spline interpolation algorithm), the input of the function relationship is the frame number of the center point, and the output of the function relationship is the coordinate of the center point. After obtaining the function relationship, the initial line structured light image IMG n Substitute the frame number into the function relationship to obtain the initial line structured light image IMG n The center point of the light bar is the interpolated point (such as s5), and there is no restriction on this interpolation process.

[0126] For example, for the i-th dimension of the initial line structured light image, assuming that the center point sequence of the light stripes in the i-th dimension is C i ={C i,n-T / 2 ,…,C i,n ,…,C i,n+T / 2}, the reliability index sequence corresponding to the center point of the light strip in the i-th dimension is R i = {R i,n-T / 2 ,…,R i,n ,…,R i,n+T / 2The reliability index R of the i-th dimension based on the initial line structured light image i,n The size of the preset threshold determines whether to perform a check on the center point sequence C of the light strip in the i-th dimension. i For fusion processing, if R i,n If the value is greater than the preset threshold, no fusion processing will be performed and C will be retained directly. i,n is the center point of the target light strip in the i-th dimension. If R i,n If it is not greater than the preset threshold, fusion processing is performed, that is, from C i ={C i,n-T / 2 ,…,C i,n ,…,C i,n+T / 2}, select the center point of the light strip that is greater than the preset threshold (i.e., the center point of the light strip to be fused), interpolate the selected center point of the light strip to be fused, and use the interpolated center point of the light strip as the center point of the target light strip of the i-th dimension. At this point, the center point of the target light strip of the i-th dimension of the initial line structured light image is obtained.

[0127] Step 305 , replacing the light stripe center line of the initial line structured light image with the target light stripe center line of the initial line structured light image to obtain a target line structured light image corresponding to the initial line structured light image.

[0128] Exemplarily, after obtaining the target light bar center line of the initial line structured light image (i.e., the coordinates of the target light bar center line), the target light bar center line can be drawn in the initial line structured light image, and the previous light bar center line can be deleted. The initial line structured light image marked with the target light bar center line is called the target line structured light image. At this point, the target line structured light image corresponding to the initial line structured light image is obtained.

[0129] Step 306, three-dimensional reconstruction is performed based on multiple target line structured light images corresponding to the multiple initial line structured light images, that is, three-dimensional reconstruction is performed based on multiple target line structured light images. For example, the center line of the target light strip in the target line structured light image is converted according to the pre-calibrated sensor parameters to obtain the spatial coordinates of the measured target at the current position, and the three-dimensional reconstruction of the measured target can be achieved based on the spatial coordinates.

[0130] Exemplarily, for each initial line structured light image, steps 302 to 305 may be performed to obtain a target line structured light image corresponding to the initial line structured light image. After obtaining a target line structured light image corresponding to each initial line structured light image, three-dimensional reconstruction may be performed based on multiple target line structured light images. For example, assuming that M initial line structured light images are collected, each initial line structured light image corresponds to a target line structured light image, and M target line structured light images may be obtained. Then, three-dimensional reconstruction may be performed based on the M target line structured light images, and the three-dimensional reconstruction process will not be described in detail.

[0131] Exemplarily, the above execution order is only for the convenience of describing the examples given. In practical applications, the execution order between the steps can also be changed, and there is no limitation on this execution order. Moreover, in other embodiments, the steps of the corresponding method are not necessarily executed in the order shown and described in this specification, and the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; multiple steps described in this specification may also be combined into a single step for description in other embodiments.

[0132] It can be seen from the above technical solutions that in the embodiment of the present application, multiple initial line structured light images of different brightness levels can be obtained. For each initial line structured light image, the target light stripe center line of the initial line structured light image can be obtained based on the fusion of the initial line structured light image and the line structured light image to be fused, and the target line structured light image corresponding to the initial line structured light image can be obtained based on the target light stripe center line, and then three-dimensional reconstruction is performed based on the multiple target line structured light images. The above method obtains the target light stripe center line by fusing multiple line structured light images of different brightness levels, thereby accurately obtaining the light stripe center line of the line structured light image and improving the effect of three-dimensional reconstruction. The method of obtaining the light stripe center line of the line structured light image does not depend on the image quality of the line structured light image. Even if the image quality of the line structured light image is poor, the light stripe center line of the line structured light image can be accurately obtained, which leads to a better effect of three-dimensional reconstruction, improves the reliability of the light stripe center line, and is conducive to the realization of three-dimensional reconstruction of line structured light with a high frame rate. The above method can simultaneously improve the reliability of the center line of the light strip of the light-absorbing material and the light-reflecting material, enhance the adaptability of the line structured light measurement system to complex materials, and the entire processing flow does not require complex calculations and is highly efficient.

[0133] Based on the same application concept as the above method, an image reconstruction device is proposed in the embodiment of the present application, see Figure 5 FIG. 1 is a schematic diagram of the structure of the image reconstruction device, wherein the device comprises:

[0134] An acquisition module 51 is used to acquire multiple initial line structured light images of different brightness levels; a determination module 52 is used to determine, for each initial line structured light image, a light stripe center line of the initial line structured light image, and determine a reliability index of the light stripe center line based on feature information of the light stripe center line; a selection module 53 is used to select a line structured light image to be fused from the multiple initial line structured light images; a processing module 54 is used to fuse the light stripe center line of the initial line structured light image and the light stripe center line of the line structured light image to be fused based on the reliability index of the light stripe center line of the initial line structured light image and the reliability index of the light stripe center line of the line structured light image to be fused, so as to obtain a target light stripe center line; and a target light stripe center line corresponding to the initial line structured light image is replaced by the target light stripe center line. A reconstruction module 55 is used to perform three-dimensional reconstruction based on multiple target line structured light images corresponding to the multiple initial line structured light images.

[0135] Exemplarily, when acquiring multiple initial line structured light images of different brightness levels, the acquisition module 51 is specifically used to: control the line structured light measurement system to adopt different imaging parameters to acquire multiple initial line structured light images of different brightness levels; wherein the line structured light measurement system includes at least a laser and a camera, the imaging parameters are parameters for determining the brightness level of the image, and the imaging parameters include at least one of the following: the gain of the camera, the exposure time of the camera, and the laser intensity of the laser.

[0136] Exemplarily, when determining the light stripe center line of the initial line structured light image, the determination module 52 is specifically used to: for each dimension of the initial line structured light image, use a segmentation threshold to segment the pixel points of the dimension into a light stripe area and a background area, the grayscale value of the pixel points in the light stripe area is greater than the segmentation threshold, and the grayscale value of the pixel points in the background area is not greater than the segmentation threshold; wherein each dimension is each row of the initial line structured light image, or each column;

[0137] For each light bar area, determining a center point of the light bar area;

[0138] If there is one center point in the dimension, the center point is determined as the center point of the light strip of the dimension; if there are at least two center points in the dimension, each center point is clustered to obtain the number of cluster points of each center point, and the center point with the largest number of cluster points is determined as the center point of the light strip of the dimension; wherein, when clustering the center points, the center points connected to the center point in other dimensions other than the dimension are searched by the neighborhood method, and the total number of connected center points and the center point is determined as the number of cluster points;

[0139] The light bar center line of the initial line structured light image is determined based on the light bar center points of all dimensions.

[0140] Exemplarily, the light bar center line includes a plurality of light bar center points, and the characteristic information of the light bar center line includes characteristic information of the plurality of light bar center points; when the determination module 52 determines the reliability index of the light bar center line based on the characteristic information of the light bar center line, it is specifically used to:

[0141] For each light bar center point included in the light bar center line, a reliability index of the light bar center point is determined based on the number of cluster points of the light bar center point and the grayscale feature value of the light bar center point; wherein the reliability index of the light bar center point is positively correlated with the number of cluster points of the light bar center point, and the reliability index of the light bar center point is positively correlated with the grayscale feature value of the light bar center point;

[0142] The reliability index of the light bar center line is determined based on the reliability indexes of all the light bar center points of the light bar center line, and the reliability index of the light bar center line includes the reliability indexes of all the light bar center points.

[0143] Exemplarily, the processing module 54 fuses the light stripe center lines of the initial line structured light image and the light stripe center lines of the line structured light image to be fused based on the reliability index of the light stripe center lines of the initial line structured light image and the reliability index of the light stripe center lines of the line structured light image to be fused, and obtains the target light stripe center lines, which are specifically used for:

[0144] For each dimension of the initial line structured light image, determining whether a reliability index of a center point of a light strip of the dimension in the initial line structured light image is greater than a preset threshold;

[0145] If yes, the center point of the light stripe of the dimension in the initial line structured light image is determined as the center point of the target light stripe of the dimension; if no, the center point of the light stripe to be fused is selected from the center points of the light stripes of the dimension in all the line structured light images to be fused based on the reliability index of the center point of the light stripe of the dimension in the line structured light image to be fused, all the center points of the light stripe to be fused are interpolated to obtain the center point of the light stripe after interpolation, and the center point of the light stripe after interpolation is determined as the center point of the target light stripe of the dimension;

[0146] A target light strip center line of the initial line structured light image is determined based on the target light strip center points of all dimensions of the initial line structured light image.

[0147] Exemplarily, the line structured light image to be fused corresponding to the initial line structured light image is an initial line structured light image having a brightness level different from that of the initial line structured light image; or a target line structured light image corresponding to an initial line structured light image having a brightness level different from that of the initial line structured light image; the processing module 54 selects the center point of the light strip to be fused from the center points of the light strips of the dimension in all the line structured light images to be fused based on the reliability index of the center point of the light strip of the dimension in the line structured light image to be fused, and is specifically used for:

[0148] For each line structured light image to be fused, if the line structured light image to be fused is an initial line structured light image, when the reliability index of the center point of the light strip of the dimension in the line structured light image to be fused is greater than a preset threshold, the center point of the light strip of the dimension in the line structured light image to be fused is selected as the center point of the light strip to be fused; otherwise, it is prohibited to select the center point of the light strip of the dimension in the line structured light image to be fused as the center point of the light strip to be fused; if the line structured light image to be fused is a target line structured light image, the center point of the light strip of the dimension in the line structured light image to be fused is selected as the center point of the light strip to be fused.

[0149] Exemplarily, the processing module 54 interpolates the center points of all the light strips to be merged, and when obtaining the interpolated center points of the light strips, it is specifically used for: performing polynomial interpolation on all the center points of the light strips to be merged, to obtain the interpolated center points of the light strips; or performing cubic spline interpolation on all the center points of the light strips to be merged, to obtain the interpolated center points of the light strips.

[0150] Exemplarily, the line structured light measurement system includes at least a laser and a camera, and the acquisition module 51 is specifically used to acquire multiple initial line structured light images: when the object to be measured moves along the motion direction, the line structured light is projected onto the surface of the object to be measured by the laser, and the object to be measured is photographed by the camera to obtain multiple initial line structured light images; wherein, the object to be measured moves horizontally on the lower side of the line structured light measurement system along the motion direction, and during the movement of the object to be measured, each position between the starting position and the end position of the object to be measured will pass through the designated position on the lower side of the line structured light measurement system in turn, and the laser projects the line structured light to the designated position.

[0151] Based on the same application concept as the above method, an image reconstruction device is proposed in the embodiment of the present application, see Figure 6 As shown, the image reconstruction device includes: a processor 61 and a machine-readable storage medium 62, wherein the machine-readable storage medium 62 stores machine-executable instructions that can be executed by the processor 61; the processor 61 is used to execute the machine-executable instructions to implement the following steps:

[0152] Acquire multiple initial line structured light images with different brightness levels;

[0153] For each initial line structured light image, then:

[0154] Determine the light stripe center line of the initial line structured light image, and determine the reliability index of the light stripe center line based on the characteristic information of the light stripe center line; select the line structured light image to be fused from the multiple initial line structured light images; fuse the light stripe center line of the initial line structured light image and the light stripe center line of the line structured light image to be fused based on the reliability index of the light stripe center line of the initial line structured light image and the reliability index of the light stripe center line of the line structured light image to be fused to obtain a target light stripe center line; replace the light stripe center line of the initial line structured light image with the target light stripe center line to obtain a target line structured light image corresponding to the initial line structured light image;

[0155] Three-dimensional reconstruction is performed based on a plurality of target line structured light images corresponding to the plurality of initial line structured light images.

[0156] Based on the same application concept as the above method, an embodiment of the present application also provides a machine-readable storage medium, on which a number of computer instructions are stored. When the computer instructions are executed by a processor, the image reconstruction method disclosed in the above example of the present application can be implemented.

[0157] The above-mentioned machine-readable storage medium may be any electronic, magnetic, optical or other physical storage device, which may contain or store information, such as executable instructions, data, etc. For example, the machine-readable storage medium may be: RAM (Radom Access Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), solid state drive, any type of storage disk (such as CD, DVD, etc.), or similar storage medium, or a combination thereof.

[0158] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device or a combination of any of these devices.

[0159] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0160] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the embodiments of the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0161] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0162] Moreover, these computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0163] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0164] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. An image reconstruction method, characterized in that: The method comprises: Acquire multiple initial line structured light images with different brightness levels; For each initial line structured light image, then: Determine the light stripe center line of the initial line structured light image, and determine the reliability index of the light stripe center line based on the characteristic information of the light stripe center line; select the line structured light image to be fused from the multiple initial line structured light images; fuse the light stripe center line of the initial line structured light image and the light stripe center line of the line structured light image to be fused based on the reliability index of the light stripe center line of the initial line structured light image and the reliability index of the light stripe center line of the line structured light image to be fused to obtain a target light stripe center line; replace the light stripe center line of the initial line structured light image with the target light stripe center line to obtain a target line structured light image corresponding to the initial line structured light image; Performing three-dimensional reconstruction based on a plurality of target line structured light images corresponding to the plurality of initial line structured light images; The light bar center line includes multiple light bar center points, and the characteristic information of the light bar center line includes the characteristic information of the multiple light bar center points; the reliability index of the light bar center line is determined based on the characteristic information of the light bar center line, including: for each light bar center point included in the light bar center line, based on the number of clustering points of the light bar center point and the grayscale eigenvalue of the light bar center point, determining the reliability index of the light bar center point; wherein the reliability index of the light bar center point is positively correlated with the number of clustering points of the light bar center point, and the reliability index of the light bar center point is positively correlated with the grayscale eigenvalue of the light bar center point; the reliability index of the light bar center line is determined based on the reliability indicators of all light bar center points of the light bar center line, and the reliability index of the light bar center line includes the reliability indicators of all light bar center points.

2. The method according to claim 1, characterized in that The step of acquiring a plurality of initial line structured light images of different brightness levels comprises: The line structured light measurement system is controlled to adopt different imaging parameters to obtain a plurality of initial line structured light images with different brightness levels; wherein the line structured light measurement system comprises at least a laser and a camera, the imaging parameters are parameters for determining the brightness level of the image, and the imaging parameters comprise at least one of the following: the gain of the camera, the exposure time of the camera, and the laser intensity of the laser.

3. The method according to claim 1, characterized in that The step of determining the center line of the light strip of the initial line structured light image comprises: For each dimension of the initial line structured light image, the pixel points of the dimension are divided into a light stripe area and a background area by using a segmentation threshold, the grayscale value of the pixel points in the light stripe area is greater than the segmentation threshold, and the grayscale value of the pixel points in the background area is not greater than the segmentation threshold; wherein each dimension is each row or each column of the initial line structured light image; For each light bar area, determining a center point of the light bar area; If there is one center point in the dimension, the center point is determined as the center point of the light strip of the dimension; if there are at least two center points in the dimension, each center point is clustered to obtain the number of cluster points of each center point, and the center point with the largest number of cluster points is determined as the center point of the light strip of the dimension; wherein, when clustering the center points, the center points connected to the center point in other dimensions other than the dimension are searched by the neighborhood method, and the total number of connected center points and the center point is determined as the number of cluster points; The light bar center line of the initial line structured light image is determined based on the light bar center points of all dimensions.

4. The method according to claim 1, characterized in that: The light stripe center line of the initial line structured light image and the light stripe center line of the line structured light image to be fused are fused based on the reliability index of the light stripe center line of the initial line structured light image and the reliability index of the light stripe center line of the line structured light image to be fused to obtain the target light stripe center line, including: For each dimension of the initial line structured light image, determining whether a reliability index of a center point of a light strip of the dimension in the initial line structured light image is greater than a preset threshold; If yes, the center point of the light stripe of the dimension in the initial line structured light image is determined as the center point of the target light stripe of the dimension; if no, the center point of the light stripe to be fused is selected from the center points of the light stripes of the dimension in all the line structured light images to be fused based on the reliability index of the center point of the light stripe of the dimension in the line structured light image to be fused, all the center points of the light stripe to be fused are interpolated to obtain the center point of the light stripe after interpolation, and the center point of the light stripe after interpolation is determined as the center point of the target light stripe of the dimension; A target light strip center line of the initial line structured light image is determined based on the target light strip center points of all dimensions of the initial line structured light image.

5. The method according to claim 4, characterized in that The line structured light image to be fused corresponding to the initial line structured light image is an initial line structured light image having a brightness level different from that of the initial line structured light image; or a target line structured light image corresponding to an initial line structured light image having a brightness level different from that of the initial line structured light image; Selecting the center point of the light strip to be fused from the center points of the light strips of the dimension in all the line structured light images to be fused based on the reliability index of the center point of the light strip in the dimension in the line structured light image to be fused, including: For each line structured light image to be fused, if the line structured light image to be fused is an initial line structured light image, when the reliability index of the center point of the light strip of the dimension in the line structured light image to be fused is greater than a preset threshold, the center point of the light strip of the dimension in the line structured light image to be fused is selected as the center point of the light strip to be fused; otherwise, it is prohibited to select the center point of the light strip of the dimension in the line structured light image to be fused as the center point of the light strip to be fused; if the line structured light image to be fused is a target line structured light image, the center point of the light strip of the dimension in the line structured light image to be fused is selected as the center point of the light strip to be fused.

6. The method according to claim 4, characterized in that The interpolating the center points of all the light strips to be fused to obtain the interpolated center points of the light strips includes: Perform polynomial interpolation on the center points of all the light strips to be merged to obtain the interpolated center points of the light strips; or perform cubic spline interpolation on the center points of all the light strips to be merged to obtain the interpolated center points of the light strips.

7. The method according to any one of claims 1 to 6, characterized in that: The line structured light measurement system includes at least a laser and a camera, and the process of acquiring multiple initial line structured light images includes: During the movement of the object to be measured along the motion direction, the laser projects line structured light onto the surface of the object to be measured, and the camera photographs the object to be measured to obtain a plurality of initial line structured light images; wherein, the object to be measured moves horizontally along the motion direction at the lower side of the line structured light measurement system, and during the movement of the object to be measured, each position between the starting position and the ending position of the object to be measured will sequentially pass through a designated position at the lower side of the line structured light measurement system, and the laser projects line structured light to the designated position.

8. An image reconstruction device, characterized in that: The device comprises: An acquisition module, used for acquiring a plurality of initial line structured light images of different brightness levels; A determination module, configured to determine, for each initial line structured light image, a light stripe center line of the initial line structured light image, and determine a reliability index of the light stripe center line based on feature information of the light stripe center line; A selection module, used for selecting a line structured light image to be fused from the multiple initial line structured light images; A processing module, configured to fuse the light stripe center lines of the initial line structured light image and the light stripe center lines of the line structured light image to be fused based on the reliability index of the light stripe center lines of the initial line structured light image and the reliability index of the light stripe center lines of the line structured light image to be fused, so as to obtain target light stripe center lines; and to replace the light stripe center lines of the initial line structured light image with the target light stripe center lines, so as to obtain a target line structured light image corresponding to the initial line structured light image; A reconstruction module, configured to perform three-dimensional reconstruction based on a plurality of target line structured light images corresponding to the plurality of initial line structured light images; The light bar center line includes multiple light bar center points, and the characteristic information of the light bar center line includes the characteristic information of the multiple light bar center points; the reliability index of the light bar center line is determined based on the characteristic information of the light bar center line, including: for each light bar center point included in the light bar center line, based on the number of clustering points of the light bar center point and the grayscale eigenvalue of the light bar center point, determining the reliability index of the light bar center point; wherein the reliability index of the light bar center point is positively correlated with the number of clustering points of the light bar center point, and the reliability index of the light bar center point is positively correlated with the grayscale eigenvalue of the light bar center point; the reliability index of the light bar center line is determined based on the reliability indicators of all light bar center points of the light bar center line, and the reliability index of the light bar center line includes the reliability indicators of all light bar center points.

9. An image reconstruction device, characterized in that: include: a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor; The processor is used to execute machine executable instructions to implement the following steps: Acquire multiple initial line structured light images with different brightness levels; For each initial line structured light image, then: Determine the light stripe center line of the initial line structured light image, and determine the reliability index of the light stripe center line based on the characteristic information of the light stripe center line; select the line structured light image to be fused from the multiple initial line structured light images; fuse the light stripe center line of the initial line structured light image and the light stripe center line of the line structured light image to be fused based on the reliability index of the light stripe center line of the initial line structured light image and the reliability index of the light stripe center line of the line structured light image to be fused to obtain a target light stripe center line; replace the light stripe center line of the initial line structured light image with the target light stripe center line to obtain a target line structured light image corresponding to the initial line structured light image; Performing three-dimensional reconstruction based on a plurality of target line structured light images corresponding to the plurality of initial line structured light images; The light bar center line includes multiple light bar center points, and the characteristic information of the light bar center line includes the characteristic information of the multiple light bar center points; the reliability index of the light bar center line is determined based on the characteristic information of the light bar center line, including: for each light bar center point included in the light bar center line, based on the number of clustering points of the light bar center point and the grayscale eigenvalue of the light bar center point, determining the reliability index of the light bar center point; wherein the reliability index of the light bar center point is positively correlated with the number of clustering points of the light bar center point, and the reliability index of the light bar center point is positively correlated with the grayscale eigenvalue of the light bar center point; the reliability index of the light bar center line is determined based on the reliability indicators of all light bar center points of the light bar center line, and the reliability index of the light bar center line includes the reliability indicators of all light bar center points.