[go: up one dir, main page]

CN107330930A - Depth of 3 D picture information extracting method - Google Patents

Depth of 3 D picture information extracting method Download PDF

Info

Publication number
CN107330930A
CN107330930A CN201710502470.1A CN201710502470A CN107330930A CN 107330930 A CN107330930 A CN 107330930A CN 201710502470 A CN201710502470 A CN 201710502470A CN 107330930 A CN107330930 A CN 107330930A
Authority
CN
China
Prior art keywords
pixel
formula
image
depth
plane
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
CN201710502470.1A
Other languages
Chinese (zh)
Other versions
CN107330930B (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.)
Jinjiang Tide Photoelectric Technology Co Ltd
University of Electronic Science and Technology of China
Original Assignee
Jinjiang Tide Photoelectric Technology Co Ltd
University of Electronic Science and Technology of China
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 Jinjiang Tide Photoelectric Technology Co Ltd, University of Electronic Science and Technology of China filed Critical Jinjiang Tide Photoelectric Technology Co Ltd
Priority to CN201710502470.1A priority Critical patent/CN107330930B/en
Publication of CN107330930A publication Critical patent/CN107330930A/en
Application granted granted Critical
Publication of CN107330930B publication Critical patent/CN107330930B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/50Depth or shape recovery
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

本申请公开了一种三维对象深度提取方法,解决目前3D图像深度信息提取过程中算法过于复杂的问题。该三维对象深度提取方法,通过计算二维平面图像中每个元素图像中相邻像素的相似度,进而得到所述像素的深度。该提取方法是一种快速准确的三维物体深度提取方法,考虑了综合成像(II)和合成孔径积分成像,通过假设3D对象是由许多方面构成的表面,基于Patch‑Match算法开发了深度提取的数学框架。本申请还公开了采用上述三维对象深度提取方法的装置。

The present application discloses a method for extracting the depth of a three-dimensional object, which solves the problem that the algorithm is too complicated in the process of extracting the depth information of the current 3D image. The method for extracting the depth of a three-dimensional object obtains the depth of the pixel by calculating the similarity of adjacent pixels in each element image in the two-dimensional plane image. This extraction method is a fast and accurate method for depth extraction of 3D objects, considering integrated imaging (II) and synthetic aperture integral imaging, by assuming that a 3D object is a surface composed of many aspects, a depth extraction method is developed based on the Patch‑Match algorithm Mathematical frame. The present application also discloses a device using the method for extracting the depth of a three-dimensional object.

Description

三维图像深度信息提取方法3D Image Depth Information Extraction Method

技术领域technical field

本发明涉及光学信息工程领域的信息提取技术,特别涉及三维图像深度信息提取的技术。The invention relates to an information extraction technology in the field of optical information engineering, in particular to a technology for extracting depth information of a three-dimensional image.

背景技术Background technique

作为下一代显示技术,近年来三维(3D)成像技术的飞速发展。综合成像(II)(英文为:Integrated imaging(II))涉及其高分辨率和全视差。它与传统的图像处理技术(如超分辨率和图像匹配)兼容。为了实现3D成像和显示。综合成像(II)需要来自3D对象(称为元素图像)的不同视角,这些对象通常由通用综合成像(II)系统中的小透镜阵列拾取。由于使用标准2D图像,可以使用具有小透镜阵列或廉价成像器阵列的单个便宜的相机来构建多尺度3D成像系统。现有技术已经实现了许多研究成果,包括3D显示和自动目标识别。As a next-generation display technology, three-dimensional (3D) imaging technology has developed rapidly in recent years. Integrated imaging (II) (English: Integrated imaging (II)) involves its high resolution and full parallax. It is compatible with traditional image processing techniques such as super-resolution and image matching. In order to realize 3D imaging and display. Integrated imaging (II) requires different perspectives from 3D objects (called elemental images), which are usually picked up by small lens arrays in general integrated imaging (II) systems. Due to the use of standard 2D images, multiscale 3D imaging systems can be constructed using a single inexpensive camera with an array of small lenses or an array of inexpensive imagers. Existing technologies have achieved many research results, including 3D display and automatic object recognition.

深度提取被称为综合成像(II)的最重要的问题之一。许多研究者已经注意到综合成像(II)的深度提取。然而,现有技术已经提出的方法存在的缺点是低分辨率元素图像或复杂的算法。Depth extraction is known as one of the most important problems in integrated imaging (II). Many researchers have paid attention to depth extraction for integrated imaging (II). However, the methods that have been proposed in the prior art suffer from low-resolution elemental images or complex algorithms.

发明内容Contents of the invention

根据本申请的一个方面,提出一种三维图像深度信息的提取方法,解决目前三维图像深度信息提取过程中算法过于复杂的问题。该提取方法是一种快速准确的三维物体深度提取方法,考虑了综合成像(II)和合成孔径积分成像(英文为:synthetic apertureintegral imaging),通过假设三维对象是由许多方面构成的表面,基于Patch-Match算法开发了深度提取的数学框架。According to one aspect of the present application, a method for extracting depth information of a three-dimensional image is proposed, which solves the problem that the algorithm is too complicated in the current process of extracting depth information of a three-dimensional image. This extraction method is a fast and accurate method for extracting the depth of three-dimensional objects. It considers integrated imaging (II) and synthetic aperture integral imaging (English: synthetic aperture integral imaging). By assuming that three-dimensional objects are surfaces composed of many aspects, based on Patch -Match algorithm develops a mathematical framework for deep extraction.

所述三维对象深度提取方法,通过计算二维平面图像中每个元素图像中相邻像素的相似度,进而得到所述像素的深度。The method for extracting the depth of a three-dimensional object obtains the depth of the pixel by calculating the similarity of adjacent pixels in each element image in the two-dimensional plane image.

优选地,在计算二维平面图像中每个元素图像中像素的相似度时,假设相邻像素在同一平面上,并用多个小平面对表面进行建模。Preferably, when calculating the similarity of pixels in each element image in a two-dimensional plane image, it is assumed that adjacent pixels are on the same plane, and multiple small planes are used to model the surface.

优选地,所述计算二维平面图像中每个元素图像中相邻像素的相似度,采用相邻像素传播和随机优化的多循环算法。Preferably, the calculation of the similarity of adjacent pixels in each element image in the two-dimensional plane image adopts a multi-cycle algorithm of adjacent pixel propagation and random optimization.

优选地,包括将横向像素初始化为随机平面和迭代计算相邻像素的相似度的步骤。Preferably, it includes the steps of initializing the horizontal pixels to a random plane and iteratively calculating the similarity of adjacent pixels.

进一步优选地,所述将横向像素初始化为随机平面,包括步骤:Further preferably, the initialization of the horizontal pixels to a random plane includes the steps of:

将横向像素初始化为随机平面;Initialize horizontal pixels to a random plane;

每个像素的初始深度设定为随机值,通过每个像素的表面的法线矢量被设置为随机单位向量。The initial depth of each pixel is set to a random value, and the normal vector of the surface through each pixel is set to a random unit vector.

进一步优选地,所述将横向像素初始化为随机平面,包括如下过程:Further preferably, said initializing the horizontal pixels as random planes includes the following process:

通过所述横向像素的深度坐标的平面,由式(5)表示,The plane passing through the depth coordinates of the horizontal pixels is represented by formula (5),

z=f1▽px+f2▽py+f3 式(5)z=f 1 ▽p x +f 2 ▽p y +f 3 formula (5)

其中,z为所述横向像素的深度坐标,和px和py为随机平面,f 1、f2和f 3分别如式(6-1)、式(6-2)和式(6-3)所示,Wherein, z is the depth coordinate of the horizontal pixel, and p x and p y are random planes, and f 1 , f 2 and f 3 are as in formula (6-1), formula (6-2) and formula (6- 3) as shown,

f1=-n1/n3 式(6-1)f 1 =-n 1 /n 3 formula (6-1)

f2=-n2/n3式(6-2)f 2 =-n 2 /n 3 formula (6-2)

f3=(n1·x0+n2·y0+n3·z0)/n3 式(6-3)f 3 =(n 1 ·x 0 +n 2 ·y 0 +n 3 ·z 0 )/n 3 Formula (6-3)

式(6-1)、式(6-2)和式(6-3)中,n1、n2和n3是标量、是由如式(7)所示的数值向量表示最小聚合成本所在的所有可能平面,x0和y0分别为初始化的所述横向像素的坐标数值,z0为初始化的所述横向像素的初始深度值,In formula (6-1), formula (6-2) and formula (6-3), n 1 , n 2 and n 3 are scalars, which are numerical vectors shown in formula (7) Indicates all possible planes where the minimum aggregation cost is located, x 0 and y 0 are the coordinate values of the initialized horizontal pixels respectively, z 0 is the initial depth value of the initialized horizontal pixels,

式(7)中m由式(8)提供,In formula (7), m is provided by formula (8),

式(8)中,w用于实现自适应加权,w由式(9)提供;E表示相似性计算因素,E由式(10)提供;▽表示梯度值,Wp表示集中在p的一个方形窗口,In formula (8), w is used to implement adaptive weighting, and w is provided by formula (9); E represents the similarity calculation factor, and E is provided by formula (10); ▽ represents the gradient value, and W p represents a square window,

式(9)中,||Ip-Iq||表示两相邻像素p和q间的距离,p为横向像素,q为与p在同一平面内的相邻像素,In formula (9), ||I p -I q || represents the distance between two adjacent pixels p and q, p is a horizontal pixel, q is an adjacent pixel in the same plane as p,

E=α||Ii-Ij||+(1-α)||▽Ii-▽Ij|| 式(10)E=α||I i -I j ||+(1-α)||▽I i -▽I j || Formula (10)

式(10)中,I是元素图像中像素的强度,下标i,j是元素图像的索引,Ii,Ij分别表示第i,第j个元素图像中的相应像素的强度,Ii和Ij将投射到相同的空间点,Ii和Ij的坐标由式(11)计算得到,||Ii-Ij||为RGB空间中的Ii和Ij的颜色的曼哈顿距离,▽Ii和▽Ij是像素的灰度值梯度,||▽Ii-▽Ij||表示在Ii和Ij计算的灰度梯度的绝对差,α是没有单位的权重因子,用于平衡颜色和渐变项的影响;In formula (10), I is the intensity of the pixel in the element image, the subscripts i and j are the index of the element image, I i , I j represent the intensity of the corresponding pixel in the i-th and j-th element image respectively, I i and I j will be projected to the same space point, the coordinates of I i and I j are calculated by formula (11), ||I i -I j || is the Manhattan distance of the colors of I i and I j in RGB space , ▽I i and ▽I j are the gray value gradient of the pixel, ||▽I i -▽I j || represents the absolute difference of the gray gradient calculated at I i and I j , α is the weight factor without unit , used to balance the influence of color and gradient items;

式(11)中,ui是每个元素图像中对应于坐标为y和z的点的像素的局部坐标。In Equation (11), u i are the local coordinates of the pixel corresponding to the point with coordinates y and z in each element image.

作为一个具体的实施方式,所述方法在使用综合成像(II)系统的计算机上执行。As a specific embodiment, the method is executed on a computer using an integrated imaging (II) system.

进一步优选地,所述迭代计算相邻像素的相似度,包括步骤:Further preferably, the iterative calculation of the similarity of adjacent pixels comprises the steps of:

a、初始化一个随机平面内的一个横向像素并计算其深度坐标和向量值,计算其聚合成本,将此聚合成本作为参考聚合成本;a. Initialize a horizontal pixel in a random plane and calculate its depth coordinate and vector value, calculate its aggregation cost, and use this aggregation cost as a reference aggregation cost;

b、计算与步骤a中横向像素在同一平面内的任意一相邻像素的聚合成本;b. Calculate the aggregation cost of any adjacent pixel in the same plane as the horizontal pixel in step a;

c、比较步骤a中参考聚合成本与步骤b中相邻像素的聚合成本;c. comparing the reference aggregation cost in step a with the aggregation cost of adjacent pixels in step b;

d.将步骤c中比较小的聚合成本对应像素作为新的参考值;d. Use the pixel corresponding to the relatively small aggregation cost in step c as a new reference value;

e.将步骤d中新的参考值对应像素设为与该对比参考值的对应像素左上相邻;e. Set the pixel corresponding to the new reference value in step d to be adjacent to the upper left of the corresponding pixel of the comparison reference value;

f.设定条件:步骤d中新的参考值对应深度值在最大允许范围内;f. Setting conditions: the depth value corresponding to the new reference value in step d is within the maximum allowable range;

g.如果步骤f条件成立,则循环执行步骤a到步骤f;g. If the condition of step f is established, execute step a to step f in a loop;

l.步骤f条件不成立,将最后一次循环步骤e中作为图像最左边像素;l. The condition of step f is not established, and the last loop step e is used as the leftmost pixel of the image;

m.在步骤l的基础上,图像右下进行下降偶次迭代;m. On the basis of step l, the lower right of the image is performed to descend even iterations;

n.根据步骤m的迭代次数计算每个像素的计算次数。n. Calculate the number of calculations for each pixel according to the number of iterations in step m.

进一步优选地,所述迭代计算相邻像素的相似度,包括空间传播和平面精修的步骤;Further preferably, the iterative calculation of the similarity of adjacent pixels includes the steps of spatial propagation and plane refinement;

所述空间传播的步骤中,相邻像素点设定为在同一个平面上,首先由式(8)评估不同情况的成本m,In the step of spatial propagation, adjacent pixel points are set to be on the same plane, and the cost m of different situations is first evaluated by formula (8),

式(8)中,p表示当前像素,fp是其对应的平面的向量,q是p的相邻像素,在p(x0,y0)下分别用fp和fq计算,以评估这两种情况的成本;检查条件如式(12)所示,In formula (8), p represents the current pixel, f p is the vector of its corresponding plane, and q is the adjacent pixel of p, which is calculated by f p and f q respectively under p(x 0 , y 0 ) to evaluate The cost of these two cases; the check condition is shown in formula (12),

m(x0,y0,fp')<m(x0,y0,fp); 式(12)m(x 0 , y 0 , f p ')<m(x 0 , y 0 , f p ); formula (12)

式(12)中的和分别由式(8)得到;and in formula (12) are respectively obtained by formula (8);

如果式(12)所示的表达式成立,则fq被接受为p的新向量,即fp=fqIf the expression shown in formula (12) is established, then f q is accepted as a new vector of p, i.e. f p =f q ;

在奇数迭代中,q是左边和上边界;In odd iterations, q is the left and upper bounds;

在偶数迭代中,q是右边界和下边界;In even iterations, q is the right and bottom bounds;

所述平面精修的步骤中,将fp转换为法向量np,两个参数▽z和▽n被定义为分别限制z0和n的最大允许变化,z0'计算为z0'=z0+▽z,其中▽z位于[-▽zmax,▽zmax],并且n'=u(n+▽n),u()表示计算单位向量,▽n位于[-▽nmax,▽nmax];In the step of plane refinement, f p is converted into normal vector n p , two parameters ▽z and ▽n are defined to limit the maximum allowable variation of z 0 and n respectively, and z 0 ' is calculated as z 0 '= z 0 +▽z, where ▽z is located at [-▽z max , ▽z max ], and n'=u(n+▽n), u() represents the calculation unit vector, ▽n is located at [-▽n max , ▽ nmax ];

最后,通过p和n'得到一个新的fp',如果m(x0,y0,fp')<m(x0,y0,fp),则fp=fp';Finally, get a new f p ' through p and n', if m(x 0 , y 0 , f p ')<m(x 0 , y 0 , f p ), then f p =f p ';

所述平面精修的步骤中,从设置▽zmax=maxdisp/2开始,其中maxdisp是允许的最大视差,▽nmax=1,每次细化后,参数将更新为▽zmax=▽zmax/2、▽nmax=▽nmax/2;直到▽zmax<resolution/2,得到最小化的分辨率;对于奇数迭代,从图像的左侧开始,向右下进行偶数迭代;In the step of plane refinement, start from setting ▽z max =maxdisp/2, where maxdisp is the maximum allowable parallax, ▽n max =1, after each refinement, the parameter will be updated to ▽z max =▽z max /2, ▽n max =▽n max /2; until ▽z max <resolution/2, the minimized resolution is obtained; for odd iterations, start from the left side of the image and proceed to even iterations down to the right;

迭代后获得相邻像素的相似度,进而得到所述三维对象的深度。After iteration, the similarity of adjacent pixels is obtained, and then the depth of the three-dimensional object is obtained.

进一步优选地,z0以固定值初始化为所有像素,并且在迭代之前添加精修步骤。It is further preferred that z 0 is initialized to a fixed value for all pixels, and a refinement step is added before the iteration.

根据本申请的一个方面,提供一种由二维图片获得三维图像信息的装置,解决目前3D图像深度信息提取过程中算法过于复杂的问题。该由二维图片获得三维图像信息的装置是一种快速准确的三维物体深度提取装置,考虑了综合成像(II)和合成孔径积分成像(英文为:synthetic aperture integral imaging),通过假设3D对象是由许多方面构成的表面,基于Patch-Match算法开发了深度提取的数学框架。According to one aspect of the present application, a device for obtaining 3D image information from a 2D image is provided, which solves the problem that algorithms are too complicated in the current 3D image depth information extraction process. The device for obtaining three-dimensional image information from two-dimensional pictures is a fast and accurate three-dimensional object depth extraction device, which considers comprehensive imaging (II) and synthetic aperture integral imaging (English: synthetic aperture integral imaging), by assuming that the 3D object is A surface composed of many facets, a mathematical framework for depth extraction was developed based on the Patch-Match algorithm.

所述由二维图片获得三维图像信息的装置包括图片采集单元,图像存储单元和图像处理单元;The device for obtaining three-dimensional image information from two-dimensional pictures includes a picture acquisition unit, an image storage unit and an image processing unit;

所述图片采集单元和图像存储单元电连接,所述图像存储单元和图像处理单元电连接;The picture acquisition unit is electrically connected to the image storage unit, and the image storage unit is electrically connected to the image processing unit;

所述图像处理单元采用上述所述三维对象深度提取方法中的至少一种,获得二维图片中对象的深度信息,建立三维图像。The image processing unit adopts at least one of the above-mentioned 3D object depth extraction methods to obtain the depth information of the object in the 2D picture and create a 3D image.

本发明所述技术方案的有益效果包括但不限于:The beneficial effects of the technical solution of the present invention include but are not limited to:

(1)本申请提出了一种三维对象深度提取的新计算方法,该方法计算每个元素图像中像素的相似度,同时将其投影到可能的深度。(1) This application proposes a new computational method for depth extraction of 3D objects, which computes the similarity of pixels in each element image while projecting them to possible depths.

(2)本申请提供的三维图像深度信息的提取方法,考虑了表面的连续性,以提高分辨率。(2) The method for extracting the depth information of the 3D image provided by this application takes into account the continuity of the surface to improve the resolution.

(3)本申请提供的三维图像深度信息的提取方法,用于综合成像(II)系统中,使用补丁匹配方法,大大减少计算量,加快计算速度,可以使应用了本发明算法的设备更加普遍化。(3) The method for extracting the depth information of the three-dimensional image provided by the application is used in the comprehensive imaging (II) system, and the patch matching method is used to greatly reduce the amount of calculation and speed up the calculation, which can make the equipment applied to the algorithm of the present invention more common change.

附图说明Description of drawings

图1是本发明3D图像深度信息提取方法原理示意图;其中图1(a)是综合成像(II)的拾取部分的示意图;图1(b)是综合成像(II)的投影部分示意图。Fig. 1 is a schematic diagram of the principle of the 3D image depth information extraction method of the present invention; wherein Fig. 1 (a) is a schematic diagram of the picking part of the comprehensive imaging (II); Fig. 1 (b) is a schematic diagram of the projection part of the comprehensive imaging (II).

图2是在体表面和自由空间体素的综合成像(II)系统中光传播图。Figure 2 is a diagram of light propagation in an integrated imaging (II) system of body surface and free space voxels.

图3是图像信息提取的3D对象,其中图3(a)是采用综合成像(II)进行成像的对象;图3(b)是采用合成孔径积分成像进行成像的对象。Fig. 3 is a 3D object extracted from image information, wherein Fig. 3(a) is an object imaged by comprehensive imaging (II); Fig. 3(b) is an object imaged by synthetic aperture integral imaging.

图4是经过数学软件技术,采用本申请方法成像结果与采用现有技术方法成像结果的对比;其中图4(a)为采用微针的深度信息提取方法得到的结果;图4(b)为采用折反射全向提取方法得到的结果;图4(c)为采用本发明所述方法得到的综合成像(II)结果;图4(d)为采用本发明所述方法得到的合成孔径积分成像结果。Fig. 4 is a comparison between the imaging result of the application method and the imaging result of the prior art method through mathematical software technology; wherein Fig. 4 (a) is the result obtained by using the microneedle depth information extraction method; Fig. 4 (b) is Adopt the result that the catadioptric omnidirectional extraction method obtains; Fig. 4 (c) is the comprehensive imaging (II) result that adopts the method of the present invention to obtain; Fig. 4 (d) is the synthetic aperture integral imaging that adopts the method of the present invention to obtain result.

图5是降低白噪音影响后的结果对比;其中图5(a)是降低白噪音影响前的综合成像(II)结果;图5(b)是降低白噪音影响后的综合成像(II)结果;图5(c)是降低白噪音影响前的合成孔径积分成像结果;图5(d))是降低白噪音影响后的合成孔径积分成像结果。Figure 5 is a comparison of the results after reducing the influence of white noise; among them, Figure 5(a) is the result of comprehensive imaging (II) before reducing the influence of white noise; Figure 5(b) is the result of comprehensive imaging (II) after reducing the influence of white noise ; Figure 5(c) is the synthetic aperture integral imaging result before reducing the influence of white noise; Figure 5(d)) is the synthetic aperture integral imaging result after reducing the influence of white noise.

图6是采用本发明3D图像深度信息提取方法的背面投影图;其中图6(a)是图3(a)采用本发明3D图像深度信息提取方法的背面投影图;图6(b)是图3(b)采用本发明3D图像深度信息提取方法的背面投影图。Fig. 6 is the rear projection diagram adopting the 3D image depth information extraction method of the present invention; Wherein Fig. 6 (a) is Fig. 3 (a) adopts the rear projection diagram of the 3D image depth information extraction method of the present invention; Fig. 6 (b) is a diagram 3(b) The back projection diagram of the 3D image depth information extraction method of the present invention.

具体实施方式detailed description

下面结合实施例,详细描述本发明的技术方案。The technical solution of the present invention will be described in detail below in conjunction with the embodiments.

本发明提出了一种用于综合成像(II)系统中3D对象深度提取的新计算方法,计算每个元素图像中像素的相似度,同时将其投影到可能的深度。还考虑到表面的连续性,以提高分辨率。并使用补丁匹配方法加快计算速度。The present invention proposes a new calculation method for depth extraction of 3D objects in an integrated imaging (II) system, calculating the similarity of pixels in each element image while projecting them to possible depths. Surface continuity is also taken into account for improved resolution. And use the patch matching method to speed up the computation.

图1(a)和图1(b)为综合成像(II)的原理示意图。其中图1(a)为综合成像(II)的拾取部分的示意图,图1(b)为综合成像(II)的投影部分示意图。Figure 1(a) and Figure 1(b) are schematic diagrams of the principle of integrated imaging (II). 1(a) is a schematic diagram of the pick-up part of the comprehensive imaging (II), and FIG. 1(b) is a schematic diagram of the projection part of the comprehensive imaging (II).

参照图1(a),字母A表示三维(3D)物体。Z(大写字母)表示物体和小透镜阵列之间的距离,g表示透镜阵列与像面之间的距离。来自3D物体的光线的强度和方向由小透镜记录在不同的位置。图1(a)中也显示了不同的元素图像,见右侧从上到下的三个图像。Referring to Figure 1(a), the letter A denotes a three-dimensional (3D) object. Z (capital letter) represents the distance between the object and the lenslet array, and g represents the distance between the lens array and the image plane. The intensity and direction of the light rays from the 3D object are recorded at different positions by the lenslets. Different element images are also shown in Figure 1(a), see the three images from top to bottom on the right.

在如图1(b)所示的投影部分中,每个元素图像通过相应的针孔投影到目标空间。在图1(b)中,z(小写字母)表示投影距离,g表示图像与针孔之间的距离。并且这些投影图像在重构平面中被放大了z/g的因子。最后,将这些放大的图像重叠并累积在输出平面的相应像素上。In the projection part as shown in Fig. 1(b), each element image is projected to the target space through the corresponding pinhole. In Figure 1(b), z (lowercase letter) represents the projection distance, and g represents the distance between the image and the pinhole. And these projected images are magnified by a factor of z/g in the reconstruction plane. Finally, these upscaled images are overlaid and accumulated on the corresponding pixels of the output plane.

在图1(a)和图1(b)示出的系统中,投影距离z由实验者设置,因此,当投影距离z与其空间深度Z不匹配,投影图像是模糊的像素。因此,如果已知不同投影距离中的每个像素的模糊度,就可以计算相应的投影距离。In the systems shown in Fig. 1(a) and Fig. 1(b), the projection distance z is set by the experimenter, so when the projection distance z does not match its spatial depth Z, the projected images are blurred pixels. Therefore, if the blurriness of each pixel in different projection distances is known, the corresponding projection distances can be calculated.

图2是在体表面和自由空间体素的综合成像(II)系统中光传播图。图2显示的是本发明的方法的2D结构,显示的是3D空间中的y-z平面,成像对象被显示为左边的一个面。小透镜阵列在y轴上。而z轴是深度方向。每个小透镜的坐标标记为Si。成像对象平面被标记为u。u到小透镜阵列的距离是g。如图2所示,当将元素图像投影到z0平面时,得到的结果图像中的(y0,z0)对于其相应像素的高相似性将是清晰的。作为比较,当投影到z1平面时,(y1,z1)是模糊的,因为(y1,z1)处和(y0,z0)的像素来自对象u上不同部分,如图2中不同的颜色所示。对应于投影的每个像素的局部坐标点可以通过式(1)得到:Figure 2 is a diagram of light propagation in an integrated imaging (II) system of body surface and free space voxels. Fig. 2 shows the 2D structure of the method of the present invention, showing the yz plane in 3D space, and the imaging object is shown as a plane on the left. The lenslet array is on the y-axis. And the z axis is the depth direction. The coordinates of each lenslet are labeled S i . The imaged object plane is labeled u. The distance from u to the lenslet array is g. As shown in Fig. 2, when the elemental image is projected onto the z 0 plane, the high similarity of (y 0 , z 0 ) to its corresponding pixel in the resulting image will be clear. As a comparison, when projected onto the z 1 plane, (y 1 , z 1 ) is blurred because the pixels at (y 1 , z 1 ) and (y 0 , z 0 ) come from different parts of the object u, as shown in 2 shown in different colors. The local coordinate point corresponding to each pixel of the projection can be obtained by formula (1):

其中ui是每个元素图像中对应于点(y,z)的像素的局部坐标。g是图像平面和小透镜阵列之间的距离。si是小透镜的坐标,即小透镜的指数。利用该等式,可以通过等式(1)来估计投影到相同点的像素的相似度。where u i are the local coordinates of the pixel corresponding to point (y, z) in each element image. g is the distance between the image plane and the lenslet array. s i are the coordinates of the lenslet, that is, the index of the lenslet. Using this equation, the similarity of pixels projected to the same point can be estimated by equation (1).

E=α||Ii-Ij||+(1-α)||▽Ii-▽Ij|| 式(2)E=α||I i -I j ||+(1-α)||▽I i -▽I j || Formula (2)

在这个方程中,E是相似性的评估因子。E越小像素越相似。I是元素图像中像素的强度。下标i,j是元素图像的索引。Ii,Ij分别表示第i,第j个元素图像中的相应像素。Ii和Ij将投射到相同的空间点,它们的坐标由等式(1)计算得到。||Ii-Ij||计算RGB空间中的Ii和Ij的颜色的L1距离(即曼哈顿距离)。▽I是像素的灰度值梯度;||▽Ii-▽Ij||表示在Ii和Ij计算的灰度梯度的绝对差。α是没有单位的权重因子,是用户定义的参数,用于平衡颜色和渐变项的影响。从该等式可以计算投影到相同空间位置的像素之间的相似度。In this equation, E is the evaluation factor of similarity. The smaller E is, the more similar the pixels are. I is the intensity of the pixel in the element image. The subscripts i, j are the indices of the element image. I i , I j represent corresponding pixels in the i-th and j-th element images respectively. I i and I j will project to the same spatial point, and their coordinates are calculated by equation (1). ||I i -I j || Calculate the L1 distance (ie Manhattan distance) of the colors of I i and I j in the RGB space. ▽I is the gray value gradient of the pixel; ||▽Ii-▽Ij|| represents the absolute difference of the gray gradient calculated at I i and I j . α is a weight factor without units and is a user-defined parameter to balance the influence of color and gradient terms. From this equation the similarity between pixels projected to the same spatial location can be calculated.

因此,在3D模式中,可以通过找到Z来提取具有横向点(x,y)的成像对象表面的深度,使得E(x,y,z)在Z=[Z min,Z max]的范围内最小化。这个假设在数学上的表达如式(3)所示:Therefore, in 3D mode, the depth of the imaged object surface with a lateral point (x, y) can be extracted by finding Z such that E(x, y, z) is in the range Z = [Z min, Z max] minimize. The mathematical expression of this assumption is shown in formula (3):

可以通过检查所有可能的z来找到答案。然而,利用这种方式发现的可能的z是离散的,受到分辨率的限制。这种方式忽略了表面的连续性,并且在计算上是密集的,要获得亚分辨效果(sub-resolution effect),需要更多的表面信息。本发明考虑了物体表面的连续性。相邻的像素假设在同一平面上,所以本发明用很多小平面对表面进行建模。The answer can be found by examining all possible z. However, the possible z's discovered in this way are discrete and limited by resolution. This approach ignores the continuity of the surface and is computationally intensive, requiring more surface information to obtain sub-resolution effects. The present invention takes into account the continuity of the surface of the object. Adjacent pixels are assumed to be on the same plane, so the present invention models the surface with many facets.

通过(x0,y0,z0)的表面可以表示为式(4):The surface passing through (x 0 , y 0 , z 0 ) can be expressed as formula (4):

n1x+n2y+n3z=n1x0+n2y0+n3z0 式(4)n 1 x+n 2 y+n 3 z=n 1 x 0 +n 2 y 0 +n 3 z 0 Formula (4)

n(n1,n2,n3)是法向量。在本发明,横向像素被称为p(px,py),z是要求的深度坐标,所以可以转换式(4),得到式(5)和(6):n(n 1 , n 2 , n 3 ) is a normal vector. In the present invention, the horizontal pixel is called p(p x , p y ), and z is the required depth coordinate, so formula (4) can be transformed to obtain formulas (5) and (6):

z=f1▽px+f2▽py+f3 式(5)z=f 1 ▽p x +f 2 ▽p y +f 3 formula (5)

f1=-n1/n3,f2=-n2/n3,f3=(n1·x0+n2·y0+n3·z0)/n3 式(6)f 1 =-n 1 /n 3 , f 2 =-n 2 /n 3 , f 3 =(n 1 x 0 +n 2 y 0 +n 3 z 0 )/n 3 Formula (6)

因此,找到z的问题变为找到f,而向量f是所有可能的平面中的最小聚合匹配成本之一,可以表达为式(7):Therefore, the problem of finding z becomes finding f, and the vector f is one of the minimum aggregated matching costs in all possible planes, which can be expressed as Equation (7):

其中F表示大小无穷大的所有向量的集合。根据向量f匹配p(px,py)的聚合成本m通过式(8)和式(9)计算得到:where F represents the set of all vectors of infinite size. The aggregation cost m of matching p(p x , p y ) according to the vector f is calculated by formula (8) and formula (9):

式(9)中,wp表示以p(px,py)为中心的平方窗口;w用于实现自适应权值立体匹配,可以克服边缘增殖问题;γ是用户定义的参数;Ip表示图像p的像素强度;Iq表示图像q的像素强度。附近的像素的E也用相同的向量f计算,揭示它们在同一平面中。所有向量F的集合是无限的标签空间,不能采用通常的做法,仅简单地检查所有可能的标签。In formula (9), w p represents a square window centered on p(p x , p y ); w is used to realize adaptive weight stereo matching, which can overcome the problem of edge proliferation; γ is a user-defined parameter; I p Indicates the pixel intensity of image p; I q indicates the pixel intensity of image q. The E of nearby pixels is also computed with the same vector f, revealing that they are in the same plane. The set of all vectors F is an infinite label space, and the usual practice of simply checking all possible labels cannot be adopted.

本发明提出的3D图像深度信息提取方法,该方法基于Patch-Match,其基本思想是大多数相邻像素应该在同一平面。根据该假设,本发明开发了包含相邻像素传播和随机优化的多循环算法。The 3D image depth information extraction method proposed by the present invention is based on Patch-Match, and its basic idea is that most adjacent pixels should be on the same plane. Based on this assumption, the present invention develops a multi-loop algorithm involving neighbor pixel propagation and stochastic optimization.

基于上述分析,本发明提出的3D图像深度信息提取方法包括以下步骤:Based on the above analysis, the 3D image depth information extraction method proposed by the present invention comprises the following steps:

步骤1:初始化Step 1: Initialize

将横向像素p(x0,y0)初始化为随机平面;Initialize the horizontal pixel p(x 0 , y 0 ) as a random plane;

平面可以通过点和法向量来确定。每个像素的z0由随机值初始化,并且通过该像素的表面的法线矢量被设置为随机单位向量n(n1,n2,n3)。矢量f可以由正态n和点p(x0,y0,z0)导出。The plane can be determined by point and normal vector. Each pixel's z 0 is initialized with a random value, and the normal vector of the surface through that pixel is set to a random unit vector n(n 1 , n 2 , n 3 ). The vector f can be derived from the normal n and the point p(x 0 , y 0 , z 0 ).

该横向像素的深度坐标为z(x0,y0,z0),随机平面表示为p(px,py),通过z的平面可表示为:The depth coordinate of the horizontal pixel is z(x 0 , y 0 , z 0 ), the random plane is expressed as p(p x , p y ), and the plane passing through z can be expressed as:

z=f1▽px+f2▽py+f3 z=f 1 ▽p x +f 2 ▽p y +f 3

其中参见式(6),f1=-n1/n3f2=-n2/n3,f3=(n1·x0+n2·y0+n3·z0)/n3,n是标量,是数值向量表示最小聚合成本所在的所有可能平面, Wherein refer to formula (6), f 1 =-n 1 /n 3 f 2 =-n 2 /n 3 , f 3 =(n 1 ·x 0 +n 2 ·y 0 +n 3 ·z 0 )/n 3 , n is a scalar and a numeric vector Denotes all possible planes where the minimum aggregate cost lies,

该步骤中初始化的横向像素为p(x0,y0),其对应的深度值为z0,其聚合成本m为:The horizontal pixel initialized in this step is p(x 0 , y 0 ), its corresponding depth value is z0, and its aggregation cost m is:

其中,||Ip-Iq||表示两相邻像素p和q间的距离,p为横向像素,q为与p在同一平面内的相邻像素,w用于实现自适应加权,E表示相同的计算因素,▽表示梯度值,Wp表示一个方形窗口集中在p(px,py)。in, ||I p -I q || indicates the distance between two adjacent pixels p and q, p is a horizontal pixel, q is an adjacent pixel in the same plane as p, w is used to realize adaptive weighting, E means the same The calculation factor of , ▽ represents the gradient value, W p represents a square window centered on p(px, p y ).

相同计算因素E可表示为:The same calculation factor E can be expressed as:

E=α||Ii-Ij||+(1-α)||▽Ii-▽Ij E=α||I i -I j ||+(1-α)||▽I i -▽I j

其中,I是元素图像中像素的强度。下标i,j是元素图像的索引。Ii,Ij分别表示第i,第j个元素图像中的相应像素的强度。Ii和Ij将投射到相同的空间点,它们的坐标由等式(1)计算得到。即对应于投影的每个像素的局部坐标点为:where I is the intensity of the pixel in the element image. The subscripts i, j are the indices of the element image. I i , I j represent the intensity of the corresponding pixel in the i-th and j-th element images respectively. I i and I j will project to the same spatial point, and their coordinates are calculated by equation (1). That is, the local coordinate points corresponding to each pixel of the projection are:

其中ui是每个元素图像中对应于点(y,z)的像素的局部坐标。g是图像平面和小透镜阵列之间的距离(参见图1)。si是小透镜的坐标,即小透镜的指数。Ii和Ij可利用该公式求得。where u i are the local coordinates of the pixel corresponding to point (y, z) in each element image. g is the distance between the image plane and the lenslet array (see Figure 1). s i are the coordinates of the lenslet, that is, the index of the lenslet. I i and I j can be obtained using this formula.

||Ii-Ij||计算RGB空间中的Ii和Ij的颜色的L1距离(即曼哈顿距离)。▽I是像素的灰度值梯度;||▽Ii-▽Ij||表示在Ii和Ij计算的灰度梯度的绝对差。α是没有单位的权重因子,是用户定义的参数,用于平衡颜色和渐变项的影响。通过该等式可以计算投影到相同空间位置的像素之间的相似度。||I i -I j || Calculate the L1 distance (ie Manhattan distance) of the colors of I i and I j in the RGB space. ▽I is the gray value gradient of the pixel; ||▽I i -▽I j || represents the absolute difference of the gray gradient calculated at I i and I j . α is a weight factor without units and is a user-defined parameter to balance the influence of color and gradient terms. The similarity between pixels projected to the same spatial location can be calculated by this equation.

由于有了许多预测值,在这种随机初始化之后,该区域的至少一个带有平面的区域的像素接近正确值。经过一个该平面传递到其他像素的传播步骤,一个好的预测值足以使算法运作起来。Thanks to many predicted values, after this random initialization, the pixels of at least one region with a plane in the region are close to the correct value. After a propagation step where the plane is passed to other pixels, a good prediction is enough for the algorithm to work.

步骤2:迭代Step 2: Iterate

在迭代中,每个像素运行两个阶段:首先是空间传播,其次是平面精修。In iterations, two stages are run per pixel: first spatial propagation, followed by planar refinement.

(2-1)空间传播(2-1) Spatial propagation

相邻点被假设为与通常想到在同一个平面上。这是传播的关键点。p表示当前像素,fp是其对应的平面的向量。q是p的相邻像素。式(8)在p(x0,y0)下分别用fp和fq计算,以评估这两种情况的成本。检查条件m(x0,y0,fp')<m(x0,y0,fp)。Adjacent points are assumed to be on the same plane as is usually thought of. This is the key point of communication. p represents the current pixel, and f p is the vector of its corresponding plane. q is the neighbor pixel of p. Equation (8) is calculated with f p and f q under p(x 0 , y 0 ), respectively, to evaluate the cost of these two cases. Check the condition m(x 0 , y 0 , f p ')<m(x 0 , y 0 , f p ).

式(12)中的m(x0,y0,fp')和m(x0,y0,fp)分别由式(8)得到;m(x 0 , y 0 , f p ') and m(x 0 , y 0 , f p ) in formula (12) are respectively obtained from formula (8);

如果该表达式成立,则fq被接受为p的新向量,即fp=fq。在奇数迭代中,q是左边和上边界,在偶数迭代中,q是右边界和下边界。If this expression holds, then f q is accepted as a new vector of p, ie f p =f q . In odd iterations, q is the left and upper bounds, and in even iterations, q is the right and lower bounds.

(2-2)平面精修(2-2) Plane finishing

平面精修的目标是在像素p处改进平面的参数。为了进一步降低式(6)中的Z来提取具有横向点的成像对象表面的深度。The goal of plane refinement is to improve the parameters of the plane at pixel p. In order to further reduce Z in formula (6) to extract the depth of the imaging object surface with lateral points.

将fp转换为法向量np。两个参数▽z和▽n被定义为分别限制z0和n的最大允许变化。z0'计算为z0'=z0+▽z,其中▽z位于[-▽zmax,▽zmax]。并且n'=u(n+▽n),u()表示计算单位向量,▽n位于[-▽nmax,▽nmax]。最后,通过p和n'得到一个新的fp'。如果m(x0,y0,fp')<m(x0,y0,fp),则fp=fp'。Convert f p to normal vector n p . Two parameters ▽z and ▽n are defined to limit the maximum allowable variation of z 0 and n, respectively. z 0 ' is calculated as z 0 '=z 0 +▽z, where ▽z is located at [-▽z max ,▽z max ]. And n'=u(n+▽n), u() represents a calculation unit vector, and ▽n is located at [-▽n max , ▽n max ]. Finally, pass p and n' to get a new f p '. If m(x 0 , y 0 , f p ')<m(x 0 , y 0 , f p ), then f p =f p '.

该方法从设置▽zmax=maxdisp/2开始,其中maxdisp是允许的最大视差,▽nmax=1。每次细化后,参数将更新为▽zmax=▽zmax/2,▽nmax=▽nmax/2,从而减少搜索范围。我们再次回到特殊传播,直到▽zmax<resolution/2,其中分辨率如文献[DaneshPanah M,JavidiB.“Profilometry and optical slicing by passive three-dimensional imaging[J]”.Optics letters,2009,34(7):1105-1107]所示最小化。对于奇数迭代,从图像的左侧开始,向右下进行偶数迭代。最后的结果是在迭代后获得的。The method starts by setting ▽z max =maxdisp/2, where maxdisp is the maximum allowed disparity and ▽n max =1. After each refinement, the parameters will be updated as ▽z max = ▽z max /2, ▽n max = ▽n max /2, thus reducing the search range. We return to the special propagation again until ▽z max <resolution/2, where the resolution is as in the literature [DaneshPanah M, JavidiB. "Profilometry and optical slicing by passive three-dimensional imaging[J]". Optics letters, 2009, 34( 7):1105-1107] as shown in the minimization. For odd iterations, start from the left of the image and work down to the right for even iterations. The final result is obtained after iterations.

为了验证这种方法的实用性,提出了两种II型实验。并且还进行检查所有可能的z的常规方法进行比较。首先,在计算机集成成像系统中使用拖拉机的模型作为3D对象。该物体如图3(a)所示。结果具有20×28个元素图像,每个元素图像具有100×100像素。小透镜的焦距为1.5mm。拖拉机的深度为α设定为0.5,γ设定为5.通过计算,最小深度分辨率为0.005mm。To test the utility of this approach, two type II experiments are presented. And also do the normal way of checking all possible z for comparison. First, a model of the tractor was used as a 3D object in a computer-integrated imaging system. The object is shown in Figure 3(a). The result has 20x28 element images with 100x100 pixels each. The focal length of the small lens is 1.5mm. The depth of the tractor is α is set to 0.5, and γ is set to 5. By calculation, the minimum depth resolution is 0.005mm.

而在合成孔径积分成像中,元素图像如图3(b)所示。3D对象包括一个构建块,一个娃娃和一个玩具大象,分别位于53-57厘米,89-93厘米和131~136厘米。系统包含6×6透视图。并且图像被捕获在具有5mm间距的规则网格上。相机的焦距为16mm。α设定为0.5,γ设定为5.通过计算,最小深度分辨率为2mm。In synthetic aperture integral imaging, the elemental image is shown in Fig. 3(b). The 3D objects included a building block, a doll, and a toy elephant, located at 53-57 cm, 89-93 cm, and 131-136 cm, respectively. The system contains a 6×6 perspective. And the images are captured on a regular grid with 5mm spacing. The focal length of the camera is 16mm. α is set to 0.5, and γ is set to 5. By calculation, the minimum depth resolution is 2mm.

该算法在Matlab中计算。通过本文提出的方法接收的结果与常用方法的结果的比较如图所示。在图4(b)和(d)中,底部的水平条纹是背景的折叠。The algorithm is calculated in Matlab. The comparison of the results received by the method proposed in this paper with the results of commonly used methods is shown in the figure. In Figure 4(b) and (d), the horizontal stripes at the bottom are folds of the background.

从这些结果可以看出,这两种方法都在对象部分中表现良好。但是通过常用方法得到的结果如图4(a)和4(b)所示,边肥育相当明显。在本文提出的方法中,如图4(c)和4(d)所示,结果的空白部分充满了白噪声。对这些区域的深度变化不敏感,因为难以区分差异。所以这部分的深度依然是它初始化的价值。对象内部存在一些不准确的一点,需要通过一些更多的迭代来消除这一点。As can be seen from these results, both methods perform well in the object part. However, the results obtained by common methods are shown in Fig. 4(a) and 4(b), and the edge fattening is quite obvious. In the method proposed in this paper, as shown in Fig. 4(c) and 4(d), the blank part of the result is filled with white noise. Insensitive to depth changes in these regions, as differences are difficult to discern. So the depth of this part is still its initialized value. There is a bit of inaccuracy inside the object that needs to be removed with a few more iterations.

为了减少白噪声的影响,z0以固定值初始化为所有像素,并且在迭代之前添加精修步骤。得到如图5所示的更好的结果,白噪声被很好地消除。在图5(a)中,特别是在物体边缘处精确提取拖拉机的深度。但是图5(b)中的物体边缘仍然存在一些白噪声,这可能受到实验条件的限制。To reduce the influence of white noise, z 0 is initialized to all pixels with a fixed value, and a refinement step is added before iterations. A better result is obtained as shown in Fig. 5, the white noise is well removed. In Fig. 5(a), the depth of the tractor is precisely extracted especially at the edge of the object. But there are still some white noises at the edge of the object in Fig. 5(b), which may be limited by the experimental conditions.

虽然考虑了表面的连续性,但从这个结果来看,深度不断变化并不直观。这可能是由于这种几何模型的较粗糙的分辨率造成的。Although the continuity of the surface is considered, it is not intuitive from this result that the depth is constantly changing. This may be due to the coarser resolution of this geometric model.

为了进一步验证所提出的方法,每个像素被投影到由所提出的方法计算的深度,如图6所示。该步骤中使用的深度是高斯平滑的并且过滤出背景。由于算法尚未优化,计算时间难以评估该方法的计算效率。因此,可以通过核心因子的计算时间来评估m,不需要计算所有z空间;计算资源支付给子分辨率计算。在模拟光场中,maxdisp设置为10mm,分辨率为0.005mm,在该算法中计算了12次迭代。在每次迭代中,在每个像素(fp,fq,fp',其中q是两个相邻像素)中计算m次4次。与计算每个可能位置的常用方法的10/0.005=2000倍相比,该方法中每个像素的12×4=48次计算的m为近40倍。从这个角度来看,提出的算法可以有效地减少计算量。To further verify the proposed method, each pixel is projected to the depth calculated by the proposed method, as shown in Fig. 6. The depth used in this step is Gaussian smoothed and the background filtered out. Since the algorithm has not been optimized, the calculation time makes it difficult to evaluate the computational efficiency of this method. Thus, m can be evaluated by the computation time of the kernel factor, and not all z spaces need to be computed; computing resources are paid for sub-resolution computations. In the simulated light field, with maxdisp set to 10 mm and a resolution of 0.005 mm, 12 iterations were calculated in the algorithm. In each iteration, m is computed 4 times in each pixel (f p , f q , f p' , where q are two adjacent pixels). 12 x 4 = 48 calculations per pixel in this method is nearly 40 times m compared to 10/0.005 = 2000 times the usual method of calculating each possible position. From this point of view, the proposed algorithm can effectively reduce the amount of computation.

以上所述,仅是本发明的几种具体实施方式,并非对本发明做任何形式的限制,虽然本发明以较佳实施例揭示如上,然而并非用以限制本发明,任何熟悉本专业的技术人员,在不脱离本申请技术方案的范围内,利用上述揭示的技术内容做出些许的变动或修饰均等同于等效实施案例,均属于技术方案范围内。The above are only several specific implementations of the present invention, and do not limit the present invention in any form. Although the present invention is disclosed as above with preferred embodiments, it is not intended to limit the present invention. Anyone familiar with this field , without departing from the scope of the technical solution of the present application, any changes or modifications made using the technical content disclosed above are equivalent to equivalent implementation cases, and all belong to the scope of the technical solution.

Claims (10)

1. A three-dimensional object depth extraction method is characterized in that the depth of a pixel is obtained by calculating the similarity of adjacent pixels in each element image in a two-dimensional plane image.
2. The method of extracting a depth of a three-dimensional object according to claim 1, wherein in calculating the similarity of pixels in each elemental image in the two-dimensional plane image, it is assumed that adjacent pixels are on the same plane, and the surface is modeled with a plurality of small planes.
3. The method for extracting the depth of the three-dimensional object according to claim 1, wherein the calculating the similarity of the adjacent pixels in each elemental image in the two-dimensional plane image adopts a multi-cycle algorithm of adjacent pixel propagation and random optimization.
4. The method of claim 1, comprising the steps of initializing a horizontal pixel to a random plane and iteratively calculating the similarity of neighboring pixels.
5. The method of claim 4, wherein the initializing of the horizontal pixels to a random plane comprises:
initializing a horizontal pixel to a random plane;
the initial depth of each pixel is set to a random value, and the normal vector passing through the surface of each pixel is set to a random unit vector.
6. The method of claim 4, wherein the initializing the horizontal pixels to a random plane comprises:
a plane passing through the depth coordinate of the lateral pixel, represented by equation (5),
z=f1▽px+f2▽py+f3formula (5)
Wherein z is the depth coordinate of the lateral pixel, and pxAnd pyIs a random plane, f1、f2And f3Respectively represented by formula (6-1), formula (6-2) and formula (6-3),
f1=-n1/n3formula (6-1)
f2=-n2/n3Formula (6-2)
f3=(n1·x0+n2·y0+n3·z0)/n3Formula (6-3)
In the formulae (6-1), (6-2) and (6-3), n1、n2And n3Is a scalar quantity, is a numerical vector represented by the formula (7)All possible planes, x, representing the minimum aggregation cost0And y0Respectively initialized coordinate values of said transverse pixels, z0For the initialized initial depth values of the lateral pixels,
formula (7) wherein m is provided by formula (8),
in the formula (8), W is used to realize adaptive weighting, W is provided by the formula (9), E represents a similarity calculation factor, E is provided by the formula (10), ▽ represents a gradient value, WpA square window centered on p is shown,
in the formula (9), | | Ip-IqAnd | | l represents the distance between two adjacent pixels p and q, p being a transverse pixel, q being an adjacent pixel in the same plane as p,
E=α||Ii-Ij||+(1-α)||▽Ii-▽Ij| | formula (10)
In the formula (10), I is the intensity of a pixel in an element image, subscripts I, j are indices of the element image, Ii,IjRespectively representing the intensity, I, of the corresponding pixel in the ith and jth elemental imagesiAnd IjWill project to the same spatial point, IiAnd IjIs calculated by the formula (11) | | Ii-Ij| is in RGB spaceI of (A)iAnd IjManhattan distance of color of (1), ▽ IiAnd ▽ IjIs the gray value gradient of the pixel, | | ▽ Ii-▽IjI is expressed iniAnd IjThe absolute difference of the calculated gray gradients, α is a weighting factor without units for balancing the influence of color and gradient terms;
in the formula (11), uiIs the local coordinate of the pixel in each elemental image corresponding to the point with coordinates y and z.
7. The method of claim 4, wherein the method of three-dimensional object depth extraction is performed on a computer using an Integrated Imaging (II) system, and the iterative computation of the similarity of neighboring pixels comprises the steps of:
a. initializing a horizontal pixel in a random plane, calculating a depth coordinate and a vector value of the horizontal pixel, calculating the aggregation cost of the horizontal pixel, and taking the aggregation cost as a reference aggregation cost;
b. calculating the aggregation cost of any adjacent pixel in the same plane with the horizontal pixel in the step a;
c. comparing the reference aggregation cost in the step a with the aggregation cost of the adjacent pixels in the step b;
d. taking the pixel corresponding to the smaller aggregation cost in the step c as a new reference value;
e. setting the pixel corresponding to the new reference value in the step d as the upper left adjacent to the pixel corresponding to the comparison reference value;
f. setting conditions: d, the corresponding depth value of the new reference value in the step d is in the maximum allowable range;
g. if the condition of the step f is satisfied, circularly executing the step a to the step f;
step f, if the condition is not satisfied, taking the last cycle of step e as the leftmost pixel of the image;
m, on the basis of the step l, performing descending even iteration on the right lower part of the image;
n, calculating the calculation times of each pixel according to the iteration times of the step m.
8. The method of claim 4, wherein the iterative computation of the similarity of neighboring pixels comprises steps of spatial propagation and planar refinement;
in the step of spatial propagation, adjacent pixels are set to be on the same plane, the cost m of different situations is evaluated by the formula (8),
in the formula (8), p represents the current pixel, fpIs the vector of its corresponding plane, q is the neighboring pixel of p, under p, fpAnd fqCalculating to evaluate the cost of both cases; the examination conditions are as shown in the formula (12),
m(x0,y0,fp')<m(x0,y0,fp) (ii) a Formula (12)
M (x) in formula (12)0,y0,fp') and m (x)0,y0,fp) Respectively obtained by formula (8);
if the expression shown in equation (12) holds, fqNew vector accepted as p, i.e. fp=fq
In odd iterations, q is the left and upper bounds;
in even iterations, q is the right and lower bounds;
in the step of plane finishing, f ispConversion to normal vector npTwo parameters ▽ z and ▽ n are defined to limit z, respectively0And the maximum allowable variation of n, z0' calculation as z0'=z0+ ▽ z, wherein ▽ z is located at [ - ▽ zmax,▽zmax]And n' ═ u (n + ▽ n), where u denotes the calculation unit vector, and ▽ n is located at [ - ▽ nmax,▽nmax];
Finally, a new f is obtained by p and np', if m (x)0,y0,fp')<m(x0,y0,fp) Then f isp=fp';
In the step of plane finishing, from setting ▽ zmaxMaxdisp/2 starts, where maxdisp is the maximum allowed disparity, ▽ nmaxAfter each refinement, the parameter will be updated to ▽ z as 1max=▽zmax/2、▽nmax=▽nmax/2 up to ▽ zmax<resolution/2, obtaining the minimized resolution; for odd iterations, starting from the left side of the image, performing even iterations towards the right and downwards;
and after iteration, obtaining the similarity of adjacent pixels so as to further obtain the depth of the three-dimensional object.
9. The method of claim 8, wherein z is0All pixels are initialized with fixed values and a refinement step is added before the iteration.
10. The device for obtaining three-dimensional image information from a two-dimensional picture is characterized by comprising a picture acquisition unit, an image storage unit and an image processing unit;
the image acquisition unit is electrically connected with the image storage unit, and the image storage unit is electrically connected with the image processing unit;
the image processing unit adopts the three-dimensional object depth extraction method of any one of claims 1 to 9 to obtain the depth information of the object in the two-dimensional picture and establish a three-dimensional image.
CN201710502470.1A 2017-06-27 2017-06-27 Three-dimensional image depth information extraction method Expired - Fee Related CN107330930B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710502470.1A CN107330930B (en) 2017-06-27 2017-06-27 Three-dimensional image depth information extraction method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710502470.1A CN107330930B (en) 2017-06-27 2017-06-27 Three-dimensional image depth information extraction method

Publications (2)

Publication Number Publication Date
CN107330930A true CN107330930A (en) 2017-11-07
CN107330930B CN107330930B (en) 2020-11-03

Family

ID=60198148

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710502470.1A Expired - Fee Related CN107330930B (en) 2017-06-27 2017-06-27 Three-dimensional image depth information extraction method

Country Status (1)

Country Link
CN (1) CN107330930B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108154549A (en) * 2017-12-25 2018-06-12 太平洋未来有限公司 Three-dimensional image processing method
CN110807798A (en) * 2018-08-03 2020-02-18 华为技术有限公司 Image recognition method, system, related device, and computer-readable storage medium
CN111465818A (en) * 2017-12-12 2020-07-28 索尼公司 Image processing apparatus, image processing method, program and information processing system
WO2020191731A1 (en) * 2019-03-28 2020-10-01 深圳市大疆创新科技有限公司 Point cloud generation method and system, and computer storage medium

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103279982A (en) * 2013-05-24 2013-09-04 中国科学院自动化研究所 Robust rapid high-depth-resolution speckle three-dimensional rebuilding method
CN103793911A (en) * 2014-01-24 2014-05-14 北京科技大学 Scene depth obtaining method based on integration image technology
CN104036481A (en) * 2014-06-26 2014-09-10 武汉大学 Multi-focus image fusion method based on depth information extraction
CN104065947A (en) * 2014-06-18 2014-09-24 长春理工大学 A Depth Map Acquisition Method for Integrated Imaging System
CN104240217A (en) * 2013-06-09 2014-12-24 周宇 Binocular camera image depth information acquisition method and device
CN104715504A (en) * 2015-02-12 2015-06-17 四川大学 Robust large-scene dense three-dimensional reconstruction method
CN105551050A (en) * 2015-12-29 2016-05-04 深圳市未来媒体技术研究院 Optical field based image depth estimation method
CN105574926A (en) * 2014-10-17 2016-05-11 华为技术有限公司 Method and device for generating three-dimensional image
US20160173849A1 (en) * 2013-10-25 2016-06-16 Ricoh Innovations Corporation Processing of Light Fields by Transforming to Scale and Depth Space
CN106257537A (en) * 2016-07-18 2016-12-28 浙江大学 A kind of spatial depth extracting method based on field information
CN106296706A (en) * 2016-08-17 2017-01-04 大连理工大学 A Depth Computational Reconstruction Method Combined with Global Modeling and Nonlocal Filtering
CN106447718A (en) * 2016-08-31 2017-02-22 天津大学 2D-to-3D depth estimation method

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103279982A (en) * 2013-05-24 2013-09-04 中国科学院自动化研究所 Robust rapid high-depth-resolution speckle three-dimensional rebuilding method
CN104240217A (en) * 2013-06-09 2014-12-24 周宇 Binocular camera image depth information acquisition method and device
US20160173849A1 (en) * 2013-10-25 2016-06-16 Ricoh Innovations Corporation Processing of Light Fields by Transforming to Scale and Depth Space
CN103793911A (en) * 2014-01-24 2014-05-14 北京科技大学 Scene depth obtaining method based on integration image technology
CN104065947A (en) * 2014-06-18 2014-09-24 长春理工大学 A Depth Map Acquisition Method for Integrated Imaging System
CN104036481A (en) * 2014-06-26 2014-09-10 武汉大学 Multi-focus image fusion method based on depth information extraction
CN105574926A (en) * 2014-10-17 2016-05-11 华为技术有限公司 Method and device for generating three-dimensional image
CN104715504A (en) * 2015-02-12 2015-06-17 四川大学 Robust large-scene dense three-dimensional reconstruction method
CN105551050A (en) * 2015-12-29 2016-05-04 深圳市未来媒体技术研究院 Optical field based image depth estimation method
CN106257537A (en) * 2016-07-18 2016-12-28 浙江大学 A kind of spatial depth extracting method based on field information
CN106296706A (en) * 2016-08-17 2017-01-04 大连理工大学 A Depth Computational Reconstruction Method Combined with Global Modeling and Nonlocal Filtering
CN106447718A (en) * 2016-08-31 2017-02-22 天津大学 2D-to-3D depth estimation method

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
FENGLI YU等: ""Depth generation method for 2D to 3D conversion"", 《 2011 3DTV CONFERENCE: THE TRUE VISION - CAPTURE, TRANSMISSION AND DISPLAY OF 3D VIDEO (3DTV-CON)》 *
SHULU WANG等: ""An integral imaging method for depth extraction with lens array in an optical tweezer system"", 《OPTOELETRONIC DEVICES AND INTEGRATION V 9270》 *
杜军辉等: ""基于集成成像光场信息的三维计算重建方法研究"", 《中国优秀硕士学位论文全文数据库(电子期刊)》 *
王宇等: ""基于多视差函数拟合的集成成像深度提取方法"", 《光学学报》 *
路海明等: ""基于向量场的深度计算方法"", 《清华大学学报(自然科学版)》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111465818A (en) * 2017-12-12 2020-07-28 索尼公司 Image processing apparatus, image processing method, program and information processing system
CN108154549A (en) * 2017-12-25 2018-06-12 太平洋未来有限公司 Three-dimensional image processing method
CN110807798A (en) * 2018-08-03 2020-02-18 华为技术有限公司 Image recognition method, system, related device, and computer-readable storage medium
CN110807798B (en) * 2018-08-03 2022-04-12 华为技术有限公司 Image recognition method, system, related device, and computer-readable storage medium
WO2020191731A1 (en) * 2019-03-28 2020-10-01 深圳市大疆创新科技有限公司 Point cloud generation method and system, and computer storage medium

Also Published As

Publication number Publication date
CN107330930B (en) 2020-11-03

Similar Documents

Publication Publication Date Title
US10353271B2 (en) Depth estimation method for monocular image based on multi-scale CNN and continuous CRF
CN106228507B (en) A kind of depth image processing method based on light field
CN107423698B (en) A Gesture Estimation Method Based on Parallel Convolutional Neural Network
US8903161B2 (en) Apparatus for estimating robot position and method thereof
Ramirez et al. Open challenges in deep stereo: the booster dataset
CN107025660B (en) Method and device for determining image parallax of binocular dynamic vision sensor
CN108038905A (en) A kind of Object reconstruction method based on super-pixel
EP3665651B1 (en) Hierarchical disparity hypothesis generation with slanted support windows
CN101908231A (en) Method and system for processing 3D point cloud reconstruction of scenes containing principal planes
CN117726747A (en) Three-dimensional reconstruction method, device, storage medium and equipment for complementing weak texture scene
CN107330930B (en) Three-dimensional image depth information extraction method
Yan et al. Rethinking disparity: a depth range free multi-view stereo based on disparity
Liu et al. High quality depth map estimation of object surface from light-field images
Praveen Efficient depth estimation using sparse stereo-vision with other perception techniques
CN113902781B (en) Three-dimensional face reconstruction method, device, equipment and medium
Chen et al. Multiview stereo via noise suppression patchmatch
CN113850293A (en) Localization method based on joint optimization of multi-source data and direction priors
CN105352482A (en) Bionic compound eye microlens technology-based 3-3-2 dimension object detection method and system
CN110443228B (en) Pedestrian matching method and device, electronic equipment and storage medium
CN112581494B (en) Binocular scene flow calculation method based on pyramid block matching
Shen Depth-map merging for multi-view stereo with high resolution images
Zhang et al. A robust multi‐view system for high‐fidelity human body shape reconstruction
Xiaojun et al. High accurate 3D reconstruction method using binocular stereo based on multiple constraints
CN114742847B (en) A light field cutout method and device based on empty angle consistency
CN117058214B (en) Stereo matching methods and systems, depth computing devices, and robots

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20201103

Termination date: 20210627

CF01 Termination of patent right due to non-payment of annual fee