Three-dimensional scanning method, three-dimensional scanning equipment and device based on multi-wavelength
By adopting multi-wavelength three-dimensional scanning method in laser scanners, color channel separation and stereo matching technology are used to solve the problem of low three-dimensional scanning accuracy caused by light source interference, and the stability and accuracy of three-dimensional point cloud data are improved.
Patent Information
- Application Number
- CN202411378914.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2044-09-30
AI Technical Summary
Light sources in existing laser scanners are prone to interfere with each other, resulting in low accuracy and stability of three-dimensional scanning data. Especially when increasing the number of laser lines, light will destroy the outline of the marking points, affecting the accuracy of three-dimensional reconstruction.
Using a multi-wavelength-based three-dimensional scanning method, the initial image of the target object under the irradiation of structured light sources and fill light sources through a binocular camera, color channel separation and stereo matching are performed, light sources of different wavelengths are used to reduce interference and improve parallax calculation. Accuracy and stability of three-dimensional point cloud data.
Through color channel separation and stereo matching, physical spectroscopy is achieved, interference between different wavelengths is reduced, accuracy and stability of three-dimensional point cloud data is improved, and accuracy losses caused by laser lines to contaminate mark points are reduced.
Smart Images

Figure CN118896564B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing, and in particular to a three-dimensional scanning method, three-dimensional scanning equipment and a device based on multiple wavelengths. Background Art
[0002] Laser scanners are commonly used in the prior art for three-dimensional scanning, which usually relies on sticking reflective marking points on the scanned object so that the device can identify the center position of the marking points through the projected fill light and use laser lines to perform three-dimensional reconstruction of the object surface.
[0003] The light sources used in existing laser scanners are prone to interfere with each other, especially when the number of laser lines is increased. The light will destroy the outline of the marking points, causing the accuracy of the three-dimensional scanning data to be easily affected and the accuracy stability to be low. Summary of the invention
[0004] The present invention provides a three-dimensional scanning method, a three-dimensional scanning device and a device based on multi-wavelength, which are used to solve the problem of low accuracy and stability of three-dimensional point cloud data obtained by three-dimensional scanning in the prior art.
[0005] In a first aspect, the present invention provides a three-dimensional scanning method based on multiple wavelengths, comprising: obtaining a first initial image and a second initial image, the first initial image and the second initial image are original images of a target object captured by a binocular camera under the illumination of a structured light source and a fill light source, and the wavelength of the fill light source is different from the wavelength of the structured light source. The first initial image and the second initial image are separated by color channels to obtain a first image corresponding to a first color channel of the first initial image and a second image corresponding to a second color channel, and a third image corresponding to the first color channel of the second initial image and a fourth image corresponding to the second color channel. The first color channel is a color channel corresponding to the wavelength of the structured light source, and the second color channel is a color channel corresponding to the wavelength of the fill light source. Stereo matching is performed on the first image and the third image to obtain first disparity information, and stereo matching is performed on the second image and the fourth image to obtain second disparity information. Based on the first disparity information and the second disparity information, the three-dimensional point cloud data of the target object is determined.
[0006] Optionally, determining the three-dimensional point cloud data of the target object based on the first disparity information and the second disparity information includes: correcting the first disparity information based on the disparity value of the marker point in the second disparity information, and determining the three-dimensional point cloud data of the target object based on the corrected first disparity information.
[0007] Optionally, the first disparity information is corrected based on the disparity value of the marker point in the second disparity information, including: comparing the disparity value of the marker point in the second disparity information with the disparity value of the marker point in the first disparity information, and determining disparity correction information of the first disparity information relative to the second disparity information based on the comparison result. The first disparity information is corrected based on the disparity correction information.
[0008] Optionally, determining the three-dimensional point cloud data of the target object based on the corrected first disparity information includes: determining the three-dimensional point cloud data of the target object based on the disparity values of the scanning points of the target object in the corrected first disparity information.
[0009] Optionally, the sensor in the binocular camera is a color image sensor.
[0010] In a second aspect, the present invention further provides a three-dimensional scanning device, comprising: a binocular camera, a structured light source, a fill light source and a processor, wherein the processor is used to execute any of the above-mentioned multi-wavelength-based three-dimensional scanning methods.
[0011] In a third aspect, the present invention also provides a three-dimensional scanning device based on multiple wavelengths, comprising: an acquisition module, used to acquire a first initial image and a second initial image, the first initial image and the second initial image are original images of the target object collected by a binocular camera under the illumination of a structured light source and a fill light source, and the wavelength of the fill light source is different from the wavelength of the structured light source. A processing module, used to separate the color channels of the first initial image and the second initial image, to obtain a first image corresponding to the first color channel of the first initial image and a second image corresponding to the second color channel, and a third image corresponding to the first color channel of the second initial image and a fourth image corresponding to the second color channel. The first color channel is the color channel corresponding to the wavelength of the structured light source, and the second color channel is the color channel corresponding to the wavelength of the fill light source. A stereo matching module, used to perform stereo matching on the first image and the third image to obtain first disparity information, and perform stereo matching on the second image and the fourth image to obtain second disparity information. A determination module, used to determine the three-dimensional point cloud data of the target object based on the first disparity information and the second disparity information.
[0012] In a fourth aspect, the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements any of the above-mentioned multi-wavelength-based three-dimensional scanning methods.
[0013] In a fifth aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-mentioned multi-wavelength-based three-dimensional scanning methods.
[0014] In a sixth aspect, the present invention further provides a processor-readable storage medium, wherein the processor-readable storage medium stores a program, and the program is used to enable the processor to execute any of the above-mentioned multi-wavelength-based three-dimensional scanning methods.
[0015] The three-dimensional scanning method, three-dimensional scanning equipment and device based on multiple wavelengths provided by the present invention obtain two initial images through a binocular camera, separate the color channels of the first initial image and the second initial image, and obtain a first image corresponding to the first color channel and a second image corresponding to the second color channel of the first initial image, and a third image corresponding to the first color channel and a fourth image corresponding to the second color channel of the second initial image. Stereo matching is performed on images of the same wavelength to obtain disparity information, and the three-dimensional point cloud data of the object is determined based on the disparity information. By separating the color channels of the initial images, physical spectrometry is achieved, and stereo matching is performed on images of the same wavelength, which reduces the interference between different wavelengths, improves the accuracy of disparity calculation and the stability of the accuracy of the three-dimensional point cloud data corresponding to the target object. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the present invention or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0017] Figure 1 It is a schematic flow chart of the multi-wavelength based three-dimensional scanning method provided by the present invention.
[0018] Figure 2 It is a schematic diagram of the first initial image provided by the present invention.
[0019] Figure 3 It is a schematic diagram of the arrangement of the Bayer color filter array in the related art.
[0020] Figure 4 This is a first image schematic diagram provided by the present invention.
[0021] Figure 5 It is a second image schematic diagram provided by the present invention.
[0022] Figure 6 It is a schematic structural diagram of a three-dimensional scanning device based on multiple wavelengths provided by the present invention.
[0023] Figure 7 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0024] In the present invention, the term "and / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.
[0025] In the present invention, the term "plurality" refers to two or more than two, and other quantifiers are similar to them.
[0026] In the present invention, the terms "first", "second", etc. are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present invention can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first" and "second" are generally of the same type, and the number of objects is not limited. For example, the first object can be one or more.
[0027] The following will be combined with the accompanying drawings in the present invention to clearly and completely describe the technical solutions in the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0028] Figure 1 FIG. 1 is a flow chart of a multi-wavelength three-dimensional scanning method provided by the present invention. Figure 1 As shown, the method includes the following steps S101-S104:
[0029] Step S101: Acquire a first initial image and a second initial image, where the first initial image and the second initial image are original images of a target object captured by a binocular camera under the illumination of a structured light source and a fill light source, and the wavelength of the fill light source is different from that of the structured light source.
[0030] It should be noted that the application scenario of the embodiment of the present invention is point scanning. Before scanning, it is necessary to stick marker points around or on the surface of the target object for spatial positioning and alignment. At the same time, the marker points provide a clear reference, so that the scanner can easily identify and track, reducing the number of repeated scans and the need for data processing.
[0031] As an optional embodiment, the structured light source can be a linear laser light source, that is, the three-dimensional scanning method of the present invention can be directly applied to the laser scanning scene. In the present invention, it is only necessary to ensure that the wavelengths of the structured light source and the fill light source are not equal. The present invention does not further limit the specific type of the structured light source, and it can be flexibly selected according to the requirements of scanning accuracy and the surface characteristics of the object.
[0032] It should be noted that the binocular camera contains two cameras for acquiring images of the target object from different perspectives. The laser array in the structured light source is used to project detailed laser lines onto the surface of the target object during the scanning process, and cooperate with the binocular camera to obtain the surface information of the target object. The fill light source is used to cooperate with the binocular camera to obtain the information of the landmark points on the surface of the object.
[0033] like Figure 2 , which is a schematic diagram of the first initial image provided by the present invention, wherein the dots in the figure are marking points attached to the surface of the object.
[0034] In an exemplary embodiment, the sensor in the binocular camera is a color image sensor.
[0035] As an optional embodiment, in order to better achieve the separation of light through the color image sensor, the difference between the wavelength of the fill light source and the wavelength of the structure light source should be as large as possible, and the light splitting effect will be better. For example, the wavelength of the fill light source is 625nm, and the wavelength of the structure light source can be 460nm. Since each pixel of the color image sensor can only perceive light within the wavelength range allowed by the corresponding color filter. In the actual selection process, the selection of the light source wavelength needs to consider the perception ability of the color image sensor, and the difference can be as large as possible within the wavelength range allowed by the corresponding color filter.
[0036] It should be noted that color image sensors usually use a Bayer color filter array, such as Figure 3 The figure shows the arrangement of the Bayer color filter array in the related art. The common color sensor array is arranged in a 2×2 grid. Each pixel is covered with a color filter (red, green or blue), which allows light of a specific wavelength to pass through and be recorded by the sensor, where two pixels are used to detect green light (wavelength is about 495-570nm), one is used to detect red light (wavelength is about 620-750nm), and the other is used to detect blue light (wavelength is about 450-495nm).
[0037] As an optional embodiment, in order to further improve the imaging effect, a double-pass filter can be arranged in front of the lens to filter out ambient light.
[0038] As an optional embodiment, in order to improve the imaging effect, a beam splitter prism can also be set on the optical path of the structured light source and the light path of the fill light source to filter out the ambient light. The beam splitter prism can separate light of different wavelengths. In the embodiment of the present invention, the structured light source and the fill light use visible light of different wavelengths. Through the beam splitter prism, the system can split these different wavelengths of light to the corresponding sensors, or filter out unnecessary wavelengths. This can effectively filter out ambient light (such as natural light or other unnecessary light sources), thereby improving the measurement accuracy and anti-interference ability of the system. At the same time, the beam splitter prism will not affect the illumination effect of the structured light source and the fill light source on the target object, ensuring high-quality image acquisition within the visible light range.
[0039] In this embodiment, two light sources with large wavelength differences are used to illuminate the target object. The light emitted by different light sources occupies different color channels in the image, reducing the interference between light sources, making the characteristics of each light source clearer and more separated in the image, and helping to improve the quality of the overall image. In subsequent processing, different light source characteristics can be accurately separated and identified, especially in scenarios where multiple laser lines are used for three-dimensional scanning, further reducing the accuracy loss caused by laser line contamination of marker points, and improving the scanning accuracy and the accuracy stability of the scanned data.
[0040] Step S102: Separate the color channels of the first initial image and the second initial image to obtain a first image corresponding to the first color channel and a second image corresponding to the second color channel of the first initial image, and a third image corresponding to the first color channel and a fourth image corresponding to the second color channel of the second initial image. The first color channel is the color channel corresponding to the wavelength of the structured light source, and the second color channel is the color channel corresponding to the wavelength of the fill light source.
[0041] It should be noted that when the color channels of the initial image are separated, different color channels can be extracted to obtain an image of the corresponding wavelength, so the image of each channel has a resolution of 1 / 4 of the original image.
[0042] As an optional embodiment, taking the wavelength of the structured light source as 460nm and the wavelength of the fill light source as 625nm as an example, the color channel corresponding to the structured light source is the blue channel (i.e., the first color channel mentioned above), and the color channel corresponding to the fill light source is the red channel (i.e., the second color channel mentioned above). Combining the principle of the color image sensor, it can be known that the first image and the third image are images obtained by extracting the blue channel, i.e., the surface information images of the object, and the second image and the fourth image are images obtained by extracting the red channel, i.e., the images of the mark point information on the surface of the object.
[0043] As an optional embodiment, Figure 4 is a first image schematic diagram provided by the present invention, Figure 5 is a schematic diagram of a second image provided by the present invention. Since the structured light source is blue, Figure 4 The surface image of the target object is obtained by separating the blue channel of the first initial image. The fill light source is red, that is, Figure 5 The image of the marker information obtained by separating the red channel of the first initial image. The processing flow of the binocular camera is the same, and only the processing flow of one camera is described here.
[0044] In this embodiment, the separation of color channels can highlight different image features, and the image information of each channel is more concentrated, which helps to simplify the subsequent processing flow.
[0045] Step S103: stereo matching is performed on the first image and the third image to obtain first disparity information, and stereo matching is performed on the second image and the fourth image to obtain second disparity information.
[0046] It should be noted that since the first image and the third image are the surface information images of the object corresponding to the images collected by the two cameras, stereo matching is required to eliminate binocular parallax and obtain a more accurate surface information image of the object. Stereo matching relies on the basic principle of binocular stereo vision. Suppose there are two cameras (corresponding to the two lenses of the binocular camera), which are located on the same parallel plane and a certain distance apart. When the cameras shoot the same scene, the objects in the scene will be displaced in the two images due to the different camera positions. This displacement is called parallax. The size of the parallax is related to the distance from the object to the camera: the closer the object is, the larger the parallax is, and the farther the object is, the smaller the parallax is.
[0047] As an optional embodiment, in the stereo matching process, it is first necessary to extract feature points or feature areas in the first image and the third image. These features are usually obvious features in the image, such as edges, corners, texture areas, etc. The feature extraction method can be scale-invariant feature transformation, fast feature point and corner point detection, etc. After the feature points are extracted, feature matching can be performed. The corresponding points can be determined by comparing the similarity of image blocks through methods such as the sum of squared differences (Sum of Squared Differences, referred to as SSD), normalized cross-correlation (Normalized Cross-Correlation, referred to as NCC), etc. After completing the feature matching, the disparity is calculated to obtain the first disparity information. Correspondingly, the second image and the fourth image can also be stereo matched through the above process, which will not be repeated here.
[0048] Step S104: Determine the three-dimensional point cloud data of the target object based on the first disparity information and the second disparity information.
[0049] In an exemplary embodiment, the above step S104 can be implemented by the following steps S11-12.
[0050] Step S11: correcting the first disparity information based on the disparity value of the marker point in the second disparity information.
[0051] Step S12: determining the three-dimensional point cloud data of the target object based on the corrected first disparity information.
[0052] As an optional embodiment, the disparity values of all the marker points are extracted from the second disparity information. Since these marker points are captured under the fill light source, the marker points are highly reflective, so the disparity value accuracy is relatively high. In the image corresponding to the first disparity information, find the feature points corresponding to the positions of the marker points in the second disparity information. Compare the disparity values of the feature points in the first disparity information with the disparity values of the marker points in the second disparity information, and calculate the difference between the two. Use the calculated disparity correction value to correct the first disparity information.
[0053] It should be noted that since there are markers on the surface of the target object, the purpose of the markers is to assist in positioning. Therefore, in the correction process, the parallax value of the marker in the second parallax information needs to be used to correct the first parallax information. The processing flow of the binocular camera is similar and will not be repeated here.
[0054] In an exemplary embodiment, the above step S11 can be implemented by the following steps S111-S112.
[0055] Step S111: comparing the disparity value of the mark point in the second disparity information with the disparity value of the mark point in the first disparity information, and determining the disparity correction information of the first disparity information relative to the second disparity information based on the comparison result.
[0056] Step S112: correcting the first disparity information based on the disparity correction information.
[0057] As an optional embodiment, the disparity values of all the marker points are extracted in the second disparity information. The disparity values corresponding to these marker points are found in the first disparity information. By comparing these disparity values, the disparity correction information of each marker point in the two disparity information can be calculated.
[0058] As an optional embodiment, when the first disparity information is corrected based on the disparity correction information, if the correction values of all the mark points are close to a uniform value, it can be considered that there is an overall deviation in the first disparity information. In this case, the disparity value of the entire first disparity information can be directly corrected uniformly. The correction information can also be weighted. For example, according to the reflection intensity of the mark point or the matching degree between the mark point and the surrounding surface information, the correction value is adjusted to different degrees to avoid over-correction or under-correction.
[0059] As an optional embodiment, when the first disparity information is corrected based on the disparity correction information, an interpolation algorithm may be used to smoothly transition the disparity correction value, thereby ensuring continuity between the corrected marker points and avoiding sudden changes or unnatural transitions.
[0060] As an optional embodiment, correcting the first disparity information by disparity correction information can reduce errors in the first disparity information that may be caused by noise or illumination changes. At the same time, for highly reflective objects or objects with uneven surfaces, more accurate first disparity information can be obtained, thereby improving the accuracy of subsequent determination of the object's three-dimensional point cloud data.
[0061] In an exemplary embodiment, determining the three-dimensional point cloud data of the target object based on the corrected first disparity information can be achieved through the following step S21.
[0062] Step S21: determining three-dimensional point cloud data of the target object based on the parallax values of the scanning points of the target object in the corrected first parallax information.
[0063] As an optional embodiment, the parallax value in the corrected first parallax information is converted into depth information using the set parameters of the binocular camera. The coordinates of each scanning point in the three-dimensional space are calculated based on the depth information and the pixel coordinates of the scanning points of the target object in the first parallax information, and the three-dimensional coordinates of all scanning points are combined together to form three-dimensional point cloud data of the target object, each point cloud corresponding to a specific physical point on the surface of the target object, reflecting the position of the target object in the three-dimensional space.
[0064] In the above steps S101 to S104, two initial images are acquired through a binocular camera, and the acquired first initial image and second initial image are separated by color channels to obtain a first image corresponding to the first color channel and a second image corresponding to the second color channel of the first initial image, and a third image corresponding to the first color channel and a fourth image corresponding to the second color channel of the second initial image. Stereo matching is performed on images of the same wavelength to obtain disparity information, and the three-dimensional point cloud data of the object is determined based on the disparity information. By separating the color channels of the initial images, physical spectroscopy is achieved, reducing the loss of accuracy caused by the contamination of the laser line to the marker points, further improving the scanning accuracy and the accuracy stability of the scanning data, and stereo matching is performed on images of the same wavelength to reduce the interference between different wavelengths, improve the accuracy of the disparity calculation and the stability of the accuracy of the three-dimensional point cloud data corresponding to the target object.
[0065] The executor of each step in the method can be a three-dimensional scanning device based on multiple wavelengths, which can be implemented through software and / or hardware. The device can be integrated into an electronic device, which can be a terminal device (such as a smart phone, a personal computer, etc.), a server (such as a local server or a cloud server, or a server cluster, etc.), a processor, or a chip, etc.
[0066] The present invention also provides a three-dimensional scanning device, comprising: a binocular camera, a structured light source, a fill light source and a processor.
[0067] The processor can execute the multi-wavelength based three-dimensional scanning method provided by the above methods, the method comprising:
[0068] A first initial image and a second initial image are acquired, wherein the first initial image and the second initial image are original images of the target object captured by the binocular camera under the illumination of a structured light source and a fill light source, and the wavelength of the fill light source is different from that of the structured light source.
[0069] The first initial image and the second initial image are separated by color channels to obtain a first image corresponding to the first color channel and a second image corresponding to the second color channel of the first initial image, and a third image corresponding to the first color channel and a fourth image corresponding to the second color channel of the second initial image. The first color channel is a color channel corresponding to the wavelength of the structured light source, and the second color channel is a color channel corresponding to the wavelength of the fill light source.
[0070] Stereo matching is performed on the first image and the third image to obtain first disparity information, and stereo matching is performed on the second image and the fourth image to obtain second disparity information.
[0071] Based on the first disparity information and the second disparity information, three-dimensional point cloud data of the target object is determined.
[0072] It should be noted that the binocular camera in the 3D scanning device is used to obtain the first initial image and the second initial image of the target object, the structured light source is used to emit laser, and the fill light source is used to provide light with a wavelength that is not equal to that of the structured light source. It should be further noted that in order to improve the efficiency of 3D reconstruction, the structured light source and the fill light source need to emit light to illuminate the target object at the same time.
[0073] The following is a description of the three-dimensional scanning device based on multiple wavelengths provided by the present invention. The three-dimensional scanning device based on multiple wavelengths described below and the three-dimensional scanning method based on multiple wavelengths described above can be referred to in correspondence with each other.
[0074] Figure 6 Schematic diagram of the structure of the multi-wavelength three-dimensional scanning device provided by the present invention. Figure 6 As shown, the device comprises:
[0075] The acquisition module 610 is used to acquire a first initial image and a second initial image. The first initial image and the second initial image are original images of the target object captured by the binocular camera under the illumination of a structured light source and a fill light source. The wavelength of the fill light source is different from that of the structured light source.
[0076] The processing module 620 is used to separate the color channels of the first initial image and the second initial image to obtain a first image corresponding to the first color channel and a second image corresponding to the second color channel of the first initial image, and a third image corresponding to the first color channel and a fourth image corresponding to the second color channel of the second initial image. The first color channel is a color channel corresponding to the wavelength of the structured light source, and the second color channel is a color channel corresponding to the wavelength of the fill light source.
[0077] The stereo matching module 630 is used to perform stereo matching on the first image and the third image to obtain first disparity information, and to perform stereo matching on the second image and the fourth image to obtain second disparity information.
[0078] The determination module 640 is used to determine the three-dimensional point cloud data of the target object based on the first disparity information and the second disparity information.
[0079] The above-mentioned multi-wavelength-based three-dimensional scanning device acquires two initial images through a binocular camera, separates the acquired first initial image and the second initial image by color channel, and obtains a first image corresponding to the first color channel and a second image corresponding to the second color channel of the first initial image, and a third image corresponding to the first color channel and a fourth image corresponding to the second color channel of the second initial image. Stereo matching is performed on images of the same wavelength to obtain disparity information, and the three-dimensional point cloud data of the object is determined based on the disparity information. By separating the color channels of the initial images, physical spectrometry is achieved, and stereo matching is performed on images of the same wavelength, which reduces the interference between different wavelengths, improves the accuracy of disparity calculation and the stability of the accuracy of the three-dimensional point cloud data corresponding to the target object.
[0080] Optionally, the determination module 640 is further configured to correct the first disparity information based on the disparity value of the marker point in the second disparity information, and determine the three-dimensional point cloud data of the target object based on the corrected first disparity information.
[0081] Optionally, the determination module 640 is further configured to compare the disparity value of the marker point in the second disparity information with the disparity value of the marker point in the first disparity information, determine disparity correction information of the first disparity information relative to the second disparity information based on the comparison result, and correct the first disparity information based on the disparity correction information.
[0082] Optionally, the determination module 640 is further configured to determine the three-dimensional point cloud data of the target object based on the disparity values of the scanning points of the target object in the corrected first disparity information.
[0083] Optionally, the sensor in the binocular camera is a color image sensor.
[0084] Figure 7 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 7 As shown, the electronic device may include: a processor 710, a communications interface 720, a memory 730 and a communication bus 740, wherein the processor 710, the communications interface 720 and the memory 730 communicate with each other through the communication bus 740. The processor 710 may call the logic instructions in the memory 730 to execute a three-dimensional scanning method based on multiple wavelengths, the method comprising:
[0085] A first initial image and a second initial image are acquired, wherein the first initial image and the second initial image are original images of the target object captured by the binocular camera under the illumination of a structured light source and a fill light source, and the wavelength of the fill light source is different from that of the structured light source.
[0086] The first initial image and the second initial image are separated by color channels to obtain a first image corresponding to the first color channel and a second image corresponding to the second color channel of the first initial image, and a third image corresponding to the first color channel and a fourth image corresponding to the second color channel of the second initial image. The first color channel is a color channel corresponding to the wavelength of the structured light source, and the second color channel is a color channel corresponding to the wavelength of the fill light source.
[0087] Stereo matching is performed on the first image and the third image to obtain first disparity information, and stereo matching is performed on the second image and the fourth image to obtain second disparity information.
[0088] Based on the first disparity information and the second disparity information, three-dimensional point cloud data of the target object is determined.
[0089] In addition, the logic instructions in the above-mentioned memory 730 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0090] On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program, the computer program can be stored in a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the multi-wavelength based three-dimensional scanning method provided by the above methods, the method includes:
[0091] A first initial image and a second initial image are acquired, wherein the first initial image and the second initial image are original images of the target object captured by the binocular camera under the illumination of a structured light source and a fill light source, and the wavelength of the fill light source is different from that of the structured light source.
[0092] The first initial image and the second initial image are separated by color channels to obtain a first image corresponding to the first color channel and a second image corresponding to the second color channel of the first initial image, and a third image corresponding to the first color channel and a fourth image corresponding to the second color channel of the second initial image. The first color channel is a color channel corresponding to the wavelength of the structured light source, and the second color channel is a color channel corresponding to the wavelength of the fill light source.
[0093] Stereo matching is performed on the first image and the third image to obtain first disparity information, and stereo matching is performed on the second image and the fourth image to obtain second disparity information.
[0094] Based on the first disparity information and the second disparity information, three-dimensional point cloud data of the target object is determined.
[0095] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to execute the multi-wavelength based three-dimensional scanning method provided by the above methods, the method comprising:
[0096] A first initial image and a second initial image are acquired, wherein the first initial image and the second initial image are original images of the target object captured by the binocular camera under the illumination of a structured light source and a fill light source, and the wavelength of the fill light source is different from that of the structured light source.
[0097] The first initial image and the second initial image are separated by color channels to obtain a first image corresponding to the first color channel and a second image corresponding to the second color channel of the first initial image, and a third image corresponding to the first color channel and a fourth image corresponding to the second color channel of the second initial image. The first color channel is a color channel corresponding to the wavelength of the structured light source, and the second color channel is a color channel corresponding to the wavelength of the fill light source.
[0098] Stereo matching is performed on the first image and the third image to obtain first disparity information, and stereo matching is performed on the second image and the fourth image to obtain second disparity information.
[0099] Based on the first disparity information and the second disparity information, three-dimensional point cloud data of the target object is determined.
[0100] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, i.e., they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.
[0101] Through the description of the above implementation modes, those skilled in the art can clearly understand that each implementation mode can be implemented by means of software plus a necessary general hardware platform, or of course by hardware. Based on such an understanding, the above technical solution can essentially or in other words be embodied in the form of a software product that contributes to the prior art. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or some parts of the embodiment.
[0102] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them. Although the present invention has been described in detail with reference to the above embodiments, a person skilled in the art should understand that the technical solutions described in the above embodiments can still be modified, or some of the technical features can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A three-dimensional scanning method based on multi-wavelength, characterized in that: include: Acquire a first initial image and a second initial image, wherein the first initial image and the second initial image are original images of the target object captured by a binocular camera under the illumination of a structured light source and a fill light light source, and the wavelength of the fill light light source is different from the wavelength of the structured light source; Separating the color channels of the first initial image and the second initial image to obtain a first image corresponding to a first color channel and a second image corresponding to a second color channel of the first initial image, and a third image corresponding to the first color channel and a fourth image corresponding to the second color channel of the second initial image; the first color channel is a color channel corresponding to the wavelength of the structured light source, and the second color channel is a color channel corresponding to the wavelength of the fill light light source; Performing stereo matching on the first image and the third image to obtain first disparity information, and performing stereo matching on the second image and the fourth image to obtain second disparity information; Based on the first disparity information and the second disparity information, three-dimensional point cloud data of the target object is determined.
2. The multi-wavelength based three-dimensional scanning method according to claim 1, characterized in that: The determining of the three-dimensional point cloud data of the target object based on the first disparity information and the second disparity information includes: Correcting the first disparity information based on the disparity value of the marker point in the second disparity information; The three-dimensional point cloud data of the target object is determined based on the corrected first disparity information.
3. The multi-wavelength based three-dimensional scanning method according to claim 2, characterized in that: The correcting the first disparity information based on the disparity value of the marker point in the second disparity information includes: comparing the disparity value of the mark point in the second disparity information with the disparity value of the mark point in the first disparity information, and determining disparity correction information of the first disparity information relative to the second disparity information based on the comparison result; The first parallax information is corrected based on the parallax correction information.
4. The multi-wavelength based three-dimensional scanning method according to claim 2 or 3, characterized in that: The determining the three-dimensional point cloud data of the target object based on the corrected first disparity information includes: Based on the corrected disparity values of the scanning points of the target object in the first disparity information, three-dimensional point cloud data of the target object is determined.
5. The multi-wavelength based three-dimensional scanning method according to claim 1, characterized in that: The sensor in the binocular camera is a color image sensor.
6. A three-dimensional scanning device, characterized in that: include: A binocular camera, a structured light source, a fill light source and a processor, wherein the processor is used to execute the multi-wavelength based three-dimensional scanning method according to any one of claims 1 to 5.
7. A three-dimensional scanning device based on multiple wavelengths, characterized in that: include: an acquisition module, used to acquire a first initial image and a second initial image, wherein the first initial image and the second initial image are original images of the target object captured by a binocular camera under the illumination of a structured light source and a fill light light source, and the wavelength of the fill light light source is different from that of the structured light source; a processing module, configured to separate the color channels of the first initial image and the second initial image to obtain a first image corresponding to a first color channel and a second image corresponding to a second color channel of the first initial image, and a third image corresponding to the first color channel and a fourth image corresponding to the second color channel of the second initial image; the first color channel is a color channel corresponding to the wavelength of the structured light source, and the second color channel is a color channel corresponding to the wavelength of the fill light light source; A stereo matching module, configured to perform stereo matching on the first image and the third image to obtain first disparity information, and perform stereo matching on the second image and the fourth image to obtain second disparity information; A determination module is used to determine the three-dimensional point cloud data of the target object based on the first disparity information and the second disparity information.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the multi-wavelength based three-dimensional scanning method as described in any one of claims 1 to 5 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the multi-wavelength based three-dimensional scanning method as claimed in any one of claims 1 to 5 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the multi-wavelength based three-dimensional scanning method as claimed in any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Novel single-camera three-dimensional digital image correlation system using light combining prism
CN110530286A
Three-dimensional scanning device and three-dimensional scanning system
CN118317029A
