Surface structured light three-dimensional measurement method and system based on adaptive partition projection

By using adaptive partition projection technology in three-dimensional measurement, establishing a mutually reflective surface optical path model, performing adaptive partition projection and image matching, solving the error problem caused by multiple reflections of industrial metal parts, and achieving high-precision and fast three-dimensional measurement. .

CN118746261AActive Publication Date: 2024-10-08HUAZHONG UNIV OF SCI & TECH

Patent Information

Application Number
CN202410738975.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-07
Publication Date
2024-10-08
Estimated Expiration
2044-06-07

Smart Images

  • Figure CN118746261A_ABST
    Figure CN118746261A_ABST
Patent Text Reader

Abstract

The invention discloses a surface structured light three-dimensional measurement method and system based on self-adaptive partition projection, and belongs to the field of three-dimensional measurement, and the method comprises the steps: carrying out the reflection discrimination through the interaction of the projection of a projector and the image capture of a camera according to the principle that a plurality of times of reflection light in a mutual reflection surface light path model interferes with the solution of a sine structure grating; based on reflection discrimination data, adaptive partitioning is carried out on a to-be-projected structured light image, so that the structured light image is projected in a partitioned manner, high-precision three-dimensional measurement is carried out in the partitioned manner, and compared with traditional surface structured light three-dimensional measurement, the improved measurement method is expected to solve the measurement quality problems of mutual reflection surface measurement failure or measurement missing and the like, and the measurement accuracy is improved. And the three-dimensional data of the mutual reflection surface can be efficiently and precisely obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of three-dimensional measurement, and more specifically, relates to a surface structured light three-dimensional measurement method and system based on adaptive partition projection. Background Art

[0002] At present, in the field of industrial parts measurement, 3D measurement technology based on surface structured light has the advantages of fast measurement speed and large data volume, and has been widely used. However, industrial metal parts often have complex surface morphology and multiple reflection areas, resulting in multiple reflections, which may cause the sinusoidal structured light fringes to interfere with each other in the image, resulting in large phase calculation errors and 3D calculation errors.

[0003] To solve this problem, the existing solutions are mainly the following: surface powder spraying 3D reconstruction method; complex light suppression method based on high-frequency projection; direct illumination matching method based on epipolar constraints; regional projection method based on adaptive surface segmentation. Among them, the surface powder spraying 3D reconstruction method is highly dependent and cumbersome to operate. Some workpieces do not have the conditions for powder spraying and the powder will affect the reconstruction accuracy. The complex light suppression method based on high-frequency projection proposes a solution to suppress reflected light based on the ideal assumption of direct illumination or complex illumination, which is difficult to cope with various complex situations in actual 3D reconstruction. The direct illumination matching method based on epipolar constraints relies on the non-episode dominant assumption, that is, the light propagating in the epipolar plane only contributes to direct illumination, but not to reflected illumination, and cannot solve the situation where a large amount of reflected light exists in the epipolar plane. The regional projection method based on adaptive surface segmentation assumes that there is only secondary reflected light between different surfaces, which is difficult to solve the errors caused by multiple reflected light and requires 3D model data of the workpiece to be measured, which is highly dependent.

[0004] Therefore, a three-dimensional measurement technology for spray-free coating is needed, which has simpler equipment requirements, better adaptability and higher accuracy, so that the measurement speed of the inter-reflective workpiece surface is fast and the measurement accuracy is high. Summary of the invention

[0005] In view of the above defects or improvement needs of the prior art, the present invention provides a surface structured light three-dimensional measurement method and system based on adaptive partition projection, thereby solving the problems of low measurement efficiency and low measurement accuracy caused by inaccurate and imprecise partitioning of the existing adaptive surface segmentation regional projection method and difficulty in solving the errors caused by multiple reflected light.

[0006] To achieve the above object, according to a first aspect of the present invention, a surface structured light three-dimensional measurement method based on adaptive partition projection is provided, comprising:

[0007] S1, obtaining an image of the workpiece to be measured captured by the left camera and / or the right camera when the projector projects the image to be projected onto the surface of the workpiece to be measured;

[0008] S2, clear the pixel block pair set C, determine the target pixel block of the kth pixel point of the left camera and / or the right camera according to the image of the workpiece to be measured, and clear the pixel block set B k , and use the same division method to divide each target pixel block into multiple sub-pixel blocks and add B k , add B without duplication k The sub-pixel blocks in the total set of sub-pixel blocks B are converted into k Any two sub-blocks in the pixel block pair are added to the total set of pixel block pairs C without duplication; k = 1, 2, ..., N, N is the total number of pixels of the left camera and / or the right camera;

[0009] The target pixel block of the k-th pixel point is the pixel block in the first target list and B k The target first list is a list corresponding to the projection image that makes the gray value of the k-th pixel point higher than the gray value threshold among the multiple first lists obtained in the previous iteration;

[0010] S3, determine whether the size of each pixel block in B is less than the threshold value, if so, output B and C and enter S4, otherwise, take the pixel blocks in B as nodes, take the pixel block pairs in C as edges, construct a graph structure and use the graph coloring algorithm to solve to obtain multiple first lists; turn on the pixel points of the corresponding areas of all pixel blocks in each of the first lists in the full-size pure color image of the projector, and turn off other pixel points to obtain the images corresponding to each of the first lists; take the images corresponding to each of the first lists as new images to be projected, and return to S1 for loop iteration;

[0011] In the first iteration, the image to be projected is a full-size pure color image of the projector, B k Only one full-size pixel block of the projector is included, and the pixel blocks in the first list only include one full-size solid color image of the projector;

[0012] S4, using the pixel blocks in B output by S3 as nodes and the pixel block pairs in C output by S3 as edges, constructing a graph structure and applying a graph coloring algorithm to solve it to obtain multiple second lists, turning on the pixel points of the corresponding areas of all the pixel blocks in each of the second lists in the full-size structured light image of the projector, and turning off the other pixel points, to obtain the images corresponding to each of the second lists, and using them as images to be projected to project onto the surface of the workpiece to be measured, and obtaining the images of the workpiece to be measured simultaneously acquired by the left and right cameras, calculating the phase map and matching it, reconstructing the three-dimensional point cloud of the workpiece to be measured, and fusing all the reconstructed three-dimensional point clouds to obtain the overall three-dimensional point cloud of the workpiece to be measured.

[0013] According to a second aspect of the present invention, there is provided a surface structured light three-dimensional measurement system based on adaptive partition projection, comprising: a projector, left and right cameras, and a computer, wherein the projector is arranged between the left and right cameras, and the optical axes of the left and right cameras are symmetrical with respect to the optical axis of the projector, and wherein the computer is used to execute the surface structured light three-dimensional measurement method as described in the first aspect;

[0014] The computer and the projector are connected via an HDMI interface of the computer and an HDMI interface of the projector, and the computer is also used to control the projector to project the image to be projected onto the workpiece to be measured;

[0015] The left and right cameras are connected to the computer respectively, and the computer is also used to send control signals to the left and right cameras after a preset delay after the projector projects the image to be projected onto the workpiece to be measured; wherein the preset delay is greater than the response time of the projector to the projection instruction;

[0016] The left and right cameras are used to collect images of the workpiece to be measured when receiving a control signal.

[0017] In general, the above technical solutions conceived by the present invention can achieve the following beneficial effects compared with the prior art:

[0018] 1. Considering that the actively projected surface structured light will be reflected multiple times on the mutually reflecting surface, thereby generating mutual interference, resulting in phase solution failure or phase calculation error, the present invention establishes a mutually reflecting surface optical path model based on the optical path characteristics, and according to the principle of multiple reflected light in the model interfering with the sinusoidal structure grating phase solution, the interaction between the projector projection and the camera capture image is used to perform reflection identification, and based on the reflection identification data, the structured light image to be projected is adaptively partitioned. Compared with the traditional partitioning method that relies on the workpiece model data, the method directly uses scene information detection to generate partitioned areas, and compared with the aforementioned traditional partitioning method, the influence of multiple reflections is taken into account, thereby realizing high-precision partitioned projection of structured light images, partitioning to obtain more accurate phase maps, and partitioning to achieve accurate matching of the phase points of the left and right cameras, thereby obtaining high-precision three-dimensional point cloud data.

[0019] 2. When the present invention detects the mutual reflection interference area, the detection speed and efficiency are taken into consideration, and the detection areas are aggregated according to the principle of no conflict within the block to realize parallel detection of the scene. Compared with the method of independent detection of each block, while ensuring the detection quality, the detection speed is greatly improved, thereby shortening the time required for the entire measurement. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 A schematic flow chart of a surface structured light three-dimensional measurement method based on adaptive partition projection provided by an embodiment of the present invention;

[0021] Figure 2 (a) and (b) are respectively the optical path diagram from the non-inter-reflective surface projector to the camera surface established based on the optical path characteristics, and the optical path diagram from the inter-reflective surface projector to the camera surface established based on the optical path characteristics;

[0022] Figure 3 A schematic diagram of a parallel detection process of scene mutual reflection areas provided by an embodiment of the present invention;

[0023] Figure 4 A schematic diagram of a partition mask provided in an embodiment of the present invention acting on a sinusoidal grating fringe pattern. DETAILED DESCRIPTION

[0024] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0025] The embodiment of the present invention provides a surface structured light three-dimensional measurement method based on adaptive partition projection, such as Figure 1 As shown, including:

[0026] S1, obtaining the image of the workpiece to be measured captured by the left camera and / or the right camera when the projector projects the image to be projected onto the surface of the workpiece to be measured; S2, clearing the pixel block pair set C, determining the target pixel block of the kth pixel point of the left camera and / or the right camera according to the image of the workpiece to be measured, and clearing the pixel block set B k , and use the same division method to divide each target pixel block into multiple sub-pixel blocks and add B k , add B without duplication k The sub-pixel blocks in the total set of sub-pixel blocks B are converted into k Any two sub-blocks in the pixel block pair are added to the total set of pixel block pairs C without duplication; k = 1, 2, ..., N, N is the total number of pixels of the left camera and / or the right camera (that is, traversing each pixel point);

[0027] The target pixel block of the k-th pixel point is the pixel block in the first target list and B k The target first list is a list corresponding to the projection image that makes the gray value of the k-th pixel point higher than the gray value threshold among the multiple first lists obtained in the previous iteration;

[0028] S3, determine whether the size of each pixel block in B is less than the threshold value, if so, output B and C and enter S4, otherwise, take the pixel blocks in B as nodes, take the pixel block pairs in C as edges, construct a graph structure and use the graph coloring algorithm to solve to obtain multiple first lists; turn on the pixel points of the corresponding areas of all pixel blocks in each of the first lists in the full-size pure color image of the projector, and turn off other pixel points to obtain the images corresponding to each of the first lists; take the images corresponding to each of the first lists as new images to be projected, and return to S1 for loop iteration;

[0029] In the first iteration, the image to be projected is a full-size pure color image of the projector, B k Only one full-size pixel block of the projector is included, and the pixel blocks in the first list only include one full-size pixel block of the projector;

[0030] Specifically, in the above steps S1-S3, the projector projects the image to be projected onto the surface of the workpiece to be measured, the left camera and / or the right camera synchronously acquires the image of the workpiece to be measured (hereinafter also referred to as the scene image), the image of the workpiece to be measured is analyzed to generate a new image to be projected, the image to be projected and the camera acquires the image, and the image of the workpiece to be measured acquired by the camera is analyzed in a loop until the preset conditions are met, and the reflection recognition data is obtained.

[0031] The image projected by the projector onto the surface of the workpiece to be measured for the first time is a full-size pure color image, and the left camera and / or the right camera synchronously acquire the scene image; in the loop iteration, the image acquired by the left camera and / or the right camera in the previous iteration is analyzed, and each pixel point of the image captured by the left camera and / or the right camera is traversed to determine the target pixel block of each pixel point. It should be noted that for each pixel point, its target pixel block is the pixel block in the first list obtained in the previous iteration corresponding to the projection image that makes the gray value of the kth pixel point higher than the gray value threshold and B k The target pixel block of each pixel point is divided into multiple sub-pixel blocks in the same way.

[0032] Clear B k , divide the target pixel block of the k-th pixel into multiple sub-pixel blocks and add them to B k , B k The pixel block pairs formed by combining the elements in two by two are added to the total conflict block pair set C, and B is added without duplication. kThe elements in the sub-pixel block are added to the total set B of the sub-pixel block (i.e., B and C are both non-repeating sets), and the elements in the set B are used as nodes, and the elements in the set C are used as edges to construct a graph. A graph coloring algorithm is used. As known to those skilled in the art, the graph coloring algorithm is applied to a graph structure composed of a series of nodes and edges composed of certain node pairs. The algorithm assigns colors to all nodes of the graph with a minimum number of color types, so that the colors of the two nodes connected by each edge are different. Therefore, there is no edge connection between the nodes assigned the same color, that is, there is no conflict relationship. A list is generated for the nodes colored by the same color, so that a series of lists of conflict-free blocks can be generated at this time, each list includes one or more conflict-free pixel blocks, and several blocks in each list are respectively applied to the full-size image of the projector: in the full-size image of the projector, the pixels of the corresponding areas of several blocks in each list are turned on, and the pixels of other areas are turned off, so as to obtain the graph corresponding to each list, which is used as the image to be projected, and the series of images to be projected obtained by the above operation are projected onto the workpiece to be measured, and the left camera and / or the right camera synchronously obtain the image of the workpiece to be measured, and then enter the next loop iteration until the preset conditions are met. It can be understood that a projection image can be generated according to a list.

[0033] The above steps are described below with a specific example.

[0034] First iteration: The initial image to be projected and the initial target pixel block of the kth pixel of the left camera and / or the right camera are all full-size pure color images of the projector. The initial B k Only full-size pixel blocks of the projector are included, e.g. Figure 3 As shown in Level 1, the full-size pure color image (frame 1) of the projector is a full-size pure color image in which all pixels of the projector are lit, which is projected onto the workpiece to be measured, and the left camera and / or the right camera are used to synchronously capture the image of the workpiece to be measured;

[0035] The image of the workpiece to be tested is analyzed by the image analysis process shown in step S2: C is cleared. Since the initial target pixel blocks of the k-th pixel point of the left camera and / or the right camera are all full-size pure color images of the projector, they are evenly divided. For example, dividing them into 4 sub-pixel blocks, for the k-th pixel point of the left camera and / or the right camera, B is cleared. k , add the 4 sub-pixel blocks to B k , add B without duplication kThe sub-pixel block pair composed of any two sub-pixel blocks in the four sub-pixel blocks in B is divided into C. Since the entire projector full-size image is used as the target pixel block of the k-th pixel before division, that is, it is assumed that there is an area in the full-size projector image that lights up the camera pixels, it is assumed that there are conflicts between the sub-pixel blocks obtained after the division, that is, they cannot be projected simultaneously in one frame of the projector image, so the sub-pixel pair composed of any two sub-pixel blocks is called a conflicting block pair; assuming that the size of each pixel block in B is not less than the threshold at this time, the graph coloring algorithm shown in step S3 is executed:

[0036] With the pixel blocks in B as nodes and the pixel block pairs in C as edges, a graph structure is constructed and solved using a graph coloring algorithm to obtain four first lists, which are numbered 2, 3, 4, and 5 as shown. Each first list includes a sub-pixel block, such as Figure 3 As shown in Level2, sub-pixel blocks 2, 3, 4, and 5 are respectively in the first lists 2, 3, 4, and 5, so the sub-pixel blocks included in the first lists 2, 3, 4, and 5 are respectively applied to the full-size image of the projector according to the numbers, and the images corresponding to the first lists are obtained and used as the images to be projected (taking sub-pixel block 2 in list 2 as an example, in the full-size image of the projector, the pixels in the area corresponding to sub-pixel block 2 in list 2 are turned on, and the pixels in other areas are turned off, and the obtained image is used as the image to be projected corresponding to sub-pixel block 2 in list 2), and the loop iteration is continued;

[0037] The projector projects the image to be projected onto the surface of the workpiece to be tested (frames 2-5), the left camera and / or the right camera collect the image of the workpiece to be tested, the pixel block pair set C is cleared, and the 4 images acquired by the above-mentioned camera are analyzed using the above-mentioned image analysis process. For the k-th pixel point, assuming that the projection image generated according to List 2 and the projection image generated according to List 4 are respectively projected onto the workpiece to be tested, and are both in the light state in the image collected by the camera, then List 2 and List 4 are respectively compared with B. k Find the intersection and get two pixel blocks marked with ×, such as Figure 3 As shown in Level 3, it is the target pixel block of the k-th pixel point, that is, there is a conflict between the two, clear B k , using the aforementioned image analysis method to divide it into 4 sub-blocks and add them to B k In the example, add B without duplication. k The sub-pixel blocks in the total set of sub-pixel blocks B are converted into k The pixel block pairs consisting of any two sub-blocks in are added to the total set of pixel block pairs C without duplication. Assuming that the sizes of the pixel blocks in B are not all less than the threshold, the list 6-13 is obtained according to the aforementioned graph coloring algorithm, and a series of images to be projected (frames 6-13) are generated according to the list 6-13. Among them, the list 6 includes 3 pixel blocks, such as Figure 3 The pixel block with sequence number 6 in Level 3, List 7 includes 3 pixel blocks, such as Figure 3 The pixel block with sequence number 7 in Level3 is similar to List 8-13.

[0038] According to List 6-13, 8 images to be projected (frames 6-13) are generated and projected onto the workpiece to be measured. Figure 3 The blocks with the same number as shown in Level3 will be projected in the same image. Clear the pixel block pair set C and use the above image analysis method to analyze the 8 images captured by the camera. For the kth pixel point, assume that the projection image generated in List 6 and the projection image generated in List 12 are projected onto the workpiece to be tested, and both are lit in the image captured by the camera. k Find the intersection and get the two pixel blocks marked with ×, which is the target pixel block of the k-th pixel point. That is, there is a conflict between the two, clear B k , using the aforementioned image analysis method to divide it into 4 sub-blocks and add them to B k .

[0039] Similarly, it can be determined that there is a conflict between the pixel block marked with # in List 8 and the pixel block marked with # in List 10. The aforementioned image analysis method is used to subdivide them into 4 sub-blocks and add them to B. k At the same time, assuming that the block 9 in the lower left corner does not light up any camera pixel, that is, it is not a target pixel block for any camera pixel, it will be eliminated, and a series of images to be projected are obtained using the aforementioned image analysis method, such as Figure 3 The blocks with the same number as shown in Level 4 are projected in the same image and captured synchronously by a camera to obtain the image.

[0040] The aforementioned process is iterated until the iteration termination threshold condition is reached to obtain reflection identification data, namely, the final output B and C.

[0041] In order to improve the calculation speed, preferably, in step S2, each target pixel block is evenly divided into a plurality of sub-pixel blocks using the same division method.

[0042] In order to improve the ability to resist interference from ambient light, preferably, the full-size pure color image is a full-size blue light image.

[0043] S4, using the pixel blocks in B output by S3 as nodes and the pixel block pairs in C output by S3 as edges, constructing a graph structure and applying a graph coloring algorithm to solve it to obtain multiple second lists, turning on the pixel points of the corresponding areas of all the pixel blocks in each of the second lists in the full-size structured light image of the projector, and turning off the other pixel points, to obtain the images corresponding to each of the second lists, and using them as images to be projected to project onto the surface of the workpiece to be measured, and obtaining the images of the workpiece to be measured simultaneously acquired by the left and right cameras, calculating the phase map and matching it, reconstructing the three-dimensional point cloud of the workpiece to be measured, and fusing all the reconstructed three-dimensional point clouds to obtain the overall three-dimensional point cloud of the workpiece to be measured.

[0044] Specifically, according to the reflection identification data, the graph coloring algorithm is applied again to obtain multiple second lists, that is, multiple conflict-free partitions are obtained according to the second lists.

[0045] That is, after the S1 process loop iteration meets the iteration termination threshold condition, the graph structure is constructed based on the reflection identification data using B and C at the time of iteration termination, and the graph coloring algorithm is run to perform regional clustering on the projection area to generate conflict-free partitioned areas.

[0046] Then, according to the partitioned area data, the partitioned area mask is applied to the structured light image to generate the partitioned structured light image.

[0047] like Figure 4 As shown, according to the partition area data, a partition area mask M (x, y) is obtained, and it is applied to the sinusoidal grating stripe structured light image. On the top, we get the partitioned structured light image have:

[0048]

[0049] Finally, according to the partitioned structured light image data, the structured light images of each partition are projected onto the workpiece to be measured, the left and right cameras synchronously capture the image of the workpiece to be measured, reconstruct the point cloud, and finally fuse the reconstructed point clouds of each partition to obtain the overall three-dimensional point cloud.

[0050] Among them, firstly, the partition structured light images are projected separately The camera is used to acquire images synchronously, and the images acquired by the camera are phase-decomposed according to the multi-frequency heterodyne principle. The absolute phase image of the left camera and the absolute phase image of the right camera are subjected to distortion correction and epipolar line correction according to pre-calibrated camera internal and external parameters, that is, pre-calibrated camera parameters. The corresponding points on the absolute phase image of the left camera and the absolute phase image of the right camera of the measured object are found to achieve phase point matching. The three-dimensional point cloud is reconstructed by partitioning according to the triangulation principle. Finally, the three-dimensional point clouds reconstructed in each partition are simply fused to obtain the overall three-dimensional point cloud.

[0051] That is, based on the partitioned structured light image, the relative phase map of the left and right cameras at each frequency and the modulation map of the left and right cameras at any frequency are respectively obtained; the relative phase map at each frequency is used to dephase the relative phase map at any frequency to obtain the absolute phase map; and the phase point matching is performed on the acquired absolute phase map to reconstruct the three-dimensional point cloud, and the point clouds reconstructed in each partition are fused to obtain the overall point cloud.

[0052] The above step S4 dephases the relative phase image based on the multi-frequency heterodyne principle to obtain the absolute phase image. The phase unwrapping process mainly relies on the main phase values ​​of the grating images of different frequencies. The calculation process is more stable, and the grating images of any frequency can be phase unwrapped. At the subsequent three-dimensional reconstruction moment, three continuous phase values ​​are used for calculation at the same time, thereby improving the accuracy of stereoscopic reconstruction.

[0053] The method provided by the present invention establishes an inter-reflection surface light path model to analyze the inter-reflection on the workpiece surface, which causes multiple light beams projected by the projector pixel to be captured by the same pixel of the camera, thereby causing sinusoidal structure grating phase interference or even phase resolution failure. Based on this, the present invention adopts an adaptive partition projection method to avoid the simultaneous projection of the above-mentioned multiple interfering light rays, thereby avoiding interference from the source. Compared with many traditional methods based on error correction, this method solves the problem from the root and is more effective and thorough.

[0054] The connection method used in the traditional 3D measurement system is as follows: the computer is connected to the projector through a USB interface, and the projector is directly connected to the left and right cameras through a USB interface or a network port respectively; the structured light image to be projected is pre-stored in the projector, and the projection command issued by the computer is transmitted to the projector via USB. After receiving the projection command, the projector projects the structured light image stored therein onto the workpiece to be measured, and sends a projection completion signal to the left and right cameras to trigger the left and right cameras to capture the image of the workpiece to be measured.

[0055] The connection mode of the above hardware structure results in that the traditional 3D measurement system can only realize the traditional structured light 3D measurement, and cannot meet the application requirements of the surface structured light 3D measurement method based on adaptive partition projection provided by the present invention, which requires the projector and camera to have real-time interaction functions. Based on this, an embodiment of the present invention provides a surface structured light 3D measurement system based on adaptive partition projection, including: a projector, left and right cameras, and a computer, wherein the projector is arranged between the left and right cameras, and the optical axes of the left and right cameras are symmetrical with respect to the optical axis of the projector, and characterized in that the computer is used to execute the surface structured light 3D measurement method as described in any of the above embodiments;

[0056] The computer and the projector are connected via an HDMI interface of the computer and an HDMI interface of the projector, and the computer is also used to control the projector to project the image to be projected onto the workpiece to be measured;

[0057] The left and right cameras are connected to the computer respectively, and the computer is also used to send control signals to the left and right cameras after a preset delay after the projector projects the image to be projected onto the workpiece to be measured; wherein the preset delay is greater than the response time of the projector to the projection instruction;

[0058] The left and right cameras are used to collect images of the workpiece to be measured when receiving a control signal.

[0059] Specifically, the HDMI interface of the computer and the HDMI interface of the projector are connected through a data cable to realize HDMI protocol communication between the computer and the projector. Based on this connection method, the projector is controlled as an extended screen of the computer, and the computer controls the projector in the same way as controlling its own screen to project the structured light image to be projected onto the workpiece to be measured.

[0060] The left and right cameras are connected to the computer via a USB interface or a network port, respectively. Based on this connection mode, after the computer sends a projection command to the projector, it can send a control signal to the left and right cameras at the same time to trigger the left and right cameras to synchronously capture the image of the workpiece to be measured. In addition, considering that the projector has a certain response time to the projection command, and it also takes a certain amount of time to complete the projection of the projector, in order to avoid the phenomenon that the left and right cameras capture images before the projector completes the projection, causing the pixel grayscale values ​​in the camera-captured images to be unstable and inconsistent between multiple frames, thereby affecting the structured light three-dimensional reconstruction, the computer sends a projection command to the projector, and then sends a control signal to the left and right cameras after a preset delay; accordingly, the preset delay is greater than the response time of the projector to the projection command.

[0061] In order to eliminate the influence of the asynchronous projector refresh and camera exposure to ensure the consistency of camera pixel grayscale values ​​and meet the requirement of image grayscale consistency obtained by cameras in different projection frames in structured light three-dimensional measurement, preferably, the exposure time of the left and right cameras are both integer multiples of the projector refresh cycle.

[0062] In order to improve the ability to resist interference from ambient light, preferably, the camera is equipped with a blue light band pass filter adapted to the projector.

[0063] An embodiment of the present invention provides an electronic device, characterized by comprising: a computer-readable storage medium and a processor;

[0064] The computer-readable storage medium is used to store executable instructions;

[0065] The processor is used to read the executable instructions stored in the computer-readable storage medium and execute the method described in any of the above embodiments.

[0066] An embodiment of the present invention provides a computer-readable storage medium, characterized in that the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to execute the method described in any of the above embodiments.

[0067] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A surface structured light three-dimensional measurement method based on adaptive partition projection, characterized in that: include: S1, obtaining an image of the workpiece to be measured captured by a left camera and / or a right camera when a projector projects an image to be projected onto a surface of the workpiece to be measured; S2, clear the pixel block pair set C, determine the target pixel block of the kth pixel point of the left camera and / or the right camera according to the image of the workpiece to be measured, and clear the pixel block set B k , and use the same division method to divide each target pixel block into multiple sub-pixel blocks and add B k , add B without duplication k The sub-pixel blocks in the total set of sub-pixel blocks B are converted into k Any two sub-blocks in the pixel block pair are added to the total set of pixel block pairs C without duplication; k = 1, 2, ..., N, N is the total number of pixels of the left camera and / or the right camera; The target pixel block of the k-th pixel point is the pixel block in the first target list and B k The target first list is a list corresponding to the projection image that makes the gray value of the k-th pixel point higher than the gray value threshold among the multiple first lists obtained in the previous iteration; S3, determine whether the size of each pixel block in B is less than the threshold value, if so, output B and C and enter S4, otherwise, take the pixel blocks in B as nodes, take the pixel block pairs in C as edges, construct a graph structure and use the graph coloring algorithm to solve to obtain multiple first lists; turn on the pixel points of the corresponding areas of all pixel blocks in each of the first lists in the full-size pure color image of the projector, and turn off other pixel points to obtain the images corresponding to each of the first lists; take the images corresponding to each of the first lists as new images to be projected, and return to S1 for loop iteration; In the first iteration, the image to be projected is a full-size pure color image of the projector, B k Only one full-size pixel block of the projector is included, and the pixel blocks in the first list only include one full-size solid color image of the projector; S4, using the pixel blocks in B output by S3 as nodes and the pixel block pairs in C output by S3 as edges, constructing a graph structure and applying a graph coloring algorithm to solve it to obtain multiple second lists, turning on the pixel points of the corresponding areas of all the pixel blocks in each of the second lists in the full-size structured light image of the projector, and turning off the other pixel points, to obtain the images corresponding to each of the second lists, and using them as images to be projected to project onto the surface of the workpiece to be measured, and obtaining the images of the workpiece to be measured simultaneously acquired by the left and right cameras, calculating the phase map and matching it, reconstructing the three-dimensional point cloud of the workpiece to be measured, and fusing all the reconstructed three-dimensional point clouds to obtain the overall three-dimensional point cloud of the workpiece to be measured.

2. The method according to claim 1, characterized in that In step S2, each target pixel block is evenly divided into a plurality of sub-pixel blocks using the same division method.

3. The method according to claim 1 or 2, characterized in that The full-size solid color image is a full-size blue-ray image.

4. A surface structured light three-dimensional measurement system based on adaptive partition projection, comprising: A projector, a left camera, a right camera and a computer, wherein the projector is arranged between the left camera and the right camera, and the optical axes of the left camera and the right camera are symmetrical with respect to the optical axis of the projector, wherein the computer is used to execute the surface structured light three-dimensional measurement method according to any one of claims 1 to 3; The computer and the projector are connected via an HDMI interface of the computer and an HDMI interface of the projector, and the computer is also used to control the projector to project the image to be projected onto the workpiece to be measured; The left and right cameras are connected to the computer respectively, and the computer is also used to send control signals to the left and right cameras after a preset delay after the projector projects the image to be projected onto the workpiece to be measured; wherein the preset delay is greater than the response time of the projector to the projection instruction; The left and right cameras are used to collect images of the workpiece to be measured when receiving a control signal.

5. The system according to claim 4, characterized in that The exposure time of the left camera and the right camera are both integer multiples of the projector refresh cycle.

6. An electronic device, characterized in that: include: A computer readable storage medium and a processor; The computer-readable storage medium is used to store executable instructions; The processor is used to read the executable instructions stored in the computer-readable storage medium and execute the method according to any one of claims 1 to 3.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to execute the method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Regional Gamma precorrection phase error compensation method in large view field structured light vision measurement

    CN105403172A

  • Device and method for obtaining a 3D topography

    WO2009065675A1

Cited By

  • Method, apparatus and device for generating three-dimensional point cloud based on mutual reflection

    CN122966867A