CN113160393A - High-precision three-dimensional reconstruction method and device based on large field depth and related components thereof - Google Patents

High-precision three-dimensional reconstruction method and device based on large field depth and related components thereof Download PDF

Info

Publication number
CN113160393A
CN113160393A CN202110529545.1A CN202110529545A CN113160393A CN 113160393 A CN113160393 A CN 113160393A CN 202110529545 A CN202110529545 A CN 202110529545A CN 113160393 A CN113160393 A CN 113160393A
Authority
CN
China
Prior art keywords
dimensional
imaging device
absolute phase
target
large depth
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110529545.1A
Other languages
Chinese (zh)
Other versions
CN113160393B (en
Inventor
刘晓利
郑振桐
杨洋
王猛
张小杰
李显业
汤其剑
彭翔
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen University
Original Assignee
Shenzhen University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen University filed Critical Shenzhen University
Priority to CN202110529545.1A priority Critical patent/CN113160393B/en
Publication of CN113160393A publication Critical patent/CN113160393A/en
Application granted granted Critical
Publication of CN113160393B publication Critical patent/CN113160393B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
    • G06T7/85Stereo camera calibration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • G06T2207/10012Stereo images
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A90/00Technologies having an indirect contribution to adaptation to climate change
    • Y02A90/30Assessment of water resources

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Graphics (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

The invention discloses a high-precision three-dimensional reconstruction method and device based on large depth of field and related components thereof. The method comprises the following steps: carrying out region division on a large depth-of-field measurement scene; performing binocular vision three-dimensional calibration on each divided area by using a three-dimensional measurement system to obtain calibration data; calculating an absolute phase distribution map and three-dimensional information of the flat panel at different positions; establishing a three-dimensional mapping coefficient table of a corresponding area; acquiring a target image of a measured object and calculating an absolute phase distribution map; and acquiring the absolute phase of each pixel point in the absolute phase distribution map of the target image, searching a three-dimensional mapping coefficient in a three-dimensional mapping coefficient table of a corresponding region, and calculating the spatial three-dimensional point coordinate by using the three-dimensional mapping coefficient. According to the invention, the large depth-of-field scene is divided into a plurality of regions for calculation, so that the whole calculation process is more rigorous and accurate, and the space three-dimensional point coordinates of the measured object are acquired more quickly and accurately after the three-dimensional mapping coefficient table is established.

Description

基于大景深的高精度三维重建方法、装置及其相关组件High-precision 3D reconstruction method, device and related components based on large depth of field

技术领域technical field

本发明涉及三维成像技术领域,尤其涉及一种基于大景深的高精度三维重建方法、装置及其相关组件。The invention relates to the technical field of three-dimensional imaging, and in particular, to a high-precision three-dimensional reconstruction method and device based on a large depth of field, and related components thereof.

背景技术Background technique

现有技术的条纹投影三维测量属于结构照明法的一种,具有高速、高精度、低成本、易操作等优点,在工业测量、智能制造、文物保护等领域获得广泛应用。条纹投影三维测量技术的原理是将标准的正弦条纹图案投影于被测物体,物体的高度对投影条纹进行调制,相机采集到调制变形条纹图,后通过条纹相位解调和系统标定技术,结合相位-高度映射原理,重建物体三维信息。The fringe projection 3D measurement in the prior art is a kind of structured illumination method, which has the advantages of high speed, high precision, low cost, easy operation, etc. The principle of fringe projection 3D measurement technology is to project a standard sinusoidal fringe pattern on the measured object, the height of the object modulates the projected fringes, the camera collects the modulated deformation fringe pattern, and then uses the fringe phase demodulation and system calibration technology, combined with phase -The principle of height mapping, reconstructing the three-dimensional information of the object.

通常情况,条纹投影采用基于光学成像原理的数字微镜阵列(DMD)产生条纹图案,固定焦距的光学投影镜头具有有限的景深范围。特别是为提高图像亮度,商用投影机均采用了大光圈设计,导致景深范围更小。在某些大测量场景中,被测物体的体积较大或是多个物体组成的大跨度空间范围,该投影系统无法满足需求。而MEMS(微机电系统)振镜激光扫描的投影机由于使用了激光光源和振镜扫描的投影方式,具有大景深的成像范围。相机镜头同样面临着景深范围有限的问题,而电子变焦透镜具有连续改变镜头焦距的功能。Generally, fringe projection uses a digital micromirror array (DMD) based on the principle of optical imaging to generate fringe patterns, and the optical projection lens with a fixed focal length has a limited depth of field range. In particular, to improve image brightness, commercial projectors are designed with large apertures, resulting in a smaller depth of field range. In some large measurement scenarios, the size of the object to be measured is large or the large-span spatial range composed of multiple objects, the projection system cannot meet the requirements. The MEMS (Micro Electro Mechanical System) galvanometer laser scanning projector has a large depth of field imaging range due to the use of a laser light source and a galvanometer scanning projection method. Camera lenses also face the problem of limited depth of field range, and electronic zoom lenses have the ability to continuously change the focal length of the lens.

最近几年,电子可调透镜(Electrically Tunable Lens,ETL)的发展为设计更加紧凑的光学系统提供了更多的选择,尤其是它的精密、快速、方便和可重复性等,已经广泛应用在显示、显微镜、自动聚焦成像、激光加工等领域。对于三维测量方面,也有研究使用电子可调透镜实现某些功能。一种技术是使用电子可调透镜快速获取多个离散的聚焦图像,通过合并来自不同聚焦情况下的数据来获得整个场景的三维信息。但是,目前的三维测量系统在测量大景深场景时的精度低,重建恢复效果差的问题仍然没有办法解决。In recent years, the development of Electronic Tunable Lens (ETL) has provided more options for designing more compact optical systems, especially its precision, speed, convenience and repeatability, etc., have been widely used in Display, microscope, autofocus imaging, laser processing and other fields. For three-dimensional measurement, there are also studies using electronically adjustable lenses to achieve certain functions. One technique is to use electronically tunable lenses to rapidly acquire multiple discrete focused images to obtain three-dimensional information about the entire scene by combining data from different focusing situations. However, the current 3D measurement system has low accuracy when measuring scenes with large depth of field, and the problem of poor reconstruction and restoration effect still cannot be solved.

发明内容SUMMARY OF THE INVENTION

本发明实施例提供了一种基于大景深的高精度三维重建方法、装置及其相关组件,旨在解决现有技术中大景深场景下三维测量精度低,三维重建效果差的问题。Embodiments of the present invention provide a high-precision 3D reconstruction method, device and related components based on a large depth of field, aiming to solve the problems of low 3D measurement accuracy and poor 3D reconstruction effect in a large depth of field scene in the prior art.

第一方面,本发明实施例提供了一种基于大景深的高精度三维重建方法,包括:In a first aspect, an embodiment of the present invention provides a high-precision three-dimensional reconstruction method based on a large depth of field, including:

对大景深测量场景进行区域划分;Regional division of large depth of field measurement scenes;

利用三维测量系统对划分出的每一个区域进行双目视觉立体标定,得到标定数据;其中,所述三维测量系统包括成像装置和投影装置;Use a three-dimensional measurement system to perform binocular vision stereo calibration on each of the divided regions to obtain calibration data; wherein, the three-dimensional measurement system includes an imaging device and a projection device;

在不同区域内利用投影装置向处于不同位置时的平面平板投射指定图案,并通过成像装置采集所述平面平板在不同位置时的平板图像,计算得到所述平面平板在不同位置时的绝对相位分布图,并根据所述标定数据计算得到所述平面平板在不同位置时的三维信息;In different areas, the projection device is used to project the specified pattern to the flat plate at different positions, and the image of the flat plate at different positions is collected by the imaging device, and the absolute phase distribution of the flat plate at different positions is calculated. Figure, and calculate the three-dimensional information of the flat plate at different positions according to the calibration data;

在每一个区域内,获取所述成像装置每一个像素点在所述平面平板的绝对相位分布图中的绝对相位,并根据每个所述平面平板的三维信息与对应像素点的绝对相位之间的映射关系建立对应区域的三维映射系数表;In each area, the absolute phase of each pixel point of the imaging device in the absolute phase distribution diagram of the plane plate is obtained, and the absolute phase of each pixel point of the plane plate is obtained according to the difference between the three-dimensional information of each plane plate and the absolute phase of the corresponding pixel point. The mapping relationship establishes the three-dimensional mapping coefficient table of the corresponding area;

利用投影装置向被测物体投射目标图案,并通过成像装置采集被测物体的目标焦扫图像,并将所述目标焦扫图像进行去模糊处理,得到目标图像并计算所述目标图像的绝对相位分布图;Use the projection device to project the target pattern to the measured object, and collect the target focal scan image of the measured object through the imaging device, and deblur the target focal scan image to obtain the target image and calculate the absolute phase of the target image Distribution;

获取所述目标图像每一个像素点在所述目标图像的绝对相位分布图的绝对相位,并根据所述绝对相位所属区域在对应区域的三维映射系数表中查找对应的三维映射系数,利用所述三维映射系数计算得到对应的空间三维点坐标。Obtain the absolute phase of each pixel of the target image in the absolute phase distribution diagram of the target image, and search for the corresponding three-dimensional mapping coefficient in the three-dimensional mapping coefficient table of the corresponding area according to the region to which the absolute phase belongs, and use the The three-dimensional mapping coefficient is calculated to obtain the corresponding three-dimensional point coordinates in space.

第二方面,本发明实施例提供了一种基于大景深的高精度三维重建装置,其包括:In a second aspect, an embodiment of the present invention provides a high-precision three-dimensional reconstruction device based on a large depth of field, which includes:

区域划分单元,用于对大景深测量场景进行区域划分;The area division unit is used to divide the area of the large depth of field measurement scene;

标定数据获取单元,用于利用三维测量系统对划分出的每一个区域进行双目视觉立体标定,得到标定数据;其中,所述三维测量系统包括成像装置和投影装置;A calibration data acquisition unit, configured to perform binocular stereo calibration on each of the divided regions by using a 3D measurement system to obtain calibration data; wherein the 3D measurement system includes an imaging device and a projection device;

三维信息获取单元,用于在不同区域内利用投影装置向处于不同位置时的平面平板投射指定图案,并通过成像装置采集所述平面平板在不同位置时的平板图像,计算得到所述平面平板在不同位置时的绝对相位分布图,并根据所述标定数据计算得到所述平面平板在不同位置时的三维信息;A three-dimensional information acquisition unit is used to project a specified pattern on a flat plate at different positions by using a projection device in different areas, and collect the flat plate images of the flat plate in different positions through an imaging device, and calculate the flat plate at different positions. The absolute phase distribution diagram at different positions, and the three-dimensional information of the flat plate at different positions is obtained by calculating according to the calibration data;

三维映射系数表获取单元,用于在每一个区域内,获取所述成像装置每一个像素点在所述平面平板的绝对相位分布图中的绝对相位,并根据每个所述平面平板的三维信息与对应像素点的绝对相位之间的映射关系建立对应区域的三维映射系数表;A three-dimensional mapping coefficient table acquiring unit, configured to acquire, in each region, the absolute phase of each pixel of the imaging device in the absolute phase distribution map of the plane plate, and according to the three-dimensional information of each plane plate A three-dimensional mapping coefficient table of the corresponding area is established with the mapping relationship between the absolute phases of the corresponding pixel points;

目标焦扫图像获取单元,用于利用投影装置向被测物体投射目标图案,并通过成像装置采集被测物体的目标焦扫图像,并将所述目标焦扫图像进行去模糊处理,得到目标图像并计算所述目标图像的绝对相位分布图;The target focal scan image acquisition unit is used to project the target pattern to the measured object by using the projection device, collect the target focal scan image of the measured object through the imaging device, and deblur the target focal scan image to obtain the target image and calculate the absolute phase distribution of the target image;

空间三维点坐标获取单元,用于获取所述目标图像每一个像素点在所述目标图像的绝对相位分布图的绝对相位,并根据所述绝对相位所属区域在对应区域的三维映射系数表中查找对应的三维映射系数,利用所述三维映射系数计算得到对应的空间三维点坐标。A spatial three-dimensional point coordinate obtaining unit, used to obtain the absolute phase of each pixel of the target image in the absolute phase distribution map of the target image, and look up the three-dimensional mapping coefficient table of the corresponding area according to the area to which the absolute phase belongs Corresponding three-dimensional mapping coefficients are calculated by using the three-dimensional mapping coefficients to obtain corresponding three-dimensional point coordinates in space.

第三方面,本发明实施例又提供了一种计算机设备,其包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现上述第一方面所述的基于大景深的高精度三维重建方法。In a third aspect, an embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the computer The program implements the high-precision three-dimensional reconstruction method based on the large depth of field described in the first aspect above.

第四方面,本发明实施例还提供了一种计算机可读存储介质,其中所述计算机可读存储介质存储有计算机程序,所述计算机程序当被处理器执行时使所述处理器执行上述第一方面所述的基于大景深的高精度三维重建方法。In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when executed by a processor, the computer program causes the processor to execute the above-mentioned first step. On the one hand, the high-precision three-dimensional reconstruction method based on a large depth of field is described.

本发明实施例提供了一种基于大景深的高精度三维重建方法、装置及其相关组件。该方法包括:对大景深测量场景进行区域划分;利用三维测量系统对划分出的每一个区域进行双目视觉立体标定,得到标定数据;其中,所述三维测量系统包括成像装置和投影装置;在不同区域内利用投影装置向处于不同位置时的平面平板投射指定图案,并通过成像装置采集所述平面平板在不同位置时的平板图像,计算得到所述平面平板在不同位置时的绝对相位分布图,并根据所述标定数据计算得到所述平面平板在不同位置时的三维信息;在每一个区域内,获取所述成像装置每一个像素点在所述平面平板的绝对相位分布图中的绝对相位,并根据每个所述平面平板的三维信息与对应像素点的绝对相位之间的映射关系建立对应区域的三维映射系数表;利用投影装置向被测物体投射目标图案,并通过成像装置采集被测物体的目标焦扫图像,并将所述目标焦扫图像进行去模糊处理,得到目标图像并计算所述目标图像的绝对相位分布图;获取所述目标图像每一个像素点在所述目标图像的绝对相位分布图的绝对相位,并根据所述绝对相位所属区域在对应区域的三维映射系数表中查找对应的三维映射系数,利用所述三维映射系数计算得到对应的空间三维点坐标。本发明实施例通过对大景深场景进行区域划分,并为每一区域建立三维映射系数表,在进行三维重建时直接获取被测物体对应区域的三维映射系数,从而计算出空间三维点坐标,通过将大景深场景划分为多个区域进行计算,整个计算过程更加严谨精确,并且在建立三维映射系数表后获取被测物体的空间三维点坐标更加迅速准确。Embodiments of the present invention provide a high-precision three-dimensional reconstruction method, device and related components based on a large depth of field. The method includes: dividing a large depth of field measurement scene into regions; using a three-dimensional measuring system to perform binocular vision stereo calibration on each of the divided regions to obtain calibration data; wherein, the three-dimensional measuring system includes an imaging device and a projection device; In different areas, the projection device is used to project the specified pattern to the flat plate in different positions, and the flat plate image of the flat plate in different positions is collected by the imaging device, and the absolute phase distribution diagram of the flat plate in different positions is calculated and obtained. , and calculate and obtain the three-dimensional information of the flat plate at different positions according to the calibration data; in each area, obtain the absolute phase of each pixel of the imaging device in the absolute phase distribution diagram of the flat plate , and establish a three-dimensional mapping coefficient table of the corresponding area according to the mapping relationship between the three-dimensional information of each said flat plate and the absolute phase of the corresponding pixel point; use the projection device to project the target pattern to the object under test, and collect the object pattern through the imaging device. Measure the target focal scan image of the object, and deblur the target focal scan image to obtain the target image and calculate the absolute phase distribution map of the target image; obtain each pixel of the target image in the target image The absolute phase of the absolute phase distribution map is obtained, and the corresponding three-dimensional mapping coefficient is searched in the three-dimensional mapping coefficient table of the corresponding region according to the region to which the absolute phase belongs, and the corresponding spatial three-dimensional point coordinates are calculated by using the three-dimensional mapping coefficient. In the embodiment of the present invention, the large depth of field scene is divided into regions, and a three-dimensional mapping coefficient table is established for each region, and the three-dimensional mapping coefficient of the corresponding region of the measured object is directly obtained during the three-dimensional reconstruction, so as to calculate the spatial three-dimensional point coordinates. The large depth of field scene is divided into multiple areas for calculation, the entire calculation process is more rigorous and accurate, and the spatial 3D point coordinates of the measured object are obtained more quickly and accurately after the 3D mapping coefficient table is established.

附图说明Description of drawings

为了更清楚地说明本发明实施例技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions of the embodiments of the present invention more clearly, the following briefly introduces the accompanying drawings used in the description of the embodiments. Obviously, the drawings in the following description are some embodiments of the present invention, which are of great significance to the art For those of ordinary skill, other drawings can also be obtained from these drawings without any creative effort.

图1为本发明实施例提供的基于大景深的高精度三维重建方法的流程示意图;1 is a schematic flowchart of a high-precision three-dimensional reconstruction method based on a large depth of field provided by an embodiment of the present invention;

图2为本发明实施例提供的基于大景深的高精度三维重建方法的模拟图;2 is a simulation diagram of a high-precision three-dimensional reconstruction method based on a large depth of field provided by an embodiment of the present invention;

图3为本发明实施例提供的基于大景深的高精度三维重建装置的示意性框图。FIG. 3 is a schematic block diagram of a high-precision three-dimensional reconstruction device based on a large depth of field provided by an embodiment of the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

应当理解,当在本说明书和所附权利要求书中使用时,术语“包括”和“包含”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。It is to be understood that, when used in this specification and the appended claims, the terms "comprising" and "comprising" indicate the presence of the described features, integers, steps, operations, elements and/or components, but do not exclude one or The presence or addition of a number of other features, integers, steps, operations, elements, components, and/or sets thereof.

还应当理解,在此本发明说明书中所使用的术语仅仅是出于描述特定实施例的目的而并不意在限制本发明。如在本发明说明书和所附权利要求书中所使用的那样,除非上下文清楚地指明其它情况,否则单数形式的“一”、“一个”及“该”意在包括复数形式。It is also to be understood that the terminology used in this specification of the present invention is for the purpose of describing particular embodiments only and is not intended to limit the present invention. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural unless the context clearly dictates otherwise.

还应当进一步理解,在本发明说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。It should further be understood that, as used in this specification and the appended claims, the term "and/or" refers to and including any and all possible combinations of one or more of the associated listed items .

请参阅图1和图2,图1为本发明实施例提供的一种基于大景深的高精度三维重建方法的流程示意图,该方法包括步骤S101~S106。Please refer to FIG. 1 and FIG. 2 . FIG. 1 is a schematic flowchart of a high-precision three-dimensional reconstruction method based on a large depth of field according to an embodiment of the present invention, and the method includes steps S101 to S106 .

S101、对大景深测量场景进行区域划分;S101. Perform regional division on the large depth of field measurement scene;

在本步骤中,由于大景深场景较大,在进行三维重建时,若直接对大景深场景进行测量会导致精确度下降,因此,对大景深场景进行测量是需要在纵深方向把该大景深场景的测量空间进行划分,获得几个较小的测量区域。In this step, since the scene with large depth of field is large, when performing 3D reconstruction, if the scene with large depth of field is directly measured, the accuracy will decrease. The measurement space is divided to obtain several smaller measurement areas.

在一实施例中,所述步骤S101之后,包括In one embodiment, after the step S101, including

利用标定算法对所述成像装置和投影装置的位置进行标定;Use a calibration algorithm to calibrate the positions of the imaging device and the projection device;

获取所述成像装置的变焦镜头测量所述大景深测量场景的总控制电流最大值与最小值,以及所述成像装置的变焦镜头聚焦于每一个区域的中心位置时对应的区域控制电流值,并记录所述总控制电流最大值与最小值以及每一区域对应的区域控制电流值。Obtain the maximum and minimum values of the total control current measured by the zoom lens of the imaging device to measure the large depth of field measurement scene, and the corresponding area control current values when the zoom lens of the imaging device is focused on the center position of each area, and Record the maximum and minimum values of the total control current and the region control current value corresponding to each region.

在本步骤中,首先将所述成像装置和投影装置的位置进行标定,然后根据所述成像装置定焦时的测量深度范围以及所述成像装置的变焦镜头的屈光度变化范围,从而确定测量场景的合适的深度范围,通过改变所述变焦镜头的屈光度,从而使所述变焦镜头可以聚焦在不同区域的中心位置,然后记录所述变焦镜头聚焦于不同区域的中心位置时对应的控制电流值,调整所述变焦镜头的屈光度,使所述成像装置分别聚焦于所述大景深测量场景的最大深度和最小深度,并记录对应深度的控制电流值。在本实施例中,所述大景深测量场景的最小深度为400mm,最大深度为1000mm。In this step, the positions of the imaging device and the projection device are first calibrated, and then according to the measurement depth range of the imaging device when the focus is fixed and the diopter variation range of the zoom lens of the imaging device, the measurement scene is determined. For a suitable depth range, by changing the diopter of the zoom lens, the zoom lens can focus on the center position of different areas, and then record the corresponding control current value when the zoom lens focuses on the center position of different areas, adjust The diopter of the zoom lens enables the imaging device to focus on the large depth of field to measure the maximum depth and the minimum depth of the scene, and record the control current value corresponding to the depth. In this embodiment, the minimum depth of the large depth of field measurement scene is 400mm, and the maximum depth is 1000mm.

S102、利用三维测量系统对划分出的每一个区域进行双目视觉立体标定,得到标定数据;其中,所述三维测量系统包括成像装置和投影装置;S102. Use a three-dimensional measurement system to perform binocular vision stereo calibration on each of the divided regions to obtain calibration data; wherein the three-dimensional measurement system includes an imaging device and a projection device;

在本步骤中,利用带有变焦镜头的成像装置和具有MEMS振镜的投影装置组成三维测量系统,利用所述三维测量系统对每一区域进行双目视觉立体标定,得到标定数据。所述成像装置可以是具有变焦镜头的变焦相机,所述投影装置可以是具有MEMS振镜的投影机。In this step, an imaging device with a zoom lens and a projection device with a MEMS galvanometer are used to form a three-dimensional measurement system, and the three-dimensional measurement system is used to perform binocular vision stereo calibration for each area to obtain calibration data. The imaging device may be a zoom camera with a zoom lens, and the projection device may be a projector with a MEMS galvanometer.

在一实施例中,所述利用三维测量系统对划分出的每一个区域进行双目视觉立体标定,得到标定数据,包括:In one embodiment, the stereo calibration of binocular vision is performed on each of the divided regions by using a three-dimensional measurement system to obtain calibration data, including:

以所述成像装置的光心为原点,并以所述成像装置的光轴为Z轴,建立成像装置坐标系;以所述投影装置的光心为原点,并以所述投影装置的光轴为Z轴,建立投影装置坐标系;Taking the optical center of the imaging device as the origin, and taking the optical axis of the imaging device as the Z axis, the imaging device coordinate system is established; taking the optical center of the projection device as the origin, and taking the optical axis of the projection device as the origin For the Z axis, establish the coordinate system of the projection device;

利用双目视觉立体标定算法获取所述成像装置的内在参数与成像装置坐标系之间的转换关系以及所述投影装置的内在参数与所述投影坐标系的转换关系,并计算所述成像装置坐标系与投影坐标系的转换关系,得到标定数据。Use the binocular vision stereo calibration algorithm to obtain the conversion relationship between the intrinsic parameters of the imaging device and the imaging device coordinate system and the conversion relationship between the intrinsic parameters of the projection device and the projection coordinate system, and calculate the imaging device coordinates The conversion relationship between the system and the projected coordinate system is used to obtain the calibration data.

在本实施例中,获取所述成像装置和投影装置的内在参数,所述成像装置和投影装置的内在参数即内在参数矩阵,包括焦距、光心位置以及单位距离的像素点数量等。所述成像装置的内在参数与所述成像装置坐标系有一个对应的转换关系,所述投影装置的内在参数与所述投影装置坐标系也有一个对应的转换关系,并根据上述转换关系计算所述成像装置坐标系与投影坐标系的转换关系。In this embodiment, the intrinsic parameters of the imaging device and the projection device are acquired, the intrinsic parameters of the imaging device and the projection device, that is, the intrinsic parameter matrix, including the focal length, the position of the optical center, and the number of pixels per unit distance. The intrinsic parameters of the imaging device and the coordinate system of the imaging device have a corresponding conversion relationship, and the intrinsic parameters of the projection device and the coordinate system of the projection device also have a corresponding conversion relationship. The conversion relationship between the imaging device coordinate system and the projection coordinate system.

其中,所述成像装置的标定过程如下:Wherein, the calibration process of the imaging device is as follows:

假设某一区域内中存在一点P,它在世界坐标系和成像装置坐标系下的坐标分别为(XW,YW,ZW)和(Xc,Yc,Zc),在成像装置的成像平面上的投影坐标为(u,v),则透视投影成像过程为:

Figure BDA0003066797460000061
其中,sx,sy分别为沿对应图像坐标轴的图像平面单位距离的像素数(pixel/mm);(u0,v0)为成像装置的光轴与图像平面的交点,即光心在图像平面上的投影,称为主点;fx,fy分别为沿对应图像坐标轴的等效焦距;R是一个3×3的正交矩阵,T是一个3×1的向量,R和T分别表示世界坐标系转换到成像装置坐标系的旋转和平移变换。上式可以简写为:
Figure BDA0003066797460000062
其中,s为尺度因子;[R T]为外部参数矩阵;
Figure BDA0003066797460000063
Figure BDA0003066797460000064
分别为空间三维点P和其像点的齐次坐标;M为投影矩阵;K为内部参数矩阵:
Figure BDA0003066797460000065
世界坐标系到成像装置坐标系的转换关系为:
Figure BDA0003066797460000071
由于成像装置在成像的过程中存在偏差,因此需要计算径向畸变和切向畸变,所述径向畸变和切向畸变分别表示为:δRx=x(k1r2+k2r4+k3r6),δRy=y(k1r2+k2r4+k3r6),δTx=2p1xy+p2(r2+2x2),δTy=p1(r2+2y2)+2p2xy。其中,δRx和δRy分别为x方向和y方向的径向畸变;δTx和δTy分别为x方向和y方向的切向畸变;(x,y)是理想图像坐标;
Figure BDA0003066797460000072
表示理想像点到主点的距离;k1、k2和k3为径向畸变参数;p1和p2为切向畸变参数。考虑这两种畸变误差之后,理想像点(x,y)转化为有畸变像点(x’,y’)的过程可以表示为:x'=x+δRxTx,y'=y+δRyTy。Assuming that there is a point P in a certain area, its coordinates in the world coordinate system and the imaging device coordinate system are (X W , Y W , Z W ) and (X c , Y c , Z c ), respectively, in the imaging device The projection coordinates on the imaging plane are (u, v), then the perspective projection imaging process is:
Figure BDA0003066797460000061
Among them, s x , s y are the number of pixels per unit distance of the image plane along the corresponding image coordinate axis (pixel/mm); (u 0 , v 0 ) is the intersection of the optical axis of the imaging device and the image plane, that is, the optical center The projection on the image plane is called the principal point; f x , f y are the equivalent focal lengths along the corresponding image coordinate axes; R is a 3×3 orthogonal matrix, T is a 3×1 vector, R and T represent the rotation and translation transformations from the world coordinate system to the imaging device coordinate system, respectively. The above formula can be abbreviated as:
Figure BDA0003066797460000062
Among them, s is the scale factor; [RT] is the external parameter matrix;
Figure BDA0003066797460000063
and
Figure BDA0003066797460000064
are the homogeneous coordinates of the three-dimensional point P in space and its image point respectively; M is the projection matrix; K is the internal parameter matrix:
Figure BDA0003066797460000065
The conversion relationship from the world coordinate system to the imaging device coordinate system is:
Figure BDA0003066797460000071
Since there is a deviation in the imaging process of the imaging device, radial distortion and tangential distortion need to be calculated, and the radial distortion and tangential distortion are respectively expressed as: δ Rx =x(k 1 r 2 +k 2 r 4 + k 3 r 6 ), δ Ry = y(k 1 r 2 +k 2 r 4 +k 3 r 6 ), δ Tx = 2p 1 xy+p 2 (r 2 +2x 2 ), δ Ty = p 1 ( r 2 +2y 2 )+2p 2 xy. Among them, δ Rx and δ Ry are the radial distortions in the x and y directions, respectively; δ Tx and δ Ty are the tangential distortions in the x and y directions, respectively; (x, y) are the ideal image coordinates;
Figure BDA0003066797460000072
represents the distance from the ideal image point to the principal point; k 1 , k 2 and k 3 are radial distortion parameters; p 1 and p 2 are tangential distortion parameters. After considering these two distortion errors, the process of converting an ideal image point (x, y) into a distorted image point (x', y') can be expressed as: x'=x+δ RxTx , y'=y +δ RyTy .

对于每一个区域,先利用所述三维测量系统采集平面标靶在不同位置时的标靶图像,并根据所述标靶图像利用张正友标定算法计算所述成像装置的位置。在采集标靶图像时,先将所述平面标靶摆放至某一区域的中间位置,利用成像装置进行采集标靶图像后,将所述平面标靶变换至另一位置,继续采集标靶图像,通过将所述平面标靶进行多次位置变换,得到多组标靶图像。所述张正友标定算法的整体流程如下:首先利用成像装置拍摄多张所述平面标靶在不同位置下的标靶图像,然后对所述标靶图像进行检测,获取所述标靶图像的特征点,再求解理想无畸变情况下的成像装置的内参数和外参数并用极大似然估计提升精度,并应用最小二乘求出所述成像装置实际的径向畸变系数,根据所述成像装置的内参数、外参数以及径向畸变系数,利用极大似然法,优化估计,提升估计精度。For each area, first use the three-dimensional measurement system to collect target images of the planar target at different positions, and use Zhang Zhengyou's calibration algorithm to calculate the position of the imaging device according to the target images. When collecting the target image, first place the flat target in the middle of a certain area, and then use the imaging device to collect the target image, then change the flat target to another position, and continue to collect the target image, by performing multiple position transformations on the planar target to obtain multiple sets of target images. The overall process of Zhang Zhengyou's calibration algorithm is as follows: first, use an imaging device to shoot a plurality of target images of the planar target at different positions, and then detect the target images to obtain the feature points of the target images. , and then solve the intrinsic and extrinsic parameters of the imaging device under ideal distortion-free conditions and use maximum likelihood estimation to improve the accuracy, and apply least squares to find the actual radial distortion coefficient of the imaging device. Intrinsic parameters, extrinsic parameters and radial distortion coefficients are optimized by using the maximum likelihood method to improve the estimation accuracy.

所述投影装置的标定过程如下:The calibration process of the projection device is as follows:

在投影装置标定过程中,运用相位移技术获取成像装置图像和投影装置图像之间的对应关系。所述投影装置投射一组水平条纹的相位移图和格雷码编码图于平面标靶上,成像装置进行采集标靶图像。接着利用相位移加格雷码解算出平面标靶圆心(uC,vC)的水平方向的绝对相位值Фh,通过绝对相位值找到投影装置图像的一条水平对应线,其坐标值vP为:

Figure BDA0003066797460000073
其中,Nh为水平相移图案的总条纹数;H为投影装置图像的垂直分辨率。同理,投影装置投射一组垂直条纹的相位移图和格雷码编码图,可以得到同个标定点圆心(uC,vC)的垂直方向的绝对相位值Фv,其在投影装置图像上对应的坐标值uP为:
Figure BDA0003066797460000074
其中,Nv为垂直相移图案的总条纹数;W为投影装置图像的水平分辨率。投影装置标定参数的方法与成像装置标定的相同,投影装置的标定即求出投影装置的内部参数矩阵。During the calibration process of the projection device, the phase shift technique is used to obtain the corresponding relationship between the image of the imaging device and the image of the projection device. The projection device projects a set of phase shift diagrams and Gray code encoding diagrams of horizontal stripes on the flat target, and the imaging device collects the target image. Then, the absolute phase value Φ h in the horizontal direction of the center of the plane target circle (u C , v C ) is calculated by using the phase shift plus Gray code, and a horizontal line corresponding to the image of the projection device is found by the absolute phase value, and its coordinate value v P is :
Figure BDA0003066797460000073
Among them, N h is the total number of stripes of the horizontal phase shift pattern; H is the vertical resolution of the image of the projection device. In the same way, the projection device projects a set of phase shift diagrams and Gray code encoding diagrams of vertical stripes, and the absolute phase value Фv in the vertical direction of the circle center (u C , v C ) of the same calibration point can be obtained, which is on the image of the projection device. The corresponding coordinate value u P is:
Figure BDA0003066797460000074
Among them, N v is the total number of stripes of the vertical phase shift pattern; W is the horizontal resolution of the image of the projection device. The method of calibrating parameters of the projection device is the same as that of the imaging device. The calibration of the projection device is to obtain the internal parameter matrix of the projection device.

对于每一个区域,在对成像装置完成标定后,对投影装置进行标定。利用投影装置向所述平面标靶进行投射图案,成像装置采集具有图案的所述平面标靶的标靶图像,随后改变所述平面标靶的位置继续投射图案并采集标靶图像,经过多次改变所述平面标靶的位置从而得到多组标靶图像,然后利用得到的所述标靶图像计算出每个所述标靶图像的正交绝对相位分布图。具体可以利用格雷码结合相移法进行相位解码,从而计算出每个所述标靶图像的正交绝对相位分布图。格雷码加相移法既可以减少格雷码的编码位数,加快解码速度,也可以弥补单纯的相移法和格雷码法的对不连续位置难以重建的缺点。采用格雷码与相移法结合具体的编码方法为:首先向被测物投射一系列格雷码黑白条纹图案,其中具有相同编码的区域作为一个编码周期,然后再采用相移法,依次投射相移图案,使得每个编码区域被进一步连续细分。通过所述标靶图像的正交绝对相位分布图,找出成像装置像面和投影装置像面上的一对同名点,即以成像装置像面的像点为待匹配点,在投影装置像面上查找与待匹配点绝对相位相同的第一亚像素点。最后根据所述标靶图像利用张正友标定算法计算所述投影装置的位置。For each area, after the imaging device is calibrated, the projection device is calibrated. The projection device is used to project the pattern to the flat target, the imaging device collects the target image of the flat target with the pattern, and then changes the position of the flat target to continue to project the pattern and collect the target image. The position of the plane target is changed to obtain multiple sets of target images, and then the orthogonal absolute phase distribution diagram of each target image is calculated by using the obtained target images. Specifically, a Gray code combined with a phase shift method can be used to perform phase decoding, so as to calculate the quadrature absolute phase distribution map of each target image. The Gray code plus phase shift method can not only reduce the number of coding bits of the Gray code, speed up the decoding speed, but also make up for the shortcomings of the simple phase shift method and the Gray code method that it is difficult to reconstruct discontinuous positions. The specific encoding method using the combination of Gray code and phase shift method is as follows: first, project a series of gray code black and white stripe patterns to the measured object, and the area with the same code is used as a code cycle, and then the phase shift method is used to project the phase shift in turn. pattern, such that each encoded region is further subdivided consecutively. According to the orthogonal absolute phase distribution diagram of the target image, a pair of points with the same name on the image plane of the imaging device and the image plane of the projection device are found, that is, the image point on the image plane of the imaging device is used as the point to be matched, and the image point on the image plane of the projection device is used as the point to be matched. Find the first sub-pixel point with the same absolute phase as the point to be matched on the surface. Finally, according to the target image, the position of the projection device is calculated by Zhang Zhengyou's calibration algorithm.

S103、在不同区域内利用投影装置向处于不同位置时的平面平板投射指定图案,并通过成像装置采集所述平面平板在不同位置时的平板图像,计算得到所述平面平板在不同位置时的绝对相位分布图,并根据所述标定数据计算得到所述平面平板在不同位置时的三维信息;S103 , project a specified pattern on the flat plate at different positions by using the projection device in different regions, and collect the flat plate images of the flat plate at different positions through the imaging device, and calculate the absolute value of the flat plate at different positions. phase distribution diagram, and calculate the three-dimensional information of the flat plate at different positions according to the calibration data;

在本步骤中,在每一个区域内,利用具有MEMS振镜的所述投影装置向处于不同位置时的平面平板投射指定图案,并通过所述成像装置采集平板图像,然后根据所述平板图像计算所述平面平板在不同位置时的绝对相位分布图,并且利用预先获取的标定数据计算出所述平面平板的三维信息。所述标定数据包括:成像装置和投影装置的内在参数、成像装置的变焦镜头的畸变系数和两个坐标系之间的转换关系。In this step, in each area, the projection device with the MEMS galvanometer is used to project the specified pattern to the flat plate at different positions, and the image of the flat plate is collected by the imaging device, and then calculated according to the flat plate image The absolute phase distribution diagram of the plane plate at different positions, and the three-dimensional information of the plane plate is calculated by using pre-acquired calibration data. The calibration data includes: intrinsic parameters of the imaging device and the projection device, the distortion coefficient of the zoom lens of the imaging device, and the conversion relationship between the two coordinate systems.

所述平面平板的平板图像具体采集过程是:将所述平面平板放置在测量区域内,投影装置投射正交正弦相移条纹图案和格雷码编码图案于所述平面平板上,成像装置拍摄采集处于不同位置的所述平面平板的平板图像,然后改变所述平面平板的位置,重复投影和采集的过程,得到多组平板图像数据。The specific acquisition process of the flat plate image of the flat plate is as follows: the flat plate is placed in the measurement area, the projection device projects the quadrature sinusoidal phase-shift fringe pattern and the Gray code coding pattern on the flat plate, and the imaging device captures and collects in the Plate images of the flat plate at different positions, and then changing the position of the flat plate, repeating the process of projection and acquisition, to obtain multiple sets of plate image data.

在一实施例中,所述根据所述标定数据计算得到所述平面平板在不同位置时的三维信息,包括:In an embodiment, the calculating and obtaining the three-dimensional information of the flat plate at different positions according to the calibration data includes:

根据如下公式计算三维信息:The three-dimensional information is calculated according to the following formula:

sC[uC,vC,1]T=KCMC[XW,YW,ZW,1]T s C [u C ,v C ,1] T =K C M C [X W ,Y W ,Z W ,1] T

sP[uP,vP,1]T=KPI[XW,YW,ZW,1]T s P [u P ,v P ,1] T =K P I[X W ,Y W ,Z W ,1] T

其中,sC和sP分别为成像装置和投影装置的尺度因子,KC和KP分别为成像装置和投影装置的内部参数矩阵,MC为成像装置的外部参数矩阵,I为单位矩阵,(uC,vC)和(uP,vP)是三维测量系统畸变参数矫正后的成像装置和投影装置的图像坐标,T为矩阵的转置。Among them, s C and s P are the scale factors of the imaging device and the projection device, respectively, K C and K P are the internal parameter matrices of the imaging device and the projection device, respectively, MC is the external parameter matrix of the imaging device, I is the identity matrix, (u C , v C ) and (u P , v P ) are the image coordinates of the imaging device and the projection device after the distortion parameters of the three-dimensional measurement system are corrected, and T is the transpose of the matrix.

在本实施例中,所述三维测量系统对P点的三维重建过程可表示为:

Figure BDA0003066797460000091
其中,sC和sP分别为成像装置和投影装置的尺度因子,KC和KP分别为成像装置和投影装置的内部参数矩阵,MC和MP分别为成像装置和投影装置的外部参数矩阵。所述三维测量系统的结构参数可表示为:
Figure BDA0003066797460000092
其中,r为投影装置坐标系转换到成像装置坐标系的旋转向量,t为投影装置坐标系转换到成像装置坐标系的平移向量;把世界坐标系建立在投影装置坐标系下,这时RP为单位矩阵,TP为零矩阵,RC为世界坐标系到成像装置坐标系的旋转向量,TC为世界坐标系到成像装置坐标系的平移向量,MP=I,三维重建过程变换为:
Figure BDA0003066797460000093
其中,I为单位矩阵;(uC,vC)和(uP,vP)是系统畸变参数矫正后的成像装置和投影装置的图像坐标。解算出P点三维坐标(XW,YW,ZW)之后,结合P点的绝对相位值Ф1,即得到一个区域中一个成像装置像素点的相位三维映射系数表采样数据。In this embodiment, the three-dimensional reconstruction process of point P by the three-dimensional measurement system can be expressed as:
Figure BDA0003066797460000091
Among them, s C and s P are the scale factors of the imaging device and the projection device, respectively, K C and K P are the internal parameter matrices of the imaging device and the projection device, respectively, and MC and MP are the external parameters of the imaging device and the projection device, respectively. matrix. The structural parameters of the three-dimensional measurement system can be expressed as:
Figure BDA0003066797460000092
Among them, r is the rotation vector from the coordinate system of the projection device to the coordinate system of the imaging device, t is the translation vector from the coordinate system of the projection device to the coordinate system of the imaging device; the world coordinate system is established in the coordinate system of the projection device, then R P is the unit matrix, T P is a zero matrix, R C is the rotation vector from the world coordinate system to the imaging device coordinate system, T C is the translation vector from the world coordinate system to the imaging device coordinate system, M P =I, the three-dimensional reconstruction process is transformed into :
Figure BDA0003066797460000093
Among them, I is the identity matrix; (u C , v C ) and (u P , v P ) are the image coordinates of the imaging device and the projection device after the system distortion parameters are corrected. After the three-dimensional coordinates (X W , Y W , Z W ) of point P are solved, combined with the absolute phase value Φ 1 of point P, the sampling data of the phase three-dimensional mapping coefficient table of a pixel point of an imaging device in an area is obtained.

S104、在每一个区域内,获取所述成像装置每一个像素点在所述平面平板的绝对相位分布图中的绝对相位,并根据每个所述平面平板的三维信息与对应像素点的绝对相位之间的映射关系建立对应区域的三维映射系数表;S104. In each area, obtain the absolute phase of each pixel of the imaging device in the absolute phase distribution diagram of the plane plate, and according to the three-dimensional information of each plane plate and the absolute phase of the corresponding pixel point The mapping relationship between them establishes a three-dimensional mapping coefficient table of the corresponding area;

在本步骤中,根据预先计算得到的所述平面平板的绝对相位分布图,获取所述成像装置每一个像素点在不同区域内对应的绝对相位,然后获取每一个像素点与对应的三维信息之间的映射关系,从而建立对应区域的三维映射系数表。在每一个区域,平面平板的一个位置信息作为一组采样数据,也就是一个像素点对应着有一个三维空间点和一个相位值。多个位置的平面平板提供多组采样数据,通过拟合出映射系数,得到一个区域每个像素的映射系数表。In this step, the absolute phase corresponding to each pixel of the imaging device in different regions is obtained according to the pre-calculated absolute phase distribution of the flat plate, and then the relationship between each pixel and the corresponding three-dimensional information is obtained. The mapping relationship between them can be used to establish the three-dimensional mapping coefficient table of the corresponding area. In each area, a position information of the flat plate is used as a set of sampling data, that is, a pixel point corresponds to a three-dimensional space point and a phase value. The plane plates at multiple positions provide multiple sets of sampling data, and by fitting the mapping coefficients, a mapping coefficient table for each pixel in an area is obtained.

在一实施例中,所述步骤S104包括:In one embodiment, the step S104 includes:

根据所述像素点对应的三维信息,按如下公式计算三维映射系数,并建立三维映射系数表:According to the three-dimensional information corresponding to the pixel points, the three-dimensional mapping coefficient is calculated according to the following formula, and a three-dimensional mapping coefficient table is established:

Figure BDA0003066797460000101
Figure BDA0003066797460000101

其中,αn,cX,bn,cY,cn和cZ为三维映射系数,N为多项式阶数,Ф为对应像素点的绝对相位。Among them, α n , c X , b n , c Y , c n and c Z are three-dimensional mapping coefficients, N is the polynomial order, and Ф is the absolute phase of the corresponding pixel point.

在本实施例中,给定某一像素点mc的绝对相位为ФC,其三维空间点为(X,Y,Z),根据该像素点的三维信息,可推导得:

Figure BDA0003066797460000102
其中,αn,cX,bn,cY,cn和cZ对应着三个空间维度的映射系数。通过上述公式可计算出每个像素点对应的映射系数{an,bn,cn},从而建立每一像素点在每一区域中的绝对相位对应的三维映射系数表。In this embodiment, given that the absolute phase of a certain pixel m c is Φ C , and its three-dimensional space point is (X, Y, Z), according to the three-dimensional information of the pixel, it can be deduced that:
Figure BDA0003066797460000102
Among them, α n , c X , b n , c Y , c n and c Z correspond to the mapping coefficients of the three spatial dimensions. The mapping coefficient {a n , b n , c n } corresponding to each pixel can be calculated by the above formula, thereby establishing a three-dimensional mapping coefficient table corresponding to the absolute phase of each pixel in each region.

S105、利用投影装置向被测物体投射目标图案,并通过成像装置采集被测物体的目标焦扫图像,并将所述目标焦扫图像进行去模糊处理,得到目标图像并计算所述目标图像的绝对相位分布图;S105: Project a target pattern to the object under test by using a projection device, and collect a target focal scan image of the object under test through an imaging device, and perform deblurring on the target focal scan image to obtain a target image and calculate the focal point of the target image. absolute phase distribution map;

在本步骤中,利用具有MEMS振镜的投影装置向被测物体投射图案,所述成像装置在单帧曝光条件下采集所述被测物体的目标焦扫图像,然后对所述目标焦扫图像进行去模糊处理,得到目标图像,再计算所述目标图像的绝对相位分布图。所述成像装置在单帧曝光条件下连续进行焦平面扫描,得到目标焦扫图像,单帧曝光时间即为控制所述成像装置的变焦镜头的电流周期大小。所述电流周期随时间呈三角波变化,所述三角波的最大值和最小值为控制所述成像装置连续聚焦于整个大景深测量场景的电流值范围的最大值和最小值。通过控制所述成像装置的电流值,从而控制所述成像装置采集目标焦扫图像的单帧曝光时间。In this step, a projection device with a MEMS galvanometer is used to project a pattern to the object under test, the imaging device collects a target focal scan image of the object under test under a single frame exposure condition, and then the target focal scan image is captured by the imaging device. Perform deblurring processing to obtain a target image, and then calculate the absolute phase distribution map of the target image. The imaging device continuously scans the focal plane under a single-frame exposure condition to obtain a target focal scan image, and the single-frame exposure time is the current cycle size of the zoom lens that controls the imaging device. The current cycle changes as a triangular wave with time, and the maximum value and the minimum value of the triangular wave are the maximum value and the minimum value of the current value range that controls the imaging device to continuously focus on the entire large depth of field measurement scene. By controlling the current value of the imaging device, the exposure time of a single frame of the imaging device to collect the focal scan image of the target is controlled.

在采集每一幅被测物体的目标焦扫图案时,所述变焦透镜的控制电流的周期为T,最大值为IH,最小值为IL的三角波电流,电流随时间t变化的函数为:

Figure BDA0003066797460000111
其中,n为自然数。When collecting the target focal scan pattern of each measured object, the period of the control current of the zoom lens is T, the maximum value is I H , and the minimum value is the triangular wave current of IL , and the function of the current changing with time t is :
Figure BDA0003066797460000111
where n is a natural number.

在一实施例中,所述步骤S105包括:In one embodiment, the step S105 includes:

将所述目标焦扫图像输入至积分点扩散函数进行解卷积操作,得到去模糊处理后的目标图像;Inputting the target focal scan image into the integral point spread function to perform a deconvolution operation to obtain a deblurred target image;

所述积分点扩散函数的计算公式如下:The calculation formula of the integral point spread function is as follows:

Figure BDA0003066797460000112
Figure BDA0003066797460000112

其中,r为物点成像在成像装置传感器平面上的弥散圆中心的距离;b0为控制电子变焦透镜的电流值在0时刻,物点成像在成像装置传感器平面上的弥散圆直径;b1为物点聚焦在成像装置传感器平面上的光斑直径;b2为控制电子变焦透镜的电流值在半个周期T时刻,物点成像在成像装置传感器平面上的弥散圆直径;C1和C2为两个常量。Among them, r is the distance from the center of the circle of confusion when the object point is imaged on the sensor plane of the imaging device; b 0 is the diameter of the circle of confusion when the current value of the control electronic zoom lens is 0, and the object point is imaged on the sensor plane of the imaging device; b 1 is the diameter of the light spot where the object point is focused on the sensor plane of the imaging device; b 2 is the diameter of the circle of confusion where the object point is imaged on the sensor plane of the imaging device at the time of half cycle T by controlling the current value of the electronic zoom lens; C 1 and C 2 for two constants.

在本实施例中,基于所述成像装置的焦扫模型构建积分点扩散函数,并利用所述积分点扩散函数对所述目标焦扫图像进行解卷积操作,得到去模糊后的目标焦扫图像。所述积分点扩散函数的计算公式如上所述,并将计算结果用维纳滤波进行去模糊。In this embodiment, an integral point spread function is constructed based on the focal scan model of the imaging device, and the target focal scan image is deconvolved by using the integral point spread function to obtain a deblurred target focal scan. image. The calculation formula of the integral point spread function is as described above, and the calculation result is deblurred by Wiener filtering.

S106、获取所述目标图像每一个像素点在所述目标图像的绝对相位分布图的绝对相位,并根据所述绝对相位所属区域在对应区域的三维映射系数表中查找对应的三维映射系数,利用所述三维映射系数计算得到对应的空间三维点坐标。S106: Obtain the absolute phase of each pixel of the target image in the absolute phase distribution diagram of the target image, and search for the corresponding three-dimensional mapping coefficient in the three-dimensional mapping coefficient table of the corresponding area according to the region to which the absolute phase belongs, and use The three-dimensional mapping coefficients are calculated to obtain corresponding three-dimensional point coordinates in space.

在本步骤中,先根据所述目标焦扫图像的绝对相位分布图,判断所述目标焦扫图像对应的每一个像素点的所属区域,然后在对应区域的三维映射系数表中查找出对应的三维映射系数,利用所述三维映射系数计算出对应空间三维点坐标。In this step, first, according to the absolute phase distribution diagram of the target focus scan image, determine the area to which each pixel corresponding to the target focus scan image belongs, and then find out the corresponding three-dimensional mapping coefficient table in the three-dimensional mapping coefficient table of the corresponding area. The three-dimensional mapping coefficient is used to calculate the coordinates of the three-dimensional point in the corresponding space.

在一实施例中,所述步骤S106包括:In one embodiment, the step S106 includes:

通过如下公式计算所述空间三维点坐标:The three-dimensional point coordinates in the space are calculated by the following formula:

Figure BDA0003066797460000113
Figure BDA0003066797460000113

其中,{an,bn,cn}为对应区域的三维映射系数,Ф为该像素点的绝对相位,N为多项式阶数。Among them, {a n , b n , c n } are the three-dimensional mapping coefficients of the corresponding area, Ф is the absolute phase of the pixel, and N is the polynomial order.

在本实施例中,获取所述成像装置各像素点在所述目标焦扫图像中的绝对相位作为目标相位,判断所述目标相位所属的区域,并根据对应区域的三维映射系数表查找出对应的三维映射系数{an,bn,cn},根据所述绝对相位和三维映射系数计算得到空间三维点坐标。In this embodiment, the absolute phase of each pixel of the imaging device in the target focal scan image is obtained as the target phase, the area to which the target phase belongs is determined, and the corresponding area is found according to the three-dimensional mapping coefficient table of the corresponding area. The three-dimensional mapping coefficients {a n , b n , c n } are calculated according to the absolute phase and the three-dimensional mapping coefficients to obtain the three-dimensional point coordinates in space.

如图2所示,若某个像素点的绝对相位为Ф,该像素点在区域1的相位值范围为Ф1 1~Ф1 n,在区域2的相位值范围为Ф2 1~Ф2 n,在区域3的相位值范围为Ф3 1~Ф3 n,在区域n的相位值范围为Фn 1~Фn n。判断该绝对相位的所属区域,若Φ2 1≤Φ≤Φ2 n,则该像素点的相位值属于区域2,在区域2的三维映射系数表中查找出该像素点对应的三维映射系数,按下式计算得到对应的空间三维点坐标:

Figure BDA0003066797460000121
其中,{an,bn,cn}为区域2对应的三维映射系数。As shown in Figure 2, if the absolute phase of a pixel is Ф, the phase value of the pixel in area 1 ranges from Ф 1 1 to Ф 1 n , and the phase value in area 2 ranges from Ф 2 1 to Ф 2 n , the phase value range in region 3 is Ф 3 1 ∼ Ф 3 n , and the phase value range in region n is Ф n 1 ∼Ф n n . Determine the area to which the absolute phase belongs. If Φ 2 1 ≤Φ≤Φ 2 n , then the phase value of the pixel belongs to area 2. Find the three-dimensional mapping coefficient corresponding to the pixel in the three-dimensional mapping coefficient table of area 2, The corresponding three-dimensional point coordinates in space are calculated as follows:
Figure BDA0003066797460000121
Wherein, {a n , b n , c n } are the three-dimensional mapping coefficients corresponding to the region 2 .

若Φ2 1≤Φ≤Φ2 n且Φ1 1≤Φ≤Φ1 n,则要判断Ф属于哪个区域的条件为:

Figure BDA0003066797460000122
当L≥0时,该像点的相位值属于区域1;当L<0时,该像点的相位值属于区域2。If Φ 2 1 ≤Φ≤Φ 2 n and Φ 1 1 ≤Φ≤Φ 1 n , the conditions for judging which region Φ belongs to are:
Figure BDA0003066797460000122
When L≥0, the phase value of the image point belongs to area 1; when L<0, the phase value of the image point belongs to area 2.

请参阅图3,图3为本发明实施例提供的一种基于大景深的高精度三维重建装置的示意性框图,该基于大景深的高精度三维重建装置200包括:Please refer to FIG. 3. FIG. 3 is a schematic block diagram of a high-precision three-dimensional reconstruction device based on a large depth of field provided by an embodiment of the present invention. The high-precision three-dimensional reconstruction device 200 based on a large depth of field includes:

区域划分单元201,用于对大景深测量场景进行区域划分;an area division unit 201, configured to perform area division on a large depth of field measurement scene;

标定数据获取单元202,用于利用三维测量系统对划分出的每一个区域进行双目视觉立体标定,得到标定数据;其中,所述三维测量系统包括成像装置和投影装置;The calibration data acquisition unit 202 is configured to perform binocular vision stereo calibration on each of the divided regions by using a 3D measurement system to obtain calibration data; wherein, the 3D measurement system includes an imaging device and a projection device;

三维信息获取单元203,用于在不同区域内利用投影装置向处于不同位置时的平面平板投射指定图案,并通过成像装置采集所述平面平板在不同位置时的平板图像,计算得到所述平面平板在不同位置时的绝对相位分布图,并根据所述标定数据计算得到所述平面平板在不同位置时的三维信息;The three-dimensional information acquisition unit 203 is used for projecting a specified pattern to the flat plate at different positions by using the projection device in different regions, and collecting the flat plate images of the flat plate in different positions through the imaging device, and calculating the flat plate The absolute phase distribution diagram at different positions, and the three-dimensional information of the flat plate at different positions is obtained by calculating according to the calibration data;

三维映射系数表获取单元204,用于在每一个区域内,获取所述成像装置每一个像素点在所述平面平板的绝对相位分布图中的绝对相位,并根据每个所述平面平板的三维信息与对应像素点的绝对相位之间的映射关系建立对应区域的三维映射系数表;The three-dimensional mapping coefficient table obtaining unit 204 is configured to obtain, in each region, the absolute phase of each pixel of the imaging device in the absolute phase distribution map of the flat plate, and according to the three-dimensional The mapping relationship between the information and the absolute phase of the corresponding pixel point establishes a three-dimensional mapping coefficient table of the corresponding area;

目标焦扫图像获取单元205,用于利用投影装置向被测物体投射目标图案,并通过成像装置采集被测物体的目标焦扫图像,并将所述目标焦扫图像进行去模糊处理,得到目标图像并计算所述目标图像的绝对相位分布图;The target focal scan image acquisition unit 205 is used to project the target pattern to the measured object by using the projection device, and collect the target focal scan image of the measured object through the imaging device, and perform deblurring processing on the target focal scan image to obtain the target image and calculate the absolute phase distribution map of the target image;

空间三维点坐标获取单元206,用于获取所述目标图像每一个像素点在所述目标图像的绝对相位分布图的绝对相位,并根据所述绝对相位所属区域在对应区域的三维映射系数表中查找对应的三维映射系数,利用所述三维映射系数计算得到对应的空间三维点坐标。The spatial three-dimensional point coordinate obtaining unit 206 is used to obtain the absolute phase of each pixel of the target image in the absolute phase distribution map of the target image, and according to the area to which the absolute phase belongs, in the three-dimensional mapping coefficient table of the corresponding area The corresponding three-dimensional mapping coefficients are searched, and the corresponding three-dimensional point coordinates in space are obtained by using the three-dimensional mapping coefficients.

在一实施例中,所述区域划分单元201之后包括:In an embodiment, the area dividing unit 201 includes:

位置标定单元,用于利用标定算法对所述成像装置和投影装置的位置进行标定;a position calibration unit, configured to use a calibration algorithm to calibrate the positions of the imaging device and the projection device;

控制电流值记录单元,用于获取所述成像装置的变焦镜头测量所述大景深测量场景的总控制电流最大值与最小值,以及所述成像装置的变焦镜头聚焦于每一个区域的中心位置时对应的区域控制电流值,并记录所述总控制电流最大值与最小值以及每一区域对应的区域控制电流值。The control current value recording unit is used to obtain the maximum and minimum values of the total control current measured by the zoom lens of the imaging device in the measurement scene of the large depth of field, and when the zoom lens of the imaging device is focused on the center of each area The corresponding area control current value, and the maximum and minimum value of the total control current and the area control current value corresponding to each area are recorded.

在一实施例中,所述标定数据获取单元202包括:In one embodiment, the calibration data acquisition unit 202 includes:

坐标系建立单元,用于以所述成像装置的光心为原点,并以所述成像装置的光轴为Z轴,建立成像装置坐标系;以所述投影装置的光心为原点,并以所述投影装置的光轴为Z轴,建立投影装置坐标系;The coordinate system establishing unit is used for establishing the coordinate system of the imaging device with the optical center of the imaging device as the origin and the optical axis of the imaging device as the Z axis; with the optical center of the projection device as the origin, and The optical axis of the projection device is the Z axis, and a coordinate system of the projection device is established;

标定数据计算单元,用于利用双目视觉立体标定算法获取所述成像装置的内在参数与成像装置坐标系之间的转换关系以及所述投影装置的内在参数与所述投影坐标系的转换关系,并计算所述成像装置坐标系与投影坐标系的转换关系,得到标定数据。a calibration data calculation unit, configured to obtain the conversion relationship between the intrinsic parameters of the imaging device and the imaging device coordinate system and the conversion relationship between the intrinsic parameters of the projection device and the projection coordinate system by using a binocular vision stereo calibration algorithm, And calculate the transformation relationship between the imaging device coordinate system and the projection coordinate system to obtain calibration data.

在一实施例中,所述三维信息获取单元203包括:In one embodiment, the three-dimensional information acquisition unit 203 includes:

三维信息公式计算单元,用于根据如下公式计算三维信息:The three-dimensional information formula calculation unit is used to calculate the three-dimensional information according to the following formula:

sC[uC,vC,1]T=KCMC[XW,YW,ZW,1]T s C [u C ,v C ,1] T =K C M C [X W ,Y W ,Z W ,1] T

sP[uP,vP,1]T=KPI[XW,YW,ZW,1]T s P [u P ,v P ,1] T =K P I[X W ,Y W ,Z W ,1] T

其中,sC和sP分别为成像装置和投影装置的尺度因子,KC和KP分别为成像装置和投影装置的内部参数矩阵,MC为成像装置的外部参数矩阵,I为单位矩阵,(uC,vC)和(uP,vP)是三维测量系统畸变参数矫正后的成像装置和投影装置的图像坐标,T为矩阵的转置。Among them, s C and s P are the scale factors of the imaging device and the projection device, respectively, K C and K P are the internal parameter matrices of the imaging device and the projection device, respectively, MC is the external parameter matrix of the imaging device, I is the identity matrix, (u C , v C ) and (u P , v P ) are the image coordinates of the imaging device and the projection device after the distortion parameters of the three-dimensional measurement system are corrected, and T is the transpose of the matrix.

在一实施例中,所述三维映射系数表获取单元204包括:In one embodiment, the three-dimensional mapping coefficient table obtaining unit 204 includes:

三维映射系数计算单元,用于根据所述像素点对应的三维信息,按如下公式计算三维映射系数,并建立三维映射系数表:The three-dimensional mapping coefficient calculation unit is used to calculate the three-dimensional mapping coefficient according to the following formula according to the three-dimensional information corresponding to the pixel point, and establish a three-dimensional mapping coefficient table:

Figure BDA0003066797460000141
Figure BDA0003066797460000141

其中,αn,cX,bn,cY,cn和cZ为三维映射系数,N为多项式阶数,Ф为对应像素点的绝对相位。Among them, α n , c X , b n , c Y , c n and c Z are three-dimensional mapping coefficients, N is the polynomial order, and Ф is the absolute phase of the corresponding pixel point.

在一实施例中,所述目标焦扫图像获取单元205包括:In one embodiment, the target focal scan image acquisition unit 205 includes:

去模糊处理单元,用于将所述目标焦扫图像输入至积分点扩散函数进行解卷积操作,得到去模糊处理后的目标图像;a deblurring processing unit for inputting the target focal scan image into an integral point spread function to perform a deconvolution operation to obtain a deblurred target image;

积分点扩散函数计算单元,用于所述积分点扩散函数的计算公式如下:The integral point spread function calculation unit, the calculation formula used for the integral point spread function is as follows:

Figure BDA0003066797460000142
Figure BDA0003066797460000142

其中,r为物点成像在成像装置传感器平面上的弥散圆中心的距离;b0为控制电子变焦透镜的电流值在0时刻,物点成像在成像装置传感器平面上的弥散圆直径;b1为物点聚焦在成像装置传感器平面上的光斑直径;b2为控制电子变焦透镜的电流值在半个周期T时刻,物点成像在成像装置传感器平面上的弥散圆直径;C1和C2为两个常量。Among them, r is the distance from the center of the circle of confusion when the object point is imaged on the sensor plane of the imaging device; b 0 is the diameter of the circle of confusion when the current value of the control electronic zoom lens is 0, and the object point is imaged on the sensor plane of the imaging device; b 1 is the diameter of the light spot where the object point is focused on the sensor plane of the imaging device; b 2 is the diameter of the circle of confusion where the object point is imaged on the sensor plane of the imaging device at the time of half cycle T by controlling the current value of the electronic zoom lens; C 1 and C 2 for two constants.

在一实施例中,所述空间三维点坐标获取单元206包括:In one embodiment, the spatial three-dimensional point coordinate obtaining unit 206 includes:

空间三维点坐标计算单元,用于通过如下公式计算所述空间三维点坐标:A space three-dimensional point coordinate calculation unit, used to calculate the space three-dimensional point coordinates by the following formula:

Figure BDA0003066797460000143
Figure BDA0003066797460000143

其中,{an,bn,cn}为对应区域的三维映射系数,Ф为该像素点的绝对相位,N为多项式阶数。Among them, {a n , b n , c n } are the three-dimensional mapping coefficients of the corresponding area, Ф is the absolute phase of the pixel, and N is the polynomial order.

本发明实施例还提供一种计算机设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如上所述的基于大景深的高精度三维重建方法。An embodiment of the present invention also provides a computer device, including a memory, a processor, and a computer program stored on the memory and running on the processor, where the processor implements the above-mentioned computer program when executing the computer program A high-precision 3D reconstruction method based on large depth of field.

本发明实施例还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如上所述的基于大景深的高精度三维重建方法。Embodiments of the present invention further provide a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the above-mentioned high-precision three-dimensional reconstruction method based on a large depth of field is implemented .

说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的系统而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以对本发明进行若干改进和修饰,这些改进和修饰也落入本发明权利要求的保护范围内。The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same and similar parts between the various embodiments can be referred to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant part can be referred to the description of the method. It should be pointed out that for those skilled in the art, without departing from the principle of the present invention, several improvements and modifications can also be made to the present invention, and these improvements and modifications also fall within the protection scope of the claims of the present invention.

还需要说明的是,在本说明书中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的状况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply these entities or operations. There is no such actual relationship or sequence between operations. Moreover, the terms "comprising", "comprising" or any other variation thereof are intended to encompass a non-exclusive inclusion such that a process, method, article or device that includes a list of elements includes not only those elements, but also includes not explicitly listed or other elements inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article, or device that includes the element.

Claims (10)

1.一种基于大景深的高精度三维重建方法,其特征在于,包括以下步骤:1. a high-precision three-dimensional reconstruction method based on large depth of field, is characterized in that, comprises the following steps: 对大景深测量场景进行区域划分;Regional division of large depth of field measurement scenes; 利用三维测量系统对划分出的每一个区域进行双目视觉立体标定,得到标定数据;其中,所述三维测量系统包括成像装置和投影装置;Use a three-dimensional measurement system to perform binocular vision stereo calibration on each of the divided regions to obtain calibration data; wherein, the three-dimensional measurement system includes an imaging device and a projection device; 在不同区域内利用投影装置向处于不同位置时的平面平板投射指定图案,并通过成像装置采集所述平面平板在不同位置时的平板图像,计算得到所述平面平板在不同位置时的绝对相位分布图,并根据所述标定数据计算得到所述平面平板在不同位置时的三维信息;In different areas, the projection device is used to project the specified pattern to the flat plate at different positions, and the image of the flat plate at different positions is collected by the imaging device, and the absolute phase distribution of the flat plate at different positions is calculated. Figure, and calculate the three-dimensional information of the flat plate at different positions according to the calibration data; 在每一个区域内,获取所述成像装置每一个像素点在所述平面平板的绝对相位分布图中的绝对相位,并根据每个所述平面平板的三维信息与对应像素点的绝对相位之间的映射关系建立对应区域的三维映射系数表;In each area, the absolute phase of each pixel point of the imaging device in the absolute phase distribution diagram of the plane plate is obtained, and the absolute phase of each pixel point of the plane plate is obtained according to the difference between the three-dimensional information of each plane plate and the absolute phase of the corresponding pixel point. The mapping relationship establishes the three-dimensional mapping coefficient table of the corresponding area; 利用投影装置向被测物体投射目标图案,并通过成像装置采集被测物体的目标焦扫图像,并将所述目标焦扫图像进行去模糊处理,得到目标图像并计算所述目标图像的绝对相位分布图;Use the projection device to project the target pattern to the measured object, and collect the target focal scan image of the measured object through the imaging device, and deblur the target focal scan image to obtain the target image and calculate the absolute phase of the target image Distribution; 获取所述目标图像每一个像素点在所述目标图像的绝对相位分布图的绝对相位,并根据所述绝对相位所属区域在对应区域的三维映射系数表中查找对应的三维映射系数,利用所述三维映射系数计算得到对应的空间三维点坐标。Obtain the absolute phase of each pixel of the target image in the absolute phase distribution diagram of the target image, and search for the corresponding three-dimensional mapping coefficient in the three-dimensional mapping coefficient table of the corresponding area according to the region to which the absolute phase belongs, and use the The three-dimensional mapping coefficient is calculated to obtain the corresponding three-dimensional point coordinates in space. 2.根据权利要求1所述的基于大景深的高精度三维重建方法,其特征在于,所述对大景深测量场景进行区域划分之后,包括:2. The high-precision three-dimensional reconstruction method based on a large depth of field according to claim 1, wherein after the large depth of field measurement scene is divided into regions, the method comprises: 利用标定算法对所述成像装置和投影装置的位置进行标定;Use a calibration algorithm to calibrate the positions of the imaging device and the projection device; 获取所述成像装置的变焦镜头测量所述大景深测量场景的总控制电流最大值与最小值,以及所述成像装置的变焦镜头聚焦于每一个区域的中心位置时对应的区域控制电流值,并记录所述总控制电流最大值与最小值以及每一区域对应的区域控制电流值。Obtain the maximum and minimum values of the total control current measured by the zoom lens of the imaging device to measure the large depth of field measurement scene, and the corresponding area control current values when the zoom lens of the imaging device is focused on the center position of each area, and Record the maximum and minimum values of the total control current and the region control current value corresponding to each region. 3.根据权利要求1所述的基于大景深的高精度三维重建方法,其特征在于,所述利用三维测量系统对划分出的每一个区域进行双目视觉立体标定,得到标定数据,包括:3. the high-precision three-dimensional reconstruction method based on large depth of field according to claim 1, is characterized in that, described utilizes three-dimensional measurement system to carry out binocular vision stereo calibration to each area that divides, obtains calibration data, comprises: 以所述成像装置的光心为原点,并以所述成像装置的光轴为Z轴,建立成像装置坐标系;以所述投影装置的光心为原点,并以所述投影装置的光轴为Z轴,建立投影装置坐标系;Taking the optical center of the imaging device as the origin, and taking the optical axis of the imaging device as the Z axis, the imaging device coordinate system is established; taking the optical center of the projection device as the origin, and taking the optical axis of the projection device as the origin For the Z axis, establish the coordinate system of the projection device; 利用双目视觉立体标定算法获取所述成像装置的内在参数与成像装置坐标系之间的转换关系以及所述投影装置的内在参数与所述投影坐标系的转换关系,并计算所述成像装置坐标系与投影坐标系的转换关系,得到标定数据。Use the binocular vision stereo calibration algorithm to obtain the conversion relationship between the intrinsic parameters of the imaging device and the imaging device coordinate system and the conversion relationship between the intrinsic parameters of the projection device and the projection coordinate system, and calculate the imaging device coordinates The conversion relationship between the system and the projected coordinate system is used to obtain the calibration data. 4.根据权利要求1所述的基于大景深的高精度三维重建方法,其特征在于,所述根据所述标定数据计算得到所述平面平板在不同位置时的三维信息,包括:4. The high-precision three-dimensional reconstruction method based on a large depth of field according to claim 1, wherein the three-dimensional information obtained by calculating the plane plate at different positions according to the calibration data, comprising: 根据如下公式计算三维信息:The three-dimensional information is calculated according to the following formula: sC[uC,vC,1]T=KCMC[XW,YW,ZW,1]T s C [u C ,v C ,1] T =K C M C [X W ,Y W ,Z W ,1] T sP[uP,vP,1]T=KPI[XW,YW,ZW,1]T s P [u P ,v P ,1] T =K P I[X W ,Y W ,Z W ,1] T 其中,sC和sP分别为成像装置和投影装置的尺度因子,KC和KP分别为成像装置和投影装置的内部参数矩阵,MC为成像装置的外部参数矩阵,I为单位矩阵,(uC,vC)和(uP,vP)是三维测量系统畸变参数矫正后的成像装置和投影装置的图像坐标,T为矩阵的转置。Among them, s C and s P are the scale factors of the imaging device and the projection device, respectively, K C and K P are the internal parameter matrices of the imaging device and the projection device, respectively, MC is the external parameter matrix of the imaging device, I is the identity matrix, (u C , v C ) and (u P , v P ) are the image coordinates of the imaging device and the projection device after the distortion parameters of the three-dimensional measurement system are corrected, and T is the transpose of the matrix. 5.根据权利要求1所述的基于大景深的高精度三维重建方法,其特征在于,所述在每一个区域内,获取所述成像装置每一个像素点在所述平面平板的绝对相位分布图中的绝对相位,并根据每个所述平面平板的三维信息与对应像素点的绝对相位之间的映射关系建立对应区域的三维映射系数表,包括:5 . The high-precision three-dimensional reconstruction method based on a large depth of field according to claim 1 , wherein, in each area, the absolute phase distribution map of each pixel of the imaging device on the flat plate is obtained. 6 . The absolute phase in , and the three-dimensional mapping coefficient table of the corresponding area is established according to the mapping relationship between the three-dimensional information of each said flat plate and the absolute phase of the corresponding pixel point, including: 根据所述像素点对应的三维信息,按如下公式计算三维映射系数,并建立三维映射系数表:According to the three-dimensional information corresponding to the pixel points, the three-dimensional mapping coefficient is calculated according to the following formula, and a three-dimensional mapping coefficient table is established:
Figure FDA0003066797450000021
Figure FDA0003066797450000021
其中,αn,cX,bn,cY,cn和cZ为三维映射系数,N为多项式阶数,Ф为对应像素点的绝对相位。Among them, α n , c X , b n , c Y , c n and c Z are three-dimensional mapping coefficients, N is the polynomial order, and Ф is the absolute phase of the corresponding pixel point.
6.根据权利要求1所述的基于大景深的高精度三维重建方法,其特征在于,所述利用投影装置向被测物体投射目标图案,并通过成像装置采集被测物体的目标焦扫图像,并将所述目标焦扫图像进行去模糊处理,得到目标图像并计算所述目标图像的绝对相位分布图,包括:6. The high-precision three-dimensional reconstruction method based on a large depth of field according to claim 1, wherein the projection device is used to project the target pattern to the measured object, and the target focal scan image of the measured object is collected by the imaging device, Deblurring the target focal scan image to obtain a target image and calculate the absolute phase distribution of the target image, including: 将所述目标焦扫图像输入至积分点扩散函数进行解卷积操作,得到去模糊处理后的目标图像;Inputting the target focal scan image into the integral point spread function to perform a deconvolution operation to obtain a deblurred target image; 所述积分点扩散函数的计算公式如下:The calculation formula of the integral point spread function is as follows:
Figure FDA0003066797450000031
Figure FDA0003066797450000031
其中,r为物点成像在成像装置传感器平面上的弥散圆中心的距离;b0为控制电子变焦透镜的电流值在0时刻,物点成像在成像装置传感器平面上的弥散圆直径;b1为物点聚焦在成像装置传感器平面上的光斑直径;b2为控制电子变焦透镜的电流值在半个周期T时刻,物点成像在成像装置传感器平面上的弥散圆直径;C1和C2为两个常量。Among them, r is the distance from the center of the circle of confusion when the object point is imaged on the sensor plane of the imaging device; b 0 is the diameter of the circle of confusion when the current value of the control electronic zoom lens is 0, and the object point is imaged on the sensor plane of the imaging device; b 1 is the diameter of the light spot where the object point is focused on the sensor plane of the imaging device; b 2 is the diameter of the circle of confusion where the object point is imaged on the sensor plane of the imaging device at the time of half cycle T by controlling the current value of the electronic zoom lens; C 1 and C 2 for two constants.
7.根据权利要求1所述的基于大景深的高精度三维重建方法,其特征在于,所述获取所述目标图像每一个像素点在所述目标图像的绝对相位分布图的绝对相位,并根据所述绝对相位所属区域在对应区域的三维映射系数表中查找对应的三维映射系数,利用所述三维映射系数计算得到对应的空间三维点坐标,包括:7. The high-precision three-dimensional reconstruction method based on a large depth of field according to claim 1, wherein the acquiring the absolute phase of each pixel of the target image in the absolute phase distribution map of the target image, and according to The region to which the absolute phase belongs looks up the corresponding three-dimensional mapping coefficient in the three-dimensional mapping coefficient table of the corresponding region, and uses the three-dimensional mapping coefficient to calculate the corresponding three-dimensional point coordinates in space, including: 通过如下公式计算所述空间三维点坐标:The three-dimensional point coordinates in the space are calculated by the following formula:
Figure FDA0003066797450000032
Figure FDA0003066797450000032
其中,{an,bn,cn}为对应区域的三维映射系数,Ф为该像素点的绝对相位,N为多项式阶数。Among them, {a n , b n , c n } are the three-dimensional mapping coefficients of the corresponding area, Ф is the absolute phase of the pixel, and N is the polynomial order.
8.一种基于大景深的高精度三维重建装置,其特征在于,包括:8. A high-precision three-dimensional reconstruction device based on a large depth of field, characterized in that, comprising: 区域划分单元,用于对大景深测量场景进行区域划分;The area division unit is used to divide the area of the large depth of field measurement scene; 标定数据获取单元,用于利用三维测量系统对划分出的每一个区域进行双目视觉立体标定,得到标定数据;其中,所述三维测量系统包括成像装置和投影装置;A calibration data acquisition unit, configured to perform binocular stereo calibration on each of the divided regions by using a 3D measurement system to obtain calibration data; wherein the 3D measurement system includes an imaging device and a projection device; 三维信息获取单元,用于在不同区域内利用投影装置向处于不同位置时的平面平板投射指定图案,并通过成像装置采集所述平面平板在不同位置时的平板图像,计算得到所述平面平板在不同位置时的绝对相位分布图,并根据所述标定数据计算得到所述平面平板在不同位置时的三维信息;A three-dimensional information acquisition unit is used to project a specified pattern on a flat plate at different positions by using a projection device in different areas, and collect the flat plate images of the flat plate in different positions through an imaging device, and calculate the flat plate at different positions. The absolute phase distribution diagram at different positions, and the three-dimensional information of the flat plate at different positions is obtained by calculating according to the calibration data; 三维映射系数表获取单元,用于在每一个区域内,获取所述成像装置每一个像素点在所述平面平板的绝对相位分布图中的绝对相位,并根据每个所述平面平板的三维信息与对应像素点的绝对相位之间的映射关系建立对应区域的三维映射系数表;A three-dimensional mapping coefficient table acquiring unit, configured to acquire, in each region, the absolute phase of each pixel of the imaging device in the absolute phase distribution map of the plane plate, and according to the three-dimensional information of each plane plate A three-dimensional mapping coefficient table of the corresponding area is established with the mapping relationship between the absolute phases of the corresponding pixel points; 目标焦扫图像获取单元,用于利用投影装置向被测物体投射目标图案,并通过成像装置采集被测物体的目标焦扫图像,并将所述目标焦扫图像进行去模糊处理,得到目标图像并计算所述目标图像的绝对相位分布图;The target focal scan image acquisition unit is used to project the target pattern to the measured object by using the projection device, collect the target focal scan image of the measured object through the imaging device, and perform deblurring processing on the target focal scan image to obtain the target image and calculate the absolute phase distribution map of the target image; 空间三维点坐标获取单元,用于获取所述目标图像每一个像素点在所述目标图像的绝对相位分布图的绝对相位,并根据所述绝对相位所属区域在对应区域的三维映射系数表中查找对应的三维映射系数,利用所述三维映射系数计算得到对应的空间三维点坐标。A spatial three-dimensional point coordinate obtaining unit, used to obtain the absolute phase of each pixel of the target image in the absolute phase distribution map of the target image, and look up the three-dimensional mapping coefficient table of the corresponding area according to the area to which the absolute phase belongs Corresponding three-dimensional mapping coefficients are calculated by using the three-dimensional mapping coefficients to obtain corresponding three-dimensional point coordinates in space. 9.一种计算机设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如权利要求1至7中任一项所述的基于大景深的高精度三维重建方法。9. A computer device comprising a memory, a processor and a computer program stored on the memory and running on the processor, wherein the processor implements the computer program as claimed in the claims The high-precision three-dimensional reconstruction method based on a large depth of field according to any one of 1 to 7. 10.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,所述计算机程序当被处理器执行时使所述处理器执行如权利要求1至7任一项所述的基于大景深的高精度三维重建方法。10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program, and when executed by a processor, the computer program causes the processor to execute any one of claims 1 to 7 The high-precision three-dimensional reconstruction method based on large depth of field described in item.
CN202110529545.1A 2021-05-14 2021-05-14 High-precision three-dimensional reconstruction method and device based on large depth of field and related components thereof Active CN113160393B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110529545.1A CN113160393B (en) 2021-05-14 2021-05-14 High-precision three-dimensional reconstruction method and device based on large depth of field and related components thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110529545.1A CN113160393B (en) 2021-05-14 2021-05-14 High-precision three-dimensional reconstruction method and device based on large depth of field and related components thereof

Publications (2)

Publication Number Publication Date
CN113160393A true CN113160393A (en) 2021-07-23
CN113160393B CN113160393B (en) 2023-08-04

Family

ID=76875231

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110529545.1A Active CN113160393B (en) 2021-05-14 2021-05-14 High-precision three-dimensional reconstruction method and device based on large depth of field and related components thereof

Country Status (1)

Country Link
CN (1) CN113160393B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113989517A (en) * 2021-11-01 2022-01-28 西北工业大学 An image processing method, device and electronic device
CN115546285A (en) * 2022-11-25 2022-12-30 南京理工大学 3D Measurement Method of Large Depth of Field Fringe Projection Based on Point Spread Function Calculation

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106767405A (en) * 2016-12-15 2017-05-31 深圳大学 The method and device of the quick corresponding point matching of phase mapping assist three-dimensional imaging system
CN107358631A (en) * 2017-06-27 2017-11-17 大连理工大学 A kind of binocular vision method for reconstructing for taking into account three-dimensional distortion
CN110477936A (en) * 2019-08-20 2019-11-22 新里程医用加速器(无锡)有限公司 Beam-defining clipper scaling method, device, equipment and the medium of radiation imaging system
CN111649691A (en) * 2020-03-06 2020-09-11 福州大学 Digital fringe projection 3D imaging system and method based on single pixel detector

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106767405A (en) * 2016-12-15 2017-05-31 深圳大学 The method and device of the quick corresponding point matching of phase mapping assist three-dimensional imaging system
CN107358631A (en) * 2017-06-27 2017-11-17 大连理工大学 A kind of binocular vision method for reconstructing for taking into account three-dimensional distortion
CN110477936A (en) * 2019-08-20 2019-11-22 新里程医用加速器(无锡)有限公司 Beam-defining clipper scaling method, device, equipment and the medium of radiation imaging system
CN111649691A (en) * 2020-03-06 2020-09-11 福州大学 Digital fringe projection 3D imaging system and method based on single pixel detector

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113989517A (en) * 2021-11-01 2022-01-28 西北工业大学 An image processing method, device and electronic device
CN115546285A (en) * 2022-11-25 2022-12-30 南京理工大学 3D Measurement Method of Large Depth of Field Fringe Projection Based on Point Spread Function Calculation

Also Published As

Publication number Publication date
CN113160393B (en) 2023-08-04

Similar Documents

Publication Publication Date Title
CN111750806B (en) A multi-view three-dimensional measurement system and method
CN113205593B (en) A three-dimensional reconstruction method of highly reflective surface structured light field based on point cloud adaptive repair
CN106767533B (en) Efficient phase-three-dimensional mapping method and system based on fringe projection technology of profiling
CN110207614B (en) A high-resolution and high-precision measurement system and method based on bi-telecentric camera matching
CN104061879B (en) A kind of structural light three-dimensional face shape vertical survey method continuously scanned
CN108020175B (en) A multi-grating projection binocular vision tongue surface three-dimensional overall imaging method
CN115775303B (en) A 3D reconstruction method for highly reflective objects based on deep learning and illumination model
WO2020199439A1 (en) Single- and dual-camera hybrid measurement-based three-dimensional point cloud computing method
CN103994732B (en) A kind of method for three-dimensional measurement based on fringe projection
Gao et al. Stereo camera calibration for large field of view digital image correlation using zoom lens
CN111238403A (en) Three-dimensional reconstruction method and device based on light field sub-aperture stripe image
US11512946B2 (en) Method and system for automatic focusing for high-resolution structured light 3D imaging
JP2013254097A (en) Image processing apparatus, and method and program for controlling the same
CN115546285B (en) Large-depth-of-field stripe projection three-dimensional measurement method based on point spread function calculation
CN117346694B (en) Detection method and detection system for composite surface type sample
CN109084688A (en) A kind of binocular distance measurement method based on varifocal camera
Cheng et al. A practical micro fringe projection profilometry for 3-D automated optical inspection
Guo et al. High-quality defocusing phase-shifting profilometry on dynamic objects
CN114792345B (en) Calibration method based on monocular structured light system
CN106468562B (en) A Radial Chromatic Aberration Calibration Method for Color Cameras Based on Absolute Phase
CN114264253B (en) Device and method for non-contact measurement of three-dimensional profile of high-temperature object
CN113251953B (en) Mirror included angle measuring device and method based on stereo deflection technology
CN113160393B (en) High-precision three-dimensional reconstruction method and device based on large depth of field and related components thereof
Chen et al. Finding optimal focusing distance and edge blur distribution for weakly calibrated 3-D vision
CN118533093A (en) A three-dimensional measurement method with large depth of field based on electronically controlled lens

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant