CN101873509A - A Method for Eliminating Background and Edge Jitter of Depth Map Sequences - Google Patents

A Method for Eliminating Background and Edge Jitter of Depth Map Sequences Download PDF

Info

Publication number
CN101873509A
CN101873509A CN 201010222349 CN201010222349A CN101873509A CN 101873509 A CN101873509 A CN 101873509A CN 201010222349 CN201010222349 CN 201010222349 CN 201010222349 A CN201010222349 A CN 201010222349A CN 101873509 A CN101873509 A CN 101873509A
Authority
CN
China
Prior art keywords
background
depth map
image
source image
sequence
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
CN 201010222349
Other languages
Chinese (zh)
Other versions
CN101873509B (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.)
Tsinghua University
Original Assignee
Tsinghua 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 Tsinghua University filed Critical Tsinghua University
Priority to CN 201010222349 priority Critical patent/CN101873509B/en
Publication of CN101873509A publication Critical patent/CN101873509A/en
Application granted granted Critical
Publication of CN101873509B publication Critical patent/CN101873509B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Processing Or Creating Images (AREA)
  • Image Processing (AREA)

Abstract

本发明提出了一种消除深度图序列背景和边缘抖动的方法和装置,其中,该方法包括以下步骤:读取源图像序列的背景图像对并计算得到所述背景图像的深度图;计算所述源图像序列和所述背景图像的帧差以得到帧差数组;计算以得到所述源图像序列每一帧的深度图;根据预设阈值判断所述源图像深度图的前景和背景,且消除背景抖动;对所述源图像深度图的前景赋值以消除前景轮廓抖动;通过中值滤波和双边滤波以优化得到最终所述源图像深度图。通过本发明提出的消除深度图序列背景和边缘抖动的方法,克服了已有技术的不足,能够有效地消除图像抖动,消除干扰噪声,平滑边缘。

The present invention proposes a method and device for eliminating the background and edge jitter of a depth image sequence, wherein the method includes the following steps: reading the background image pair of the source image sequence and calculating the depth image of the background image; calculating the The frame difference of the source image sequence and the background image to obtain a frame difference array; calculate to obtain the depth map of each frame of the source image sequence; judge the foreground and background of the source image depth map according to a preset threshold, and eliminate Background shaking; assigning a value to the foreground of the depth map of the source image to eliminate the shaking of the foreground contour; optimizing the final depth map of the source image through median filtering and bilateral filtering. The method for eliminating background and edge jitter of the depth image sequence proposed by the invention overcomes the deficiencies of the prior art, can effectively eliminate image jitter, eliminate interference noise, and smooth the edge.

Description

消除深度图序列背景和边缘抖动的方法 A Method for Eliminating Background and Edge Jitter of Depth Map Sequences

技术领域technical field

本发明涉及计算机视觉技术领域,特别涉及一种消除深度图序列背景和边缘抖动的方法。The invention relates to the technical field of computer vision, in particular to a method for eliminating background and edge jitter of a depth map sequence.

背景技术Background technique

三维图像和显示是未来信息系统的一种重要表现形式,三维图像和显示一方面层次分明色彩鲜艳,具有很强的视觉冲击力,让观看的人驻景时间更长,留下深刻的印象;另外三维图像和显示给人以真实、栩栩如生,人物呼之欲出,有身临其境的感觉,有很高的艺术欣赏价值。正因为三维图像和视频具有这些平面图像和视频所不具备的特点,所以在诸如电脑显示、电视、视频、机器人、测量、斟察、医疗、广告传媒、电子游戏等领域具有广阔的应用前景。Three-dimensional images and displays are an important form of expression for future information systems. On the one hand, three-dimensional images and displays have distinct layers and bright colors, and have a strong visual impact, allowing viewers to stay longer and leave a deep impression on them; In addition, the three-dimensional images and displays give people a real and lifelike character, and the characters are ready to appear, and there is an immersive feeling, which has a high artistic appreciation value. Just because three-dimensional images and videos have the characteristics that these plane images and videos do not have, they have broad application prospects in fields such as computer display, television, video, robotics, measurement, inspection, medical treatment, advertising media, and electronic games.

人眼看世界之所以有立体感,是因为左眼和右眼看世界的视角有少许不同而存在视差(disparity)。视差是指左视图和右视图对应于同一个世界点的两个象素点的水平位移。计算机视觉领域的定理指出,某点的视差和它所对应的世界点的深度(depth,即距离感)成反比;也就是说,离观看点越远的点的视差值越小,无穷远点的视差为0。一张图像所有点的深度值组成了深度图(depth map)。The reason why the human eye sees the world with a three-dimensional sense is that there is a disparity (disparity) because the left eye and the right eye see the world with slightly different perspectives. Parallax refers to the horizontal displacement of two pixels corresponding to the same world point in the left view and right view. The theorem in the field of computer vision points out that the parallax of a certain point is inversely proportional to the depth (depth, that is, the sense of distance) of its corresponding world point; Points have a disparity of 0. The depth values of all points in an image form a depth map.

基于双目立体视觉的深度图生成技术的发展使得快速生成高质量的深度图成为了可能,但是由于现有技术没有考虑时间上的相关性,在对图像序列进行操作的时候,每一幅深度图都是独立生成的,这就导致生成的深度图序列在连续播放的时候会出现严重的背景和边缘的抖动,影响了整体演示效果。The development of depth map generation technology based on binocular stereo vision has made it possible to quickly generate high-quality depth maps, but because the existing technology does not consider temporal correlation, when operating on image sequences, each depth The maps are generated independently, which leads to serious background and edge jitters in the generated depth map sequence during continuous playback, which affects the overall presentation effect.

发明内容Contents of the invention

本发明旨在至少解决上述技术问题之一。The present invention aims to solve at least one of the above-mentioned technical problems.

为此,本发明的一个目的在于提出了一种消除深度图序列背景和边缘抖动的方法,该方法克服了已有技术的不足,能够有效地消除图像抖动,消除干扰噪声,平滑边缘。For this reason, an object of the present invention is to propose a method for eliminating depth image sequence background and edge jitter, which overcomes the deficiencies of the prior art, can effectively eliminate image jitter, eliminate interference noise, and smooth edges.

本发明的一个方面提出了一种消除深度图序列背景和边缘抖动的方法,包括以下步骤:读取源图像序列的背景图像对并计算得到所述背景图像的深度图;计算所述源图像序列和所述背景图像的帧差以得到帧差数组;计算以得到所述源图像序列每一帧的深度图;根据预设阈值判断所述源图像深度图的前景和背景,且消除背景抖动;对所述源图像深度图的前景赋值以消除前景轮廓抖动;通过中值滤波和双边滤波以优化得到最终所述源图像深度图。One aspect of the present invention proposes a method for eliminating the background and edge jitter of a depth map sequence, comprising the following steps: reading the background image pair of the source image sequence and calculating the depth map of the background image; calculating the source image sequence and the frame difference of the background image to obtain a frame difference array; calculate to obtain the depth map of each frame of the source image sequence; judge the foreground and background of the source image depth map according to a preset threshold, and eliminate background jitter; assigning a value to the foreground of the source image depth map to eliminate foreground contour jitter; and optimizing to obtain the final source image depth map through median filtering and bilateral filtering.

在本发明的一个实施例中,利用灰度变换公式将所述背景图像和所述源图像的每个像素点的数据变为灰度值后,以计算得到所述背景图像和所述源图像的深度图。In one embodiment of the present invention, the data of each pixel of the background image and the source image are converted into gray values by using a grayscale transformation formula to calculate the background image and the source image depth map.

在本发明的一个实施例中,所述计算所述源图像序列和所述背景图像的帧差以得到帧差数组进一步包括:读取所述源图像序列每一帧图像对;对所述源图像序列每一帧图像做灰度变换;对灰度变换后的所述源图像参考视图和所述背景图参考视图做差,以得到所述帧差数组。In an embodiment of the present invention, the calculating the frame difference between the source image sequence and the background image to obtain the frame difference array further includes: reading each frame image pair of the source image sequence; Perform grayscale transformation on each frame of the image sequence; perform a difference between the grayscale-transformed reference view of the source image and the reference view of the background image to obtain the array of frame differences.

在本发明的一个实施例中,所述根据预设阈值判断所述源图像深度图的前景和背景,且消除背景抖动进一步包括:通过预设阈值对所述帧差数组进行阈值判断,以区分所述源图像深度图的前景和背景;用所述背景深度图对应的值为所述源图像深度图的背景赋值。In an embodiment of the present invention, said judging the foreground and background of the depth map of the source image according to a preset threshold, and eliminating background jitter further includes: performing threshold judgment on the frame difference array by a preset threshold to distinguish The foreground and background of the depth map of the source image; using the value corresponding to the depth map of the background to assign a value to the background of the depth map of the source image.

在本发明的一个实施例中,所述对所述源图像深度图的前景赋值以消除前景轮廓抖动进一步包括:统计所述前景范围内所有的像素点;通过计算得到统一值作为深度值以对所述前景赋予所述深度值。In an embodiment of the present invention, the assigning the foreground value of the depth map of the source image to eliminate the jitter of the foreground contour further includes: counting all the pixels in the foreground range; The foreground is assigned the depth value.

在本发明的一个实施例中,所述通过中值滤波和双边滤波以优化得到最终所述源图像深度图进一步包括:对消除背景抖动和前景轮廓抖动的所述源图像序列的深度图进行中值滤波,以去除所述背景中的干扰噪声;对所述去除背景中干扰噪声的深度图进行双边滤波以平滑所述深度图的边缘,得到最终优化后的源图像序列的深度图。In an embodiment of the present invention, said obtaining the final depth map of the source image by means of median filtering and bilateral filtering further includes: performing a step-by-step process on the depth map of the source image sequence to eliminate background jitter and foreground contour jitter. Value filtering to remove the interference noise in the background; bilateral filtering is performed on the depth map from which the interference noise in the background has been removed to smooth edges of the depth map to obtain a final optimized depth map of the source image sequence.

本发明的另一方面提出了一种消除深度图序列背景和边缘抖动的装置,包括:图像获取模块,用于读取源图像序列的背景图像对并计算得到所述背景图像的深度图;帧差数组计算模块,用于计算所述源图像序列和所述背景图像的帧差以得到帧差数组;计算模块,用于计算以得到所述源图像序列每一帧的深度图;前景背景判断模块,用于根据预设阈值判断所述源图像深度图的前景和背景,且消除背景抖动;前景图像处理模块,用于对所述源图像深度图的前景赋值以消除前景轮廓抖动;图像优化模块,用于通过中值滤波和双边滤波以优化得到最终所述源图像深度图。Another aspect of the present invention proposes a device for eliminating the background and edge jitter of a depth map sequence, including: an image acquisition module, which is used to read the background image pair of the source image sequence and calculate the depth map of the background image; The difference array calculation module is used to calculate the frame difference between the source image sequence and the background image to obtain a frame difference array; the calculation module is used to calculate the depth map of each frame of the source image sequence; foreground and background judgment A module for judging the foreground and background of the source image depth map according to a preset threshold, and eliminating background jitter; a foreground image processing module for assigning a value to the foreground of the source image depth map to eliminate foreground contour jitter; image optimization The module is used to obtain the final depth map of the source image through median filtering and bilateral filtering.

根据本发明实施例的消除深度图序列背景和边缘抖动的方法,克服了已有技术的不足,能够有效地消除图像抖动,消除干扰噪声,平滑边缘。另外本发明实施简单,便于操作。The method for eliminating the background and edge jitter of the depth map sequence according to the embodiment of the present invention overcomes the shortcomings of the prior art, and can effectively eliminate image jitter, eliminate interference noise, and smooth the edge. In addition, the present invention is simple to implement and convenient to operate.

本发明附加的方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本发明的实践了解到。Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.

附图说明Description of drawings

本发明上述的和/或附加的方面和优点从下面结合附图对实施例的描述中将变得明显和容易理解,其中:The above and/or additional aspects and advantages of the present invention will become apparent and easy to understand from the following description of the embodiments in conjunction with the accompanying drawings, wherein:

图1为本发明实施例的消除深度图序列背景和边缘抖动的方法的整体流程框图;FIG. 1 is an overall flowchart of a method for eliminating background and edge jitter of a depth map sequence according to an embodiment of the present invention;

图2为采用本发明实施例的方法处理之前的深度图;Fig. 2 is the depth map before processing by the method of the embodiment of the present invention;

图3为图2采用本发明实施例的方法优化后的深度图;Fig. 3 is a depth map optimized by using the method of the embodiment of the present invention in Fig. 2;

图4为用本发明实施例的方法处理得到的其他图像的立体渲染图像;和Fig. 4 is the stereo rendering image of other images obtained by processing with the method of the embodiment of the present invention; and

图5为本发明实施例的消除深度图序列背景和边缘抖动的装置整体结构示意图。FIG. 5 is a schematic diagram of an overall structure of a device for eliminating background and edge jitter of a depth map sequence according to an embodiment of the present invention.

具体实施方式Detailed ways

下面详细描述本发明的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,仅用于解释本发明,而不能解释为对本发明的限制。Embodiments of the present invention are described in detail below, examples of which are shown in the drawings, wherein the same or similar reference numerals designate the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the figures are exemplary only for explaining the present invention and should not be construed as limiting the present invention.

下面参考附图描述本发明实施例的消除深度图序列背景和边缘抖动的方法,该方法克服了已有技术的不足,能够有效地消除图像抖动,消除干扰噪声,平滑边缘。另外本发明实施简单,便于操作。The method for eliminating the background and edge jitter of the depth map sequence in the embodiment of the present invention is described below with reference to the accompanying drawings. The method overcomes the shortcomings of the prior art and can effectively eliminate image jitter, eliminate interference noise, and smooth edges. In addition, the present invention is simple to implement and convenient to operate.

如图1所示,为本发明实施例的消除深度图序列背景和边缘抖动的方法的整体流程框图。包括以下步骤:As shown in FIG. 1 , it is an overall flowchart of a method for eliminating background and edge jitter of a depth map sequence according to an embodiment of the present invention. Include the following steps:

步骤S101,读取源图像序列的背景图像对并计算得到所述背景图像的深度图。Step S101, read the background image pair of the source image sequence and calculate the depth map of the background image.

1.1,定义图像接口,包括:图像数据指针,图像宽度,高度,位深,图像格式。1.1, define the image interface, including: image data pointer, image width, height, bit depth, image format.

1.2,根据所述图像接口定义图像读取函数,用图像读取函数从硬盘打开源图像序列的背景图像对文件,以便获取背景图像数据,并且把所述背景图像数据保存在系统内存中。1.2. Define an image reading function according to the image interface, use the image reading function to open the background image pair file of the source image sequence from the hard disk, so as to obtain the background image data, and save the background image data in the system memory.

1.3,利用灰度变换公式,将所述背景图像数据转变为相应背景图像的灰度图像数据。1.3. Convert the background image data into grayscale image data of the corresponding background image by using a grayscale transformation formula.

具体地,在本发明的一个实施例中,利用RGB(Red Green Blue,红绿蓝)图像变换公式对源图像对进行灰度变换,以得到对应的灰度图像对。其中,本发明实施例中RGB图像变换公式如下:Specifically, in one embodiment of the present invention, the grayscale transformation is performed on the source image pair by using the RGB (Red Green Blue, red, green, blue) image transformation formula to obtain the corresponding grayscale image pair. Wherein, the RGB image transformation formula in the embodiment of the present invention is as follows:

Y=0.212671×R+0.715160×G+0.072169×B    (1)Y=0.212671×R+0.715160×G+0.072169×B (1)

其中,Y是灰度图像每个像素点的灰度值,R、G、B分别是平面视频帧图像中每个像素点的R、G、B分量。Among them, Y is the gray value of each pixel in the gray image, and R, G, and B are the R, G, and B components of each pixel in the planar video frame image, respectively.

1.4,利用置信传播的立体匹配算法计算得到源图像序列的背景图像的深度图。在本发明的一个实施例中,背景图像的深度图记为:reDepth。1.4, use the stereo matching algorithm of belief propagation to calculate the depth map of the background image of the source image sequence. In one embodiment of the present invention, the depth map of the background image is marked as: reDepth.

步骤S102,计算所述源图像序列和所述背景图像的帧差以得到帧差数组。Step S102, calculating the frame difference between the source image sequence and the background image to obtain a frame difference array.

2.1,根据图像接口定义图像读取函数,用图像读取函数从硬盘打开源图像序列每一帧图像对文件,以便获取源图像的图像数据,并且把源图像的图像数据保存在内存中。2.1. Define the image reading function according to the image interface, use the image reading function to open the image pair file of each frame of the source image sequence from the hard disk, so as to obtain the image data of the source image, and save the image data of the source image in the memory.

2.2,利用灰度变换公式,将源图像序列每一帧图像数据变为灰度图像数据。2.2. Use the grayscale transformation formula to convert the image data of each frame of the source image sequence into grayscale image data.

2.3,把2.2中灰度变换后的源图像参考视图和1.4中灰度变换后的背景图参考视图做差,并取绝对值以得到源图像参考视图与背景图参考视图之间的帧差数组。2.3. Make the difference between the source image reference view after the grayscale transformation in 2.2 and the background image reference view after the grayscale transformation in 1.4, and take the absolute value to obtain the frame difference array between the source image reference view and the background image reference view .

具体地,在本发明的一个实施例中,把灰度变换后的源图像参考视图记为:depth1,背景图参考视图记为:depth2,帧差数组记为:cha。运用如下公式:Specifically, in an embodiment of the present invention, the source image after the gray scale transformation is marked as: depth1, the background image reference view is marked as: depth2, and the frame difference array is marked as: cha. Use the following formula:

cha=|depth1-depth2|                      (2)cha=|depth1-depth2| (2)

得到相应的帧差数组cha。Get the corresponding frame difference array cha.

步骤S103,计算以得到所述源图像序列每一帧的深度图。Step S103, calculate to obtain the depth map of each frame of the source image sequence.

3.1,得到2.2中灰度变换后的源图像序列数据。3.1, get the source image sequence data after the grayscale transformation in 2.2.

3.2,运用1.4中提出的置信传播的立体匹配算法计算3.1中的数据以得到源图像序列每一帧的深度图。在本发明的一个实施例中,把源图像序列每一帧图像的深度图记为:depth。如图2所示,为本发明实施例的源图像序列每一帧图像的深度图。3.2, use the stereo matching algorithm of belief propagation proposed in 1.4 to calculate the data in 3.1 to obtain the depth map of each frame of the source image sequence. In one embodiment of the present invention, the depth map of each frame of the source image sequence is recorded as: depth. As shown in FIG. 2 , it is a depth map of each frame image of the source image sequence of the embodiment of the present invention.

步骤S104,根据预设阈值判断所述源图像深度图的前景和背景,且消除背景抖动。Step S104, judging the foreground and background of the depth map of the source image according to a preset threshold, and eliminating background shake.

4.1,定义阈值,对2.3中得到的帧差数组进行阈值判断,因为相机不动,则认为背景是不动的,所以可以把其中小于阈值的点作为背景,其他的点作为前景。在本发明的一个实施例中,阈值定义为20。4.1, define the threshold, and perform threshold judgment on the frame difference array obtained in 2.3. Because the camera does not move, the background is considered to be motionless, so the points smaller than the threshold can be used as the background, and other points as the foreground. In one embodiment of the present invention, the threshold is defined as 20.

4.2,对分为背景的区域,用背景深度图对应的值来为源图像深度图赋值,运用如下公式:4.2. For the area divided into the background, use the value corresponding to the background depth map to assign a value to the source image depth map, using the following formula:

ifif chacha << 2020 depthdepth == reDepthreDepth elseelse depthdepth == depthdepth -- -- -- (( 33 ))

在本发明的一个实施例中,从公式(3)中能够看出,如果帧差数组cha小于阈值20,则把源图像序列每一帧图像的深度图depth的颜色赋值为背景图像的深度图reDepth的颜色。否则为前景,保持原有值。In one embodiment of the present invention, it can be seen from formula (3) that if the frame difference array cha is less than the threshold value 20, the color of the depth map depth of each frame of the source image sequence is assigned as the depth map of the background image The color of reDepth. Otherwise it is foreground, keep the original value.

步骤S105,对所述源图像深度图的前景赋值以消除前景轮廓抖动。Step S105, assign a value to the foreground of the depth map of the source image to eliminate the jitter of the foreground contour.

5.1,对前景范围内所有的像素点进行统计。5.1, make statistics on all the pixels in the foreground range.

5.3,统计计算得到的统一值作为前景的深度值,对所述前景的深度图赋予统一值用以消除前景轮廓的抖动。在本发明的一个实施例中,采用对所有点求和再平均的方法计算得到统一值。5.3. The uniform value obtained through statistical calculation is used as the depth value of the foreground, and the uniform value is assigned to the depth map of the foreground to eliminate the jitter of the foreground outline. In one embodiment of the present invention, a unified value is calculated by using a method of summing and averaging all points.

步骤S106,通过中值滤波和双边滤波以优化得到最终所述源图像深度图。Step S106, obtain the final depth map of the source image through median filtering and bilateral filtering to optimize.

6.1,对5.3中处理过的源图像序列的深度图进行中值滤波,通过中值滤波能够去除背景中的干扰噪声。6.1. Median filtering is performed on the depth map of the source image sequence processed in 5.3, and the interference noise in the background can be removed through median filtering.

6.2,对6.1处理过源图像序列的深度图进行双边滤波,通过双边滤波能够平滑边缘。6.2. Perform bilateral filtering on the depth map of the source image sequence processed in 6.1, and the edges can be smoothed through bilateral filtering.

6.3,得到源图像每一帧的深度图。在本发明的一个实施例中,如图3所示,为最终优化好的图2所示的深度图。6.3, Obtain the depth map of each frame of the source image. In an embodiment of the present invention, as shown in FIG. 3 , it is the final optimized depth map shown in FIG. 2 .

在本发明的的另外一个实施例中。如图4所示,为用其他图像序列通过本发明提出的消除深度图序列背景和边缘抖动的方法检验效果,通过图4能够看出此立体渲染图像,仍没有明显的背景和边缘抖动。In another embodiment of the present invention. As shown in Figure 4, in order to use other image sequences to test the effect of the method for eliminating the background and edge jitter of the depth image sequence proposed by the present invention, it can be seen from Figure 4 that the stereoscopic rendering image still has no obvious background and edge jitter.

本发明的另一方面提出了一种消除深度图序列背景和边缘抖动的装置,该消除深度图序列背景和边缘抖动的装置100包括图像获取模块110,帧差数组计算模块120,前景背景判断模块130,前景图像处理模块140,和图像优化模块150。其中,图像获取模块110用于读取源图像序列的背景图像对并计算得到所述背景图像的深度图,帧差数组计算模块120用于计算所述源图像序列和所述背景图像的帧差以得到帧差数组,前景背景判断模块130用于根据预设阈值判断所述源图像深度图的前景和背景,且消除背景抖动,前景图像处理模块140用于对所述源图像深度图的前景赋值以消除前景轮廓抖动,图像优化模块150用于通过中值滤波和双边滤波以优化得到最终所述源图像深度图。Another aspect of the present invention proposes a device for eliminating background and edge jitter of a depth map sequence. The device 100 for eliminating background and edge jitter of a depth map sequence includes an image acquisition module 110, a frame difference array calculation module 120, and a foreground and background judgment module. 130 , a foreground image processing module 140 , and an image optimization module 150 . Wherein, the image acquisition module 110 is used to read the background image pair of the source image sequence and calculate the depth map of the background image, and the frame difference array calculation module 120 is used to calculate the frame difference between the source image sequence and the background image To obtain the frame difference array, the foreground and background judging module 130 is used to judge the foreground and background of the depth map of the source image according to a preset threshold, and eliminate background shaking, and the foreground image processing module 140 is used to process the foreground of the depth map of the source image The value is assigned to eliminate the jitter of the foreground contour, and the image optimization module 150 is used to obtain the final depth map of the source image through median filtering and bilateral filtering.

其中,图像获取模块110包括背景图像获取模块1101,灰度变换模块1102,计算模块1103。背景图像获取模块1101用于获取背景图,灰度变换模块1102采用灰度变换公式将所述背景图像和所述源图像的每个像素点的数据变为灰度值,计算模块1103用于把灰度变换后的所述背景图像和所述源图像,以计算得到所述背景图像和所述源图像的深度图。Wherein, the image acquisition module 110 includes a background image acquisition module 1101 , a gray scale transformation module 1102 , and a calculation module 1103 . The background image acquisition module 1101 is used to obtain the background image, the grayscale transformation module 1102 uses the grayscale transformation formula to change the data of each pixel of the background image and the source image into a grayscale value, and the calculation module 1103 is used to convert The background image and the source image after the gray scale transformation are calculated to obtain the depth map of the background image and the source image.

但是本领域的普通技术人员知道,本发明提出的消除深度图序列背景和边缘抖动的装置100的图像优化模块150还可以细分为中值滤波模块和双边滤波模块,当然还可以有其他形式的组合,这些也应该认为在本发明的保护范围之内。However, those of ordinary skill in the art know that the image optimization module 150 of the device 100 for eliminating the background and edge jitter of the depth map sequence proposed by the present invention can also be subdivided into a median filter module and a bilateral filter module, and of course there can be other forms Combinations, these should also be considered within the protection scope of the present invention.

通过本发明提出的消除深度图序列背景和边缘抖动的方法,克服了已有技术的不足,能够有效地消除图像抖动,消除干扰噪声,平滑边缘。另外本发明实施简单,便于操作。The method for eliminating background and edge jitter of the depth image sequence proposed by the invention overcomes the deficiencies of the prior art, can effectively eliminate image jitter, eliminate interference noise, and smooth the edge. In addition, the present invention is simple to implement and convenient to operate.

尽管已经示出和描述了本发明的实施例,对于本领域的普通技术人员而言,可以理解在不脱离本发明的原理和精神的情况下可以对这些实施例进行多种变化、修改、替换和变型,本发明的范围由所附权利要求及其等同限定。Although the embodiments of the present invention have been shown and described, those skilled in the art can understand that various changes, modifications and substitutions can be made to these embodiments without departing from the principle and spirit of the present invention. and modifications, the scope of the invention is defined by the appended claims and their equivalents.

Claims (8)

1.一种消除深度图序列背景和边缘抖动的方法,其特征在于,包括以下步骤:1. A method for eliminating depth map sequence background and edge jitter, characterized in that, comprising the following steps: 读取源图像序列的背景图像对并计算得到所述背景图像的深度图;Reading the background image pair of the source image sequence and calculating the depth map of the background image; 计算所述源图像序列和所述背景图像的帧差以得到帧差数组;calculating the frame difference between the source image sequence and the background image to obtain a frame difference array; 计算以得到所述源图像序列每一帧的深度图;Calculate to obtain the depth map of each frame of the source image sequence; 根据预设阈值判断所述源图像深度图的前景和背景,且消除背景抖动;judging the foreground and background of the depth map of the source image according to a preset threshold, and eliminating background jitter; 对所述源图像深度图的前景赋值以消除前景轮廓抖动;Assigning a value to the foreground of the source image depth map to eliminate the jitter of the foreground contour; 通过中值滤波和双边滤波以优化得到最终所述源图像深度图。The final depth map of the source image is obtained through optimization by median filtering and bilateral filtering. 2.如权利要求1所述的消除深度图序列背景和边缘抖动的方法,其特征在于,利用灰度变换公式将所述背景图像和所述源图像的每个像素点的数据变为灰度值后,以计算得到所述背景图像和所述源图像的深度图。2. The method for eliminating the background and edge jitter of the depth map sequence as claimed in claim 1, wherein the data of each pixel of the background image and the source image are changed into grayscale by using a grayscale transformation formula value, to calculate the depth map of the background image and the source image. 3.如权利要求2所述的消除深度图序列背景和边缘抖动的方法,其特征在于,所述计算所述源图像序列和所述背景图像的帧差以得到帧差数组进一步包括:3. The method for eliminating depth map sequence background and edge jitter as claimed in claim 2, wherein said calculating the frame difference of said source image sequence and said background image to obtain a frame difference array further comprises: 读取所述源图像序列每一帧图像对;Read each frame image pair of the source image sequence; 对所述源图像序列每一帧图像做灰度变换;Perform grayscale transformation on each frame image of the source image sequence; 对灰度变换后的所述源图像参考视图和所述背景图参考视图做差,以得到所述帧差数组。The difference between the source image reference view and the background image reference view after the gray scale transformation is performed to obtain the frame difference array. 4.如权利要求3所述的消除深度图序列背景和边缘抖动的方法,其特征在于,所述根据预设阈值判断所述源图像深度图的前景和背景,且消除背景抖动进一步包括:4. The method for eliminating depth map sequence background and edge jitter as claimed in claim 3, wherein said judging the foreground and background of said source image depth map according to a preset threshold, and eliminating background jitter further comprises: 通过预设阈值对所述帧差数组进行阈值判断,以区分所述源图像深度图的前景和背景;performing threshold judgment on the frame difference array by using a preset threshold to distinguish the foreground and background of the depth map of the source image; 用所述背景深度图对应的值为所述源图像深度图的背景赋值。Use the value corresponding to the background depth map to assign a value to the background of the source image depth map. 5.如权利要求4所述的消除深度图序列背景和边缘抖动的方法,其特征在于,所述对所述源图像深度图的前景赋值以消除前景轮廓抖动进一步包括:5. the method for eliminating depth map sequence background and edge jitter as claimed in claim 4, is characterized in that, described foreground assignment to described source image depth map further comprises: 统计所述前景范围内所有的像素点;Count all pixels within the foreground range; 通过计算得到统一值作为深度值以对所述前景赋予所述深度值。A unified value is obtained through calculation as a depth value to assign the depth value to the foreground. 6.如权利要求5所述的消除深度图序列背景和边缘抖动的方法,其特征在于,所述通过中值滤波和双边滤波以优化得到最终所述源图像深度图进一步包括:6. The method for eliminating depth map sequence background and edge jitter as claimed in claim 5, wherein said obtaining the final source image depth map through median filtering and bilateral filtering further comprises: 对消除背景抖动和前景轮廓抖动的所述源图像序列的深度图进行中值滤波,以去除所述背景中的干扰噪声;performing median filtering on the depth map of the source image sequence from which background jitter and foreground contour jitter has been eliminated, to remove disturbing noise in the background; 对所述去除背景中干扰噪声的深度图进行双边滤波以平滑所述深度图的边缘,得到最终优化后的源图像序列的深度图。Bilateral filtering is performed on the depth map from which interference noise in the background has been removed to smooth edges of the depth map to obtain a final optimized depth map of the source image sequence. 7.一种消除深度图序列背景和边缘抖动的装置,其特征在于,包括:7. A device for eliminating background and edge jitter of a depth map sequence, characterized in that it comprises: 图像获取模块,用于读取源图像序列的背景图像对并计算得到所述背景图像的深度图;An image acquisition module, configured to read the background image pair of the source image sequence and calculate the depth map of the background image; 帧差数组计算模块,用于计算所述源图像序列和所述背景图像的帧差以得到帧差数组;A frame difference array calculation module, configured to calculate the frame difference between the source image sequence and the background image to obtain a frame difference array; 计算模块,用于计算以得到所述源图像序列每一帧的深度图;A calculation module, used for calculation to obtain the depth map of each frame of the source image sequence; 前景背景判断模块,用于根据预设阈值判断所述源图像深度图的前景和背景,且消除背景抖动;A foreground and background judging module, configured to judge the foreground and background of the source image depth map according to a preset threshold, and eliminate background jitter; 前景图像处理模块,用于对所述源图像深度图的前景赋值以消除前景轮廓抖动;合The foreground image processing module is used to assign values to the foreground of the source image depth map to eliminate the jitter of the foreground contour; 图像优化模块,用于通过中值滤波和双边滤波以优化得到最终所述源图像深度图。The image optimization module is used to obtain the final depth map of the source image through median filtering and bilateral filtering. 8.如权利要求7所述的消除深度图序列背景和边缘抖动的装置,其特征在于,利用灰度变换公式将所述背景图像和所述源图像的每个像素点的数据变为灰度值后,以计算得到所述背景图像和所述源图像的深度图。8. The device for eliminating the background and edge jitter of the depth map sequence as claimed in claim 7, wherein the data of each pixel of the background image and the source image are changed into grayscale by using a grayscale transformation formula value, to calculate the depth map of the background image and the source image.
CN 201010222349 2010-06-30 2010-06-30 Method for eliminating background and edge shake of depth map sequence Expired - Fee Related CN101873509B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201010222349 CN101873509B (en) 2010-06-30 2010-06-30 Method for eliminating background and edge shake of depth map sequence

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201010222349 CN101873509B (en) 2010-06-30 2010-06-30 Method for eliminating background and edge shake of depth map sequence

Publications (2)

Publication Number Publication Date
CN101873509A true CN101873509A (en) 2010-10-27
CN101873509B CN101873509B (en) 2013-03-27

Family

ID=42998125

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201010222349 Expired - Fee Related CN101873509B (en) 2010-06-30 2010-06-30 Method for eliminating background and edge shake of depth map sequence

Country Status (1)

Country Link
CN (1) CN101873509B (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102298708A (en) * 2011-08-19 2011-12-28 四川长虹电器股份有限公司 3D mode identification method based on color and shape matching
CN102622768A (en) * 2012-03-14 2012-08-01 清华大学 Depth-map gaining method of plane videos
CN103024419A (en) * 2012-12-31 2013-04-03 青岛海信信芯科技有限公司 Video image processing method and system
CN104093014A (en) * 2014-07-21 2014-10-08 宇龙计算机通信科技(深圳)有限公司 Image processing method and image processing device
CN104395931A (en) * 2012-11-07 2015-03-04 皇家飞利浦有限公司 Generation of a depth map for an image
CN104463775A (en) * 2014-10-31 2015-03-25 小米科技有限责任公司 Device and method for achieving depth-of-field effect of image
CN105120129A (en) * 2015-08-05 2015-12-02 西安电子科技大学 Infrared small target image sequence simulation method of infrared area array camera shake
CN105744171A (en) * 2016-03-30 2016-07-06 联想(北京)有限公司 Image processing method and electronic equipment
CN107251115A (en) * 2015-03-23 2017-10-13 日本电气株式会社 Information processor, information processing method and program
CN108226949A (en) * 2018-04-08 2018-06-29 广州市盛光微电子有限公司 A multi-lens and multi-sensor information fusion device and method for visible light and mid-far infrared light
CN110378945A (en) * 2019-07-11 2019-10-25 Oppo广东移动通信有限公司 Depth map processing method and device and electronic equipment
CN111626086A (en) * 2019-02-28 2020-09-04 北京市商汤科技开发有限公司 Living body detection method, living body detection device, living body detection system, electronic device, and storage medium
CN114007058A (en) * 2020-07-28 2022-02-01 阿里巴巴集团控股有限公司 Depth map correction method, video processing method, video reconstruction method and related devices
CN114998139A (en) * 2022-06-02 2022-09-02 上海圭目机器人有限公司 Jitter elimination improvement method of road surface depth picture shot based on line laser 3d camera

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101237522A (en) * 2007-02-02 2008-08-06 华为技术有限公司 A motion detection method and device
WO2009061305A1 (en) * 2007-11-09 2009-05-14 Thomson Licensing System and method for depth map extraction using region-based filtering
CN101483788A (en) * 2009-01-20 2009-07-15 清华大学 Method and apparatus for converting plane video into tridimensional video
CN101542529A (en) * 2006-11-21 2009-09-23 皇家飞利浦电子股份有限公司 Generation of depth map for an image
CN101630408A (en) * 2009-08-14 2010-01-20 清华大学 Depth map treatment method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101542529A (en) * 2006-11-21 2009-09-23 皇家飞利浦电子股份有限公司 Generation of depth map for an image
CN101237522A (en) * 2007-02-02 2008-08-06 华为技术有限公司 A motion detection method and device
WO2009061305A1 (en) * 2007-11-09 2009-05-14 Thomson Licensing System and method for depth map extraction using region-based filtering
CN101483788A (en) * 2009-01-20 2009-07-15 清华大学 Method and apparatus for converting plane video into tridimensional video
CN101630408A (en) * 2009-08-14 2010-01-20 清华大学 Depth map treatment method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
《光电子·激光》 20100531 朱波等 面向虚拟视点图像绘制的深度图编码算法 718-724 1-8 第21卷, 第5期 2 *

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102298708A (en) * 2011-08-19 2011-12-28 四川长虹电器股份有限公司 3D mode identification method based on color and shape matching
CN102298708B (en) * 2011-08-19 2013-08-07 四川长虹电器股份有限公司 3D mode identification method based on color and shape matching
CN102622768A (en) * 2012-03-14 2012-08-01 清华大学 Depth-map gaining method of plane videos
CN102622768B (en) * 2012-03-14 2014-04-09 清华大学 Depth-map gaining method of plane videos
CN104395931A (en) * 2012-11-07 2015-03-04 皇家飞利浦有限公司 Generation of a depth map for an image
CN103024419A (en) * 2012-12-31 2013-04-03 青岛海信信芯科技有限公司 Video image processing method and system
CN104093014A (en) * 2014-07-21 2014-10-08 宇龙计算机通信科技(深圳)有限公司 Image processing method and image processing device
CN104463775A (en) * 2014-10-31 2015-03-25 小米科技有限责任公司 Device and method for achieving depth-of-field effect of image
CN107251115A (en) * 2015-03-23 2017-10-13 日本电气株式会社 Information processor, information processing method and program
CN105120129A (en) * 2015-08-05 2015-12-02 西安电子科技大学 Infrared small target image sequence simulation method of infrared area array camera shake
CN105120129B (en) * 2015-08-05 2018-01-30 西安电子科技大学 The Infrared DIM-small Target Image sequence emulation mode of infrared area array cameras shake
CN105744171A (en) * 2016-03-30 2016-07-06 联想(北京)有限公司 Image processing method and electronic equipment
CN105744171B (en) * 2016-03-30 2019-03-08 联想(北京)有限公司 A kind of image processing method and electronic equipment
CN108226949A (en) * 2018-04-08 2018-06-29 广州市盛光微电子有限公司 A multi-lens and multi-sensor information fusion device and method for visible light and mid-far infrared light
CN111626086A (en) * 2019-02-28 2020-09-04 北京市商汤科技开发有限公司 Living body detection method, living body detection device, living body detection system, electronic device, and storage medium
CN110378945A (en) * 2019-07-11 2019-10-25 Oppo广东移动通信有限公司 Depth map processing method and device and electronic equipment
CN110378945B (en) * 2019-07-11 2021-06-18 Oppo广东移动通信有限公司 Depth map processing method, device and electronic device
CN114007058A (en) * 2020-07-28 2022-02-01 阿里巴巴集团控股有限公司 Depth map correction method, video processing method, video reconstruction method and related devices
CN114998139A (en) * 2022-06-02 2022-09-02 上海圭目机器人有限公司 Jitter elimination improvement method of road surface depth picture shot based on line laser 3d camera
CN114998139B (en) * 2022-06-02 2025-04-04 上海圭目机器人有限公司 An improved method for eliminating jitter of road depth images taken with a line laser 3D camera

Also Published As

Publication number Publication date
CN101873509B (en) 2013-03-27

Similar Documents

Publication Publication Date Title
CN101873509A (en) A Method for Eliminating Background and Edge Jitter of Depth Map Sequences
US8711204B2 (en) Stereoscopic editing for video production, post-production and display adaptation
JP5536115B2 (en) Rendering of 3D video images on stereoscopic display
US8311318B2 (en) System for generating images of multi-views
TWI531212B (en) System and method of rendering stereoscopic images
CN100565589C (en) The apparatus and method that are used for depth perception
CN1942902B (en) Reduction of Ghosting Artifacts for 2.5D Image Reproduction
CN108513123B (en) Image array generation method for integrated imaging light field display
CN102360489B (en) Method and device for realizing conversion from two-dimensional image to three-dimensional image
CN101277454A (en) A real-time stereoscopic video generation method based on binocular cameras
CN101771893A (en) Video frequency sequence background modeling based virtual viewpoint rendering method
CN102026013A (en) Stereo video matching method based on affine transformation
CN101610425A (en) A method and device for evaluating the quality of stereoscopic images
CN101808251A (en) Method for extracting blocking information in stereo image pair
CN104506872A (en) Method and device for converting planar video into stereoscopic video
CN103369331A (en) Image hole filling method, image hole filling device, video image processing method and video image processing device
CN102026012B (en) Generation method and device of depth map through three-dimensional conversion to planar video
CN102780900B (en) Image display method of multi-person multi-view stereoscopic display
Schmeing et al. Depth image based rendering: A faithful approach for the disocclusion problem
TWI478100B (en) Method of image depth estimation and apparatus thereof
CN106803952B (en) In conjunction with the cross validation depth map quality evaluating method of JND model
CN110149508B (en) An array map generation and filling method based on one-dimensional integrated imaging system
CN102831603A (en) Method and device for carrying out image rendering based on inverse mapping of depth maps
CN102447932B (en) Reconstruction method of view point of free view point video
CN102087417B (en) Method for detecting stereo degree of autostereoscopic display by using random dot stereopsis

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20130327