CN102158725A - Stereoscopic image generation method and system - Google Patents

Stereoscopic image generation method and system Download PDF

Info

Publication number
CN102158725A
CN102158725A CN 201110117012 CN201110117012A CN102158725A CN 102158725 A CN102158725 A CN 102158725A CN 201110117012 CN201110117012 CN 201110117012 CN 201110117012 A CN201110117012 A CN 201110117012A CN 102158725 A CN102158725 A CN 102158725A
Authority
CN
China
Prior art keywords
pixel
parameter
offset
image
irregularities
Prior art date
Application number
CN 201110117012
Other languages
Chinese (zh)
Other versions
CN102158725B (en
Inventor
楚明磊
Original Assignee
深圳超多维光电子有限公司
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 深圳超多维光电子有限公司 filed Critical 深圳超多维光电子有限公司
Priority to CN 201110117012 priority Critical patent/CN102158725B/en
Publication of CN102158725A publication Critical patent/CN102158725A/en
Application granted granted Critical
Publication of CN102158725B publication Critical patent/CN102158725B/en

Links

Abstract

The invention discloses a stereoscopic image generation method and a stereoscopic image generation system. By the method and the system, one or more images with parallax with a source map can be simply and conveniently obtained. The method comprises the following steps of: receiving objects captured from the more than one images, and arranging the captured objects into a background image to obtain a first planar image; receiving a concavo-convex parameter of a characteristic pixel in the first planar image, and calculating the concavo-convex parameters corresponding to each pixel in the firstplanar image according to the concavo-convex parameter of the characteristic pixel; and converting the concavo-convex parameters corresponding to each pixel in the first planar image into migration parameters, and migrating each pixel in the first planar image to obtain a second planar image. The system comprises a first planar image generation device, a concavo-convex parameter calculation device and a second planar image generation device. The method provided by the invention can replace the conventional complex method for obtaining a three-dimensional image, and is simpler to operate without high cost.

Description

一种生成立体图像的方法和系统 A method and system for generating a stereoscopic image

技术领域 FIELD

[0001] 本发明涉及图像处理领域,具体涉及一种生成立体图像的方法和系统。 [0001] The present invention relates to image processing, and particularly relates to a method and system for generating a stereoscopic image. 背景技术 Background technique

[0002] 随着三维显示技术的发展,三维显示越来越多的融入到了大家的生活中。 [0002] With the development of 3D display technology, three-dimensional display more and more into everyone's life. 目前的三维显示技术是利用人眼的视差特征,在人眼裸视或者佩戴某种辅助设备的条件下,呈现出具有空间深度信息的逼真立体影像。 Current three-dimensional display technology is a parallax characterized using the human, naked eye under conditions of the eye or wearing some auxiliary equipment, presents a realistic stereoscopic image having spatial depth information.

[0003] 三维显示的图像一般都是存在视差的两幅或者多幅图像,而这些图像的得到方式一般有以下几种:一是用双镜头摄像机拍摄得到,而这种方法中使用的摄像机价格昂贵; 另一种方法是利用单镜头相机,在不同角度拍摄图像,这种方法操作比较麻烦,并且不易调整视差。 [0003] three-dimensional image display are generally present two or more images of parallax images which give way generally have the following: First, to obtain a dual-lens cameras, the camera used in this method price expensive; another method is to use a single-lens camera, images captured at different angles, this method of operation cumbersome and not easy to adjust the parallax.

发明内容 SUMMARY

[0004] 本发明要解决的技术问题是提供一种生成立体图像的方法和系统,可更简单方便地得到一幅或者一幅以上与源图有视差的图像。 [0004] The present invention is to solve the technical problem of providing a method and system for generating a stereoscopic image, it may be more easy to obtain a more or a parallax of the source image.

[0005] 为解决上述技术问题,本发明提供了一种生成立体图像方法,包括: [0005] In order to solve the above technical problem, the present invention provides a method for generating a stereoscopic image, comprising:

[0006] 接收从一幅以上的图像中截取的对象,将所述截取的对象放置于背景图像中,得到第一平面图像; [0006] receiving object taken from more than one image in the taken image object is placed in the background, to obtain a first image plane;

[0007] 接收第一平面图像中特征像素的凸凹参数,根据该特征像素的凸凹参数计算该第一平面图像上每个像素对应的凸凹参数; [0007] irregularities parameters received first features in the image plane of pixels, unevenness on the first parameter corresponding to each pixel of the image plane unevenness parameters calculated on the basis of the feature pixel;

[0008] 将第一平面图像上各像素对应的凸凹参数转化为偏移参数,对第一平面图像上每个像素进行偏移,得到第二平面图像。 [0008] corresponding to each pixel on a first image plane into irregularities parameter offset parameter for each pixel on the image plane of the first shift to obtain a second image plane.

[0009] 进一步地,得到所述第二平面图像后,所述方法还包括:合并所述第一平面图像和第二平面图像,生成立体图像,或者合并两幅以上第二平面图像,生成立体图像。 After [0009] Further, to obtain the second image plane, the method further comprising: combining the first image and the second planar image plane to generate a stereoscopic image, merging two or more second image plane, generating a stereoscopic image.

[0010] 进一步地,得到所述第二平面图像后,所述方法还包括:对所述第二平面图像中的空白像素进行修复填充。 After [0010] Further, to obtain the second image plane, the method further comprising: the second image plane blank pixels repair filler.

[0011] 进一步地,所述接收第一平面图像中特征像素的凸凹参数,根据该特征像素的凸凹参数计算该第一平面图像上每个像素对应的凸凹参数的步骤包括: Step [0011] Further, the reception characteristics of the first image plane pixel parameter punch, punch parameters calculated on the first image plane corresponding to each pixel based on the pixel irregularities feature parameters comprises:

[0012] 根据对象上第一像素到该对象上各特征像素的距离以及各特征像素的凸凹参数计算获得所述第一像素的凸凹参数;重复本步骤获得所述对象上所有像素的凸凹参数; [0012] irregularities obtained by calculation according to the parameter of the first pixel to the first pixel on the object distance of each characteristic parameter convexo concave on the object pixel and wherein each pixel; repeat this step for obtaining parameters of all pixels on the convexo concave of the object;

[0013] 对第一平面图像上所有对象执行上述操步骤,得到第一平面图像上每个像素对应的凸凹参数。 [0013] All the above operation on the object image plane on a first step, to obtain a first planar image irregularities parameters corresponding to each pixel pair.

[0014] 进一步地,所述根据对象上第一像素到该对象上各特征像素的距离以及各特征像素的凸凹参数计算获得所述第一像素的凸凹参数的步骤包括: Step [0014] Furthermore, the object according to the first pixel of each feature on the object distance of each pixel and the pixel characteristic parameters obtained by calculation embossed irregularities parameter of the first pixel comprises:

[0015] 所述第一像素的凸凹参数等于各特征像素的权重系数、距离参数和凸凹参数三者乘积之和,其中,所述距离参数为所述第一像素到该特征像素的距离与所述第一像素到所有特征像素的距离之和的比值。 [0015] The first parameter is equal to each pixel irregularities feature weights pixel weighting coefficients, the product of the three parameters and the distance parameter and the punch, wherein the first parameter is the distance from pixel to pixel and the feature the first pixel and the distance to all features of the ratio of the pixels.

[0016] 进一步地,所述偏移参数包括偏移方向以及偏移距离; [0016] Further, the offset direction and offset parameter comprises offset distance;

[0017] 所述将第一平面图像上各像素对应的凸凹参数转化为偏移参数,对第一平面图像上每个像素进行偏移,得到第二平面图像的步骤包括: [0017] The unevenness of the parameter corresponding to each pixel on the image plane into a first offset parameter for each pixel on the image plane offset of the first step to obtain a second image plane comprising:

[0018] 将第一平面图像上各像素对应的凸凹参数转化为第一偏移参数,对第一平面图像上每个像素进行第一次偏移,得到第一幅第二平面图像; [0018] The irregularities on a first parameter corresponding to each pixel of the image plane into a first offset parameter for each pixel on the first image plane of the first shift, the first one to give a second image plane;

[0019] 将第一平面图像上各像素对应的凸凹参数转化为第二偏移参数,其中所述第二偏移参数中的偏移距离等于当前偏移次数、偏移系数以及第一偏移参数中偏移距离的乘积, 对第一平面图像上每个像素进行第二次偏移,得到第二幅第二平面图像; [0019] The pixels of each image corresponding to irregularities on a first plane into a second parameter offset parameter, wherein the second offset parameter is equal to the current offset from the frequency offset, the first offset and the offset coefficient the product of the offset distance parameter of each pixel on a second image plane of the first offset, the second web to obtain a second image plane;

[0020] 将第一平面图像上各像素对应的凸凹参数转化为第三偏移参数,其中所述第三偏移参数中的偏移距离等于当前偏移次数、偏移系数以及第一偏移参数中偏移距离的乘积, 对第一平面图像上每个像素进行第三次偏移,得到第三幅第二平面图像; [0020] The pixels of each image corresponding to irregularities on the first plane into the third parameter offset parameter, wherein the third offset parameter is equal to the current offset from the frequency offset, the first offset and the offset coefficient the product of the offset distance parameter of each pixel on the image plane of the first third shift, a second web to obtain a third image plane;

[0021] 以此类推,得到多幅第二平面图像。 [0021] and so on, to obtain a second plurality of planar images.

[0022] 进一步地,所述偏移参数包括偏移方向以及偏移距离; [0022] Further, the offset direction and offset parameter comprises offset distance;

[0023] 所述将第一平面图像上各像素对应的凸凹参数转化为偏移参数的步骤包括: Step [0023] The pixels of each image plane corresponding to a first parameter into irregularities offset parameter comprises:

[0024] 将第一平面图像上第二像素对应的凸凹参数的正负转化为所述第二像素对应的偏移参数中的偏移方向,将第二像素对应的凸凹参数的绝对值转化为所述第二像素对应的偏移参数中的偏移距离。 [0024] The negative second pixel conversion parameter irregularities on a first plane image corresponding to the offset direction of the offset parameters corresponding to a second pixel, the absolute value of the second conversion parameters corresponding to the pixels punch is the second pixel shift distance corresponding to the offset parameter.

[0025] 为解决上述技术问题,本发明还提供了一种生成立体图像系统,包括第一平面图像生成装置、凸凹参数计算装置、第二平面图像生成装置,其中: [0025] In order to solve the above technical problem, the present invention also provides a method of generating a stereoscopic image system, image generating means comprising a first plane, unevenness parameter calculating means, the second planar image generating apparatus, wherein:

[0026] 所述第一平面图像生成装置,其用于接收从一幅以上的图像中截取的对象,将所述截取的对象放置于背景图像中,得到第一平面图像; [0026] The first planar image generating means for receiving an object, taken from more than one image in the taken image object is placed in the background, to obtain a first image plane;

[0027] 所述凸凹参数计算装置,其用于接收第一平面图像中特征像素的凸凹参数,根据该特征像素的凸凹参数计算该第一平面图像上每个像素对应的凸凹参数; [0027] The irregularities parameter calculating means for receiving the first punch and the parameter characteristic pixels in the image plane, calculation of the parameters on the first punch planar image corresponding to each pixel according to the characteristic parameters of pixel irregularities;

[0028] 所述第二平面图像生成装置,其用于将第一平面图像上各像素对应的凸凹参数转化为偏移参数,对第一平面图像上每个像素进行偏移,得到第二平面图像。 [0028] The second plane image generating means for each pixel corresponding to a first parameter into a plane image irregularities offset parameter for each pixel on the image plane of the first shift to obtain a second plane image.

[0029] 进一步地,所述系统还包括立体图像生成装置,其用于在得到所述第二平面图像后,合并所述第一平面图像和第二平面图像,生成立体图像,或者合并两幅以上第二平面图像,生成立体图像。 [0029] Preferably, the system further comprises a stereoscopic image generating means for obtaining the second plane in the image, merging the first image and the second planar image plane, generating a stereoscopic image, or combine two more second planar image, a stereoscopic image generation.

[0030] 进一步地,所述系统还包括修复装置,其用于对所述第二平面图像中的空白像素进行修复填充。 [0030] Preferably, the system further comprises a repair device, for the second image plane blank pixels repair filler.

[0031] 进一步地,所述凸凹参数计算装置用于采用以下方式接收第一平面图像中特征像素的凸凹参数,根据该特征像素的凸凹参数计算该第一平面图像上每个像素对应的凸凹参数: [0031] Further, the punch parameter calculating means for receiving a first image plane pixel parameter characteristic of irregularities in the following manner, unevenness parameter calculated corresponding to each pixel on the image plane in accordance with a first feature parameter of the pixel irregularities :

[0032] 所述凸凹参数计算装置用于重复执行以下步骤得到所述对象上所有像素的凸凹参数:根据对象上第一像素到该对象上各特征像素的距离以及各特征像素的凸凹参数计算获得所述第一像素的凸凹参数。 [0032] The irregularities parameter calculating means for repeating the following steps to give irregularities on the parameters of all pixels of an object: a first pixel on the object according to the object distance of each pixel of the convex-concave characteristics and parameters of each pixel is obtained by calculation feature the first pixel irregularities parameters.

[0033] 进一步地,所述凸凹参数计算装置用于采用以下方式根据对象上第一像素到该对象上各特征像素的距离以及各特征像素的凸凹参数计算获得所述第一像素的凸凹参数: [0033] Further, the parameter calculating means for irregularities in the following manner according to the first pixel on the object distance of each pixel on the object characteristics and the characteristics of each pixel is obtained by calculation parameters irregularities irregularities parameter of the first pixel:

6[0034] 所述第一像素的凸凹参数等于各特征像素的权重系数、距离参数和凸凹参数三者乘积之和,其中,所述距离参数为所述第一像素到该特征像素的距离与所述第一像素到所有特征像素的距离之和的比值。 The three product 6 [0034] of the first pixel of each characteristic parameter is equal to irregularities pixel weighting coefficients, and parameters from the parameter and the punch, wherein the first parameter is the distance of the feature pixel to pixel distance and the ratio of the distance to all of the features of the first pixel to pixel.

[0035] 进一步地,所述偏移参数包括偏移方向以及偏移距离; [0035] Further, the offset direction and offset parameter comprises offset distance;

[0036] 所述第二平面图像生成装置用于采用以下方式将所述将第一平面图像上各像素对应的凸凹参数转化为偏移参数,对第一平面图像上每个像素进行偏移,得到第二平面图像: [0036] The means for generating the second image plane in the following manner corresponding to each pixel of the first image plane into irregularities parameter offset parameter for each pixel on the image plane of the first offset, to obtain a second image plane:

[0037] 将第一平面图像上各像素对应的凸凹参数转化为第一偏移参数,对第一平面图像上每个像素进行第一次偏移,得到第一幅第二平面图像; [0037] The irregularities on a first parameter corresponding to each pixel of the image plane into a first offset parameter for each pixel on the first image plane of the first shift, the first one to give a second image plane;

[0038] 将第一平面图像上各像素对应的凸凹参数转化为第二偏移参数,其中所述第二偏移参数中的偏移距离等于当前偏移次数、偏移系数以及第一偏移参数中偏移距离的乘积, 对第一平面图像上每个像素进行第二次偏移,得到第二幅第二平面图像; [0038] The pixels of each image corresponding to irregularities on a first plane into a second parameter offset parameter, wherein the second offset parameter is equal to the current offset from the frequency offset, the first offset and the offset coefficient the product of the offset distance parameter of each pixel on a second image plane of the first offset, the second web to obtain a second image plane;

[0039] 将第一平面图像上各像素对应的凸凹参数转化为第三偏移参数,其中所述第三偏移参数中的偏移距离等于当前偏移次数、偏移系数以及第一偏移参数中偏移距离的乘积, 对第一平面图像上每个像素进行第三次偏移,得到第三幅第二平面图像; [0039] The pixels of each image corresponding to irregularities on the first plane into the third parameter offset parameter, wherein the third offset parameter is equal to the current offset from the frequency offset, the first offset and the offset coefficient the product of the offset distance parameter of each pixel on the image plane of the first third shift, a second web to obtain a third image plane;

[0040] 以此类推,得到多幅第二平面图像。 [0040] and so on, to obtain a second plurality of planar images.

[0041] 进一步地,所述偏移参数包括偏移方向以及偏移距离; [0041] Further, the offset direction and offset parameter comprises offset distance;

[0042] 所述第二平面图像生成装置用于采用以下方式将第一平面图像上各像素对应的凸凹参数转化为偏移参数: [0042] The means for generating the second image plane in the following manner corresponding to each pixel on the first image plane into irregularities parameter offset parameter:

[0043] 将第一平面图像上第二像素对应的凸凹参数的正负转化为所述第二像素对应的偏移参数中的偏移方向,将第二像素对应的凸凹参数的绝对值转化为所述第二像素对应的偏移参数中的偏移距离。 [0043] The negative second pixel conversion parameter irregularities on a first plane image corresponding to the offset direction of the offset parameters corresponding to a second pixel, the absolute value of the second conversion parameters corresponding to the pixels punch is the second pixel shift distance corresponding to the offset parameter.

[0044] 本发明实施例通过对任意图像进行分割,获得图像上的物体对象,然后在背景上设置该一个或多个物体对象的位置,最后通过图像偏移算法生成具有视差的两幅或者多幅具有视差的图像,从而替代了现有的获得三维图像的复杂的方法,操作更简单,且无需昂贵的费用。 [0044] Example embodiments of the present invention by any of the image segmentation, the object is obtained on the object image, and the installation position of the one or more objects on the background object, and finally by image shift algorithm for generating a two or a plurality of parallax web images with parallax, replacing the conventional method of obtaining a complex three-dimensional image, the operation is simpler, and without high costs.

附图说明 BRIEF DESCRIPTION

[0045] 图1为系统示意图; [0045] FIG. 1 is a schematic diagram of the system;

[0046] 图2为本发明实施例1的流程图。 [0046] Example 2 is a flowchart of the embodiment 1 of the present invention.

具体实施方式 Detailed ways

[0047] 本发明通过对原始图像进行分割,获得待进行立体处理的对象,设置该些对象的层次位置,并通过图像偏移算法,得到一幅或者多幅与原图有视差的图像。 [0047] The present invention is by dividing the original image to obtain a stereoscopic object to be processed, the plurality of disposed position of the object hierarchy, and the image shift algorithm, or to obtain a plurality of images with the original parallax. 具体采用以下方案: DETAILED using the following protocol:

[0048] 接收从一幅以上的图像中截取的对象,将所述截取的对象放置于背景图像中,得到第一平面图像; [0048] The receiving object taken from more than one image in the taken image object is placed in the background, to obtain a first image plane;

[0049] 接收第一平面图像中特征像素的凸凹参数,根据该特征像素的凸凹参数计算该第一平面图像上每个像素对应的凸凹参数;[0050] 将第一平面图像上各像素对应的凸凹参数转化为偏移参数,对第一平面图像上每个像素进行偏移,得到第二平面图像。 [0049] wherein the pixels receiving the first planar image unevenness parameter calculated corresponding to each pixel of the image on a first plane irregularities parameter according to the parameter unevenness characteristic pixels; [0050] corresponding to each pixel of the image on a first plane parameter into irregularities offset parameter for each pixel on the image plane of the first shift to obtain a second image plane.

[0051] 优选地,得到所述第二平面图像后,合并所述第一平面图像和第二平面图像,生成立体图像,或者合并两幅以上第二平面图像,生成立体图像。 After [0051] Preferably, the second plane to obtain an image, merging the first image and the second planar image plane, generating stereoscopic images, merging two or more second planar image, a stereoscopic image generation.

[0052] 上述对象可能是一个物体也可能是一片区域。 [0052] The object may be an object may also be an area. 例如可以是一个杯子、一栋楼或者 For example, it is a cup, or a building

是一片天空等。 It is a piece of the sky and so on.

[0053] 上述背景图像可以为对象所在的原图,或者也可以是一幅新图。 [0053] The background image may be a picture of the object is located, or may be a new FIG.

[0054] 具体地,所述接收第一平面图像中特征像素的凸凹参数,根据该特征像素的凸凹参数计算该第一平面图像上每个像素对应的凸凹参数的步骤包括:根据对象上第一像素到该对象上各特征像素的距离以及各特征像素的凸凹参数计算获得所述第一像素的凸凹参数;重复本步骤获得所述对象上所有像素的凸凹参数;对第一平面图像上所有对象执行上述操步骤,得到第一平面图像上每个像素对应的凸凹参数。 Step [0054] In particular, the image receiving plane irregularities first parameter characteristic pixels is calculated corresponding to each pixel on the first image plane parameters of the punch and punch feature parameters pixel comprising: the first on the object each of the pixels to the subject pixel and the punch distance characteristic parameter of each pixel of the feature parameters obtained by calculation of the first pixel irregularities; irregularities parameters obtained in this step is repeated for all the pixels on the object; all the objects on the first image plane perform the above operation steps, to give irregularities on the first parameter corresponding to each pixel of the image plane.

[0055] 具体地,所述根据对象上第一像素到该对象上各特征像素的距离以及各特征像素的凸凹参数计算获得所述第一像素的凸凹参数的步骤包括: Step [0055] In particular, the first object based on the pixel on the object distance for each pixel, and wherein each feature parameter obtained by calculation pixel irregularities irregularities parameter of the first pixel comprises:

[0056] 所述第一像素的凸凹参数等于各特征像素的权重系数、距离参数和凸凹参数三者乘积之和,其中,所述距离参数为所述第一像素到该特征像素的距离与所述第一像素到所有特征像素的距离之和的比值。 [0056] The first parameter is equal to each pixel irregularities feature weights pixel weighting coefficients, the product of the three parameters and the distance parameter and the punch, wherein the first parameter is the distance from pixel to pixel and the feature the first pixel and the distance to all features of the ratio of the pixels.

[0057] 具体地,所述偏移参数包括偏移方向以及偏移距离;所述将第一平面图像上各像素对应的凸凹参数转化为偏移参数,对第一平面图像上每个像素进行偏移,得到第二平面图像的步骤包括: [0057] Specifically, the offset direction and offset parameter comprises offset distance; corresponding to the each pixel on the image plane of a first parameter into irregularities offset parameter for each pixel on the image plane of the first offset, to obtain a second image plane comprising the step of:

[0058] 将第一平面图像上各像素对应的凸凹参数转化为第一偏移参数,对第一平面图像上每个像素进行第一次偏移,得到第一幅第二平面图像; [0058] The irregularities on a first parameter corresponding to each pixel of the image plane into a first offset parameter for each pixel on the first image plane of the first shift, the first one to give a second image plane;

[0059] 将第一平面图像上各像素对应的凸凹参数转化为第二偏移参数,其中所述第二偏移参数中的偏移距离等于当前偏移次数、偏移系数以及第一偏移参数中偏移距离的乘积, 对第一平面图像上每个像素进行第二次偏移,得到第二幅第二平面图像; [0059] The pixels of each image corresponding to irregularities on a first plane into a second parameter offset parameter, wherein the second offset parameter is equal to the current offset from the frequency offset, the first offset and the offset coefficient the product of the offset distance parameter of each pixel on a second image plane of the first offset, the second web to obtain a second image plane;

[0060] 将第一平面图像上各像素对应的凸凹参数转化为第三偏移参数,其中所述第三偏移参数中的偏移距离等于当前偏移次数、偏移系数以及第一偏移参数中偏移距离的乘积, 对第一平面图像上每个像素进行第三次偏移,得到第三幅第二平面图像; [0060] The pixels of each image corresponding to irregularities on the first plane into the third parameter offset parameter, wherein the third offset parameter is equal to the current offset from the frequency offset, the first offset and the offset coefficient the product of the offset distance parameter of each pixel on the image plane of the first third shift, a second web to obtain a third image plane;

[0061] 以此类推,得到多幅第二平面图像。 [0061] and so on, to obtain a second plurality of planar images.

[0062] 实现上述方法的系统如图1所示,包括第一平面图像生成装置、凸凹参数计算装置、第二平面图像生成装置,其中: [0062] The system implementing the method shown in Figure 1, comprises a first planar image generating apparatus, unevenness parameter calculating means, the second planar image generating apparatus, wherein:

[0063] 所述第一平面图像生成装置,其用于接收从一幅以上的图像中截取的对象,将所述截取的对象放置于背景图像中,得到第一平面图像; [0063] The first planar image generating means for receiving an object, taken from more than one image in the taken image object is placed in the background, to obtain a first image plane;

[0064] 所述凸凹参数计算装置,其用于接收第一平面图像中特征像素的凸凹参数,根据该特征像素的凸凹参数计算该第一平面图像上每个像素对应的凸凹参数; [0064] The irregularities parameter calculating means for receiving the first punch and the parameter characteristic pixels in the image plane, calculation of the parameters on the first punch planar image corresponding to each pixel according to the characteristic parameters of pixel irregularities;

[0065] 所述第二平面图像生成装置,其用于将第一平面图像上各像素对应的凸凹参数转化为偏移参数,对第一平面图像上每个像素进行偏移,得到第二平面图像。 [0065] The second plane image generating means for each pixel corresponding to a first parameter into a plane image irregularities offset parameter for each pixel on the image plane of the first shift to obtain a second plane image.

[0066] 优选地,所述系统还包括立体图像生成装置,其用于在得到所述第二平面图像后, 合并所述第一平面图像和第二平面图像,生成立体图像,或者合并两幅以上第二平面图像,生成立体图像。 [0066] Preferably, the system further comprises a stereoscopic image generating means for obtaining the second plane in the image, merging the first image and the second planar image plane, generating a stereoscopic image, or combine two more second planar image, a stereoscopic image generation.

[0067] 优选地,所述系统还包括修复装置,其用于对所述第二平面图像中的空白像素进行修复填充。 [0067] Preferably, the system further comprises a repair device, for the second image plane blank pixels repair filler.

[0068] 优选地,所述凸凹参数计算装置用于采用以下方式接收第一平面图像中特征像素的凸凹参数,根据该特征像素的凸凹参数计算该第一平面图像上每个像素对应的凸凹参数:所述凸凹参数计算装置用于重复执行以下步骤得到所述对象上所有像素的凸凹参数: 根据对象上第一像素到该对象上各特征像素的距离以及各特征像素的凸凹参数计算获得所述第一像素的凸凹参数。 [0068] Preferably, the irregularities parameter calculating means for receiving a first image plane pixel parameter characteristic of irregularities in the following manner, punch parameters calculated for each pixel on the first image plane corresponding to the feature parameters in accordance with pixel irregularities : the unevenness parameter calculating means for repeating the following steps to give irregularities on the parameters of all pixels of an object: a first pixel on the object according to the distance between the pixel and the respective characteristic parameters of each convex-concave on the object characteristic pixels obtained by calculation of the the first pixel parameter irregularities.

[0069] 优选地,所述凸凹参数计算装置用于采用以下方式根据对象上第一像素到该对象上各特征像素的距离以及各特征像素的凸凹参数计算获得所述第一像素的凸凹参数:所述第一像素的凸凹参数等于各特征像素的权重系数、距离参数和凸凹参数三者乘积之和,其中,所述距离参数为所述第一像素到该特征像素的距离与所述第一像素到所有特征像素的距离之和的比值。 [0069] Preferably, the parameter calculating means for irregularities in the following manner in accordance with a first pixel on the object distance of each feature on the object pixel and wherein each pixel is obtained by calculation parameters irregularities irregularities parameter of the first pixel: the product of the first three pixels of each characteristic parameter is equal to irregularities pixel weighting coefficient, and the punch distance parameter and parameters, wherein the distance of the feature and the first pixel of the first pixel distance parameter and a pixel-to-pixel distance to the ratio of all features.

[0070] 优选地,所述偏移参数包括偏移方向以及偏移距离。 [0070] Preferably, the offset direction and offset parameter comprises offset distance.

[0071] 优选地,所述第二平面图像生成装置用于采用以下方式将所述将第一平面图像上各像素对应的凸凹参数转化为偏移参数,对第一平面图像上每个像素进行偏移,得到第二平面图像: [0071] Preferably, the means for generating the second image plane in the following manner corresponding to each pixel of the first image plane into irregularities parameter offset parameter for each pixel on the image plane of the first offset, to obtain a second image plane:

[0072] 将第一平面图像上各像素对应的凸凹参数转化为第一偏移参数,对第一平面图像上每个像素进行第一次偏移,得到第一幅第二平面图像; [0072] The irregularities on a first parameter corresponding to each pixel of the image plane into a first offset parameter for each pixel on the first image plane of the first shift, the first one to give a second image plane;

[0073] 将第一平面图像上各像素对应的凸凹参数转化为第二偏移参数,其中所述第二偏移参数中的偏移距离等于当前偏移次数、偏移系数以及第一偏移参数中偏移距离的乘积, 对第一平面图像上每个像素进行第二次偏移,得到第二幅第二平面图像; [0073] The pixels of each image corresponding to irregularities on a first plane into a second parameter offset parameter, wherein the second offset parameter is equal to the current offset from the frequency offset, the first offset and the offset coefficient the product of the offset distance parameter of each pixel on a second image plane of the first offset, the second web to obtain a second image plane;

[0074] 将第一平面图像上各像素对应的凸凹参数转化为第三偏移参数,其中所述第三偏移参数中的偏移距离等于当前偏移次数、偏移系数以及第一偏移参数中偏移距离的乘积, 对第一平面图像上每个像素进行第三次偏移,得到第三幅第二平面图像; [0074] The pixels of each image corresponding to irregularities on the first plane into the third parameter offset parameter, wherein the third offset parameter is equal to the current offset from the frequency offset, the first offset and the offset coefficient the product of the offset distance parameter of each pixel on the image plane of the first third shift, a second web to obtain a third image plane;

[0075] 以此类推,得到多幅第二平面图像。 [0075] and so on, to obtain a second plurality of planar images.

[0076] 优选地,所述第二平面图像生成装置用于采用以下方式将第一平面图像上各像素对应的凸凹参数转化为偏移参数: [0076] Preferably, the means for generating the second image plane in the following manner corresponding to each pixel on the first image plane into irregularities parameter offset parameter:

[0077] 将第一平面图像上第二像素对应的凸凹参数的正负转化为所述第二像素对应的偏移参数中的偏移方向,将第二像素对应的凸凹参数的绝对值转化为所述第二像素对应的偏移参数中的偏移距离。 [0077] The negative second pixel conversion parameter irregularities on a first plane image corresponding to the offset direction of the offset parameters corresponding to a second pixel, the absolute value of the second conversion parameters corresponding to the pixels punch is the second pixel shift distance corresponding to the offset parameter.

[0078] 下文中将结合附图对本发明的实施例进行详细说明。 [0078] below in conjunction with the accompanying drawings of embodiments of the present invention will be described in detail. 需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。 Incidentally, in the case of no conflict, embodiments and features of the embodiments of the present application may be arbitrarily combined with each other.

[0079] 实施例1 [0079] Example 1

[0080] 本实施例以所有对象均从一幅原始图像中获得为例进行说明。 [0080] In this embodiment, all objects are obtained from an original image as an example. 如图2所示,包括以下步骤: As shown in FIG 2 comprises the following steps:

[0081] 第一步:加载原始图像,获得原始图像的基本信息; [0081] The first step: loading an original image, the original image to obtain basic information;

[0082] 原始图像的基本信息包括:图像的尺寸(长和宽),图像中每个像素的颜色值(RGB 值)。 Basic information of [0082] an original image comprising: an image size (length and width), an image of a color value (RGB value) of each pixel. [0083] 第二步:根据用户选择的对象,对原始图像进行分割,将用户选择的一个或两个以上对象从该原始图像中分离出来,并单独存储; [0083] Step 2: According the object selected by the user, the original image is divided, to separate one or more objects selected by the user from the original image, and stored separately;

[0084] 优选采用图像分割算法(或称抠图算法)对原始图像进行分割。 [0084] Image segmentation algorithm is preferably used (or matting algorithm) dividing the original image. 具体分割的方式很多,例如可以采用特定的形状模型进行分割,比如:长方形、圆形等;也可以采用一些算法进行智能的分割,如均值漂移算法、最小割/最大流算法等。 DETAILED divided many ways, for example, using a specific shape model divided, for example: rectangular, circular, etc.; may also use some intelligent segmentation algorithms, such as the mean shift algorithm, minimum cut / maximum flow algorithm.

[0085] 如果需要分离多个对象,通常一次分割一个对象,通过多次运行图像分割算法,分离出多个对象。 [0085] If multiple objects need to be separated, typically a segmentation of an object, the image segmentation algorithm by multiple runs, a plurality of separate objects. 将所有要分离的对象都分割出来后再执行第三步。 All objects are divided to be separated out before the implementation of the third step.

[0086] 第三步:接收从原始图像中截取的对象,将该些对象放置于背景图像中,得到第一平面图像; [0086] The third step: receiving an object, taken from the original image, these objects placed in the background image, to obtain a first image plane;

[0087] 放置的位置关系对后续的立体显示的深度层次(三维显示时的凸凹层次)也会产生影响。 [0087] positioned positional relationship also affects the depth level (level three-dimensional display unevenness) subsequent stereoscopic display. 位于上层的对象较位于下层的对象从视觉上更加凸出。 Located in the upper target positioned lower than the more protruding objects visually.

[0088] 第一平面图像中每个像素的颜色值根据所截取的对象上每个像素的颜色值、背景图像的颜色值,以及对象的放置关系来决定,从视点可见的对象和/或背景的颜色值共同组成第一平面图像的颜色值。 [0088] The color value of each pixel in a first image plane based on the color values, the color value of the background image, and placing the relationship between each pixel of the object on the object taken to determine, from the viewpoint of visible objects and / or background together constitute the color values ​​the color values ​​of the first image plane.

[0089] 上述背景图像可以是一幅新的图像,或者可以是原始图像,还可以是经过立体处理后得到的图像。 [0089] The background image may be a new image, or may be an original image, an image may be obtained after processing perspective.

[0090] 本步骤中,将对象放置于背景图像中时,可根据用户设置的对象的位置信息来进行放置即位置的设置。 When [0090] In this step, the object is placed in a background image, i.e., placement can be set according to the position information of the target position set by the user. 采用此种方式,用户可以自行设置三维显示时各对象的放置关系,给用户较大的自由度,用户体验较好。 Used in this way, the user can set their own three-dimensional display object when the relationship of placement, a large degree of freedom of the user, the user experience is better.

[0091] 第四步:接收第一平面图像中特征像素的凸凹参数,根据该特征像素的凸凹参数计算该第一平面图像上每个像素对应的凸凹参数; [0091] The fourth step: receiving a first image plane parameters characteristic pixels punch, punch parameters calculated on the first image plane corresponding to each pixel according to the characteristic parameters of the pixels of the punch;

[0092] 特征像素是指能体现对象形状或结构特征的像素,例如:凸出的点、凹进的点等。 [0092] wherein the pixel refers to a pixel to reflect the shape or structural features of the object, for example: a projection point, recessed points. 对象是一个长方体,那么特征像素则至少包括该长方体各个可视顶点位置的像素。 The object is a rectangular parallelepiped, characterized in that it includes at least a pixel position of each visible pixel at a vertex of the parallelepiped.

[0093] 该凸凹参数用于表示对应像素点视觉上的凸凹程度,凸凹参数的范围为:[_1,1], 其中-1表示最凹进屏幕,0表示在当前屏幕上,1表示最凸出屏幕。 [0093] This parameter indicates the degree of irregularities on the corresponding pixel irregularities visual irregularities range parameter is: [_, 1], where -1 is recessed screen, the current screen indicates 0, 1 being the most convex the screen. 软件可设置为用户通过双击特征像素,输入对应像素的凸凹参数。 Software can be set by a user double-clicking feature pixel, the pixels corresponding to the input parameters punch. 通过直接对待生成图像上各对象设置凸凹参数避免了现有技术中构建三维模型方案较复杂的弊端。 By direct treatment of the objects set parameters to avoid the drawbacks of the prior irregularities art three-dimensional model constructed on the program to generate more complex images.

[0094] 计算待生成图像上每个像素对应的凸凹参数的步骤包括: Step [0094] The unevenness calculation parameters to be generated corresponding to each pixel of the image comprises:

[0095] 1、先根据用户设置的某一对象上所有特征像素对应的凸凹参数计算该对象每个像素对应的凸凹参数: [0095] 1, first of all the pixels corresponding male and female features calculated parameters set by the user on an object convexo concave of the object parameter corresponding to each pixel:

[0096] 1)设已设凸凹参数的点为:P1,P2,P3.....PN,对应的凸凹参数值为:V1,V2, [0096] 1) has been provided punch parameter set points: P1, P2, P3 ..... PN, corresponding male and female parameter value: V1, V2,

V3,.......VN,对于该对象上其他任意一点PX,计算其到已设凸凹参数的点的距离(此处 V3, ....... VN, other PX any point on the object, to calculate a distance has been set point parameter of irregularities (here

的距离是指二维平面上的距离),设为:D1, D2,D3,.......DN,其中Dl为PX到Pl点的距 The distance refers to the distance on a two-dimensional plane), to: D1, D2, D3, ....... DN, which is the PX to Dl from the point Pl

离,D2为PX到P2点的距离,以此类推; From, D2 is a distance to point P2 PX, and so on;

[0097] 2)通过线性加权法计算PX点的凸凹参数VX : [0097] 2) Compute the point PX irregularities by weighting method parameters VX:

[0098] VX = A1* (Dl/D) *Vl+a2* (D2/D) *V2+a3* (D3/D) *V3+· · · +An* (DN/D) *VN (式1) [0098] VX = A1 * (Dl / D) * Vl + a2 * (D2 / D) * V2 + a3 * (D3 / D) * V3 + · · · + An * (DN / D) * VN (Formula 1 )

[0099] 其中,D = D1+D2+D3+.....+DN ;a为权重系数,a > 0。 [0099] where, D = D1 + D2 + D3 + ..... + DN; a is a weighting factor, a> 0. 为简单起见,优选地,a =1。 For simplicity, preferably, a = 1.

[0100] 重复上述步骤1) ,2)计算出该对象上所有像素对应的凸凹参数。 [0100] Repeat steps 1), 2) to calculate the parameters of the convexo concave on the object corresponding to all the pixels. [0101] 2、重复上述步骤1分别对第一平面图像上每个对象进行计算,得到第一平面图像上每个像素对应的凸凹参数。 [0101] 2, 1, respectively, repeating the above steps for each object on the first image plane is calculated, to obtain a first planar image irregularities parameters corresponding to each pixel.

[0102] 如果背景图像可见,则可将露出的背景作为一对象,采用上述方法进行设置和计算得到背景部分的凸凹参数。 [0102] If the background image is visible, it can be exposed as a background object, and set the calculation method of the above parameters obtained embossed background portion.

[0103] 优选地,在计算出第一平面图像上每个像素对应的凸凹参数后,还可以对得到的凸凹参数进行去噪等优化处理,可采用现有技术中的优化处理方案,本文不再赘述。 [0103] Preferably, the irregularities in the calculation of the parameters on the first image plane corresponding to each pixel, further optimization may be performed on the embossed denoising parameters obtained can be optimized prior art solutions, this article does not then repeat.

[0104] 第五步:将第一平面图像上各像素对应的凸凹参数转化为偏移参数,对第一平面图像上每个像素进行偏移,得到第二平面图像; [0104] Step 5: irregularities on a first parameter corresponding to each pixel of the image plane into an offset parameter for each pixel on the image plane of the first shift to obtain a second image plane;

[0105] 具体地: [0105] In particular:

[0106] 步骤1,根据凸凹参数的取值,将第一平面图像上每个像素的凸凹参数转化为该像素对应的一个或多个偏移参数,该偏移参数包括偏移方向以及偏移距离; [0106] Step 1, based on the value of the parameter punch, the upper punch and the first parameter for each image plane pixel corresponding to the pixel conversion for the one or more parameters of offset, the offset direction and the offset comprises an offset parameter distance;

[0107] 同一像素对应的多个偏移参数中,各偏移参数中的偏移方向相同,偏移距离不同。 [0107] corresponding to the same pixel of the plurality of offset parameters, the same offset direction of each offset parameter, a different offset distance.

[0108] 将第一平面图像上第二像素对应的凸凹参数的正负转化为第二像素对应的偏移参数中的偏移方向,将第二像素对应的凸凹参数的绝对值转化为第二像素对应的偏移参数中的偏移距离。 [0108] The conversion of a first negative embossed image plane pixel corresponding to the second parameter is the second pixel shift direction corresponding to an offset parameter, the absolute value of the second pixel conversion parameters corresponding to the irregularities of the second pixel offset distance corresponding to the offset parameter. 例如:对于凸凹参数为1的像素,其偏移参数为向左偏移N个像素;对于凸凹参数为-1的像素,其偏移参数为向右偏移N个像素。 For example: For a pixel irregularities parameter 1, which is offset parameter is the offset to the left of N pixels; pixel parameter for irregularities -1, which is an offset N offset parameter pixels to the right. 其他的凸凹参数值可以通过插值得到偏移的像素值。 Other irregularities parameter value may be obtained by interpolating the pixel value of the offset.

[0109] 步骤2,根据偏移参数对每个像素进行偏移,得到一幅第二平面图像; [0109] Step 2. The offset parameter for offsetting each pixel, to obtain a second image plane;

[0110] 如果要生成多幅第二平面图像,则重复执行上述步骤1和步骤2,此时,对于同一像素,第二幅第二平面图像的偏移参数与第一幅第二平面图像的偏移参数不同,偏移参数可随着图像的张数不同而增加,例如:对于凸凹参数为1的像素点,第一次偏移的距离为N, 在计算第二幅第二平面图像时,其偏移距离为2*K*N,在计算第三幅第二平面图像时,其偏移距离为3*K*N,以此类推,可以得到多幅第二平面图像,其中,2和3分别为当前的偏移次数,K值可以由用户设定,或者为系统给出的默认值。 [0110] If you want to generate a second plurality of planar image, repeat the above steps 1 and 2, this time, for the same pixel, the second web offset parameter and the second image plane of an image plane of the second different offset parameters, offset parameters may vary with different number of images increases, for example: for irregularities pixel parameter 1, the first offset distance is N, the calculation of the second web at a second image plane , which is offset from the 2 * K * N, in the calculation of the third web a second image plane, which is the offset distance of 3 * K * N, and so on, a second plurality of planar image can be obtained, wherein, 2 and 3 times, respectively, for the current offset, K value can be set by the user or given a system default value.

[0111] 对于图像的空白像素,使用图像修复的方式进行填充。 [0111] For the white pixel of the image, using an image to fill repair mode.

[0112] 采用上述图像偏移算法对像素进行偏移,最终偏移出一张或者多张与第一平面图像有视差的第二平面图像。 [0112] The above-described algorithm pixel image shift offset, the final offset or a plurality of second planar parallax image with the first image plane. 多幅第二平面图像合成后即可得到立体图像,或者将第一平面图像和第二平面图像作为左右图合成后也可得到立体图像。 Can be obtained after the second plurality of stereoscopic image synthesis image plane, or the plane of the first image and the second image plane can be obtained as the left and right stereoscopic image synthesis in FIG.

[0113] 优选地,在获得一幅或者多幅与第一平面图像有视差的第二平面图像后,利用图像补偿算法,补偿因为图像的偏移而产生的空洞像素。 [0113] Preferably, after obtaining a plurality of second planar image or the parallax of the first image plane, using the image compensation algorithm, hollow compensate for shifting the image pixel is generated. 可采用图像修描(Inpainting)技术或者调整(Resize)技术作为图像补偿算法对图像进行自动补偿。 Image retouching employed (Inpainting) technology or adjusted (the Resize) technique as an image on the image compensation algorithm for automatic compensation.

[0114] 以采用inpainting技术进行填补进行说明:根据空白像素旁边的部分像素,在整幅图像上进行搜索,当这部分像素与整幅图像上的某些像素达到一定的匹配时,就可以用这部分像素相邻的像素对空洞像素进行填补。 [0114] In inpainting technique employed to fill will be described: The pixel portion next blank pixels, a search on the entire image, when that part of the certain pixel in the entire image pixels reaches a certain matching, can be used this part of the adjacent pixels pixels pixels to fill the void. 具体地,先在空洞像素边缘处选择一个待匹配模型,例如有5*5个像素,假如其中有13个像素是已知的,有12个像素是空洞像素,利用该13个已知像素在整幅图像上进行匹配,当待匹配模型中的13个已知像素与某一区域的13个像素相同,则该区域为匹配模型,匹配模型内的另12个已知像素用于填补待匹配模型中的12个空白像素。 Specifically, the first edge of the pixel selected in the cavity a model to be matched, for example, 5x5 pixels, if there are 13 pixels which are known, there is a hole 12 pixels pixel by pixel in the 13 known match on the entire image, to be matched when the model 13 with the same known pixels 13 pixels of a region, the region to match the model, other known pixels 12 used to fill in the matching model to be matched model 12 blank pixels.

[0115] 本领域普通技术人员可以理解上述方法中的全部或部分步骤可通过程序来指令相关硬件完成,所述程序可以存储于计算机可读存储介质中,如只读存储器、磁盘或光盘等。 [0115] Those of ordinary skill in the art will be appreciated that the above-described method may be all or part of the steps by a program instructing relevant hardware is completed, the program may be stored in a computer-readable storage medium, such as read only memory, etc., magnetic or optical disk. 可选地,上述实施例的全部或部分步骤也可以使用一个或多个集成电路来实现。 Alternatively, all or part of the steps of the above-described embodiments may be implemented using one or more integrated circuits. 相应地,上述实施例中的各模块/单元可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。 Accordingly, each module / unit in the above-described embodiments may be implemented in the form of hardware, software functional modules may also be implemented. 本发明不限制于任何特定形式的硬件和软件的结合。 The present invention is not limited to any specific combination of hardware and software form.

[0116] 当然,本发明还可有其他多种实施例,在不背离本发明精神及其实质的情况下,熟悉本领域的技术人员当可根据本发明作出各种相应的改变和变形,但这些相应的改变和变形都应属于本发明所附的权利要求的保护范围。 [0116] Of course, the present invention may have various other embodiments without departing from the spirit and the essence of the present invention, those skilled in the art can make various corresponding modifications and variations according to the present invention, but these corresponding changes and variations should fall within the scope of the appended claims.

Claims (14)

1. 一种生成立体图像方法,包括:接收从一幅以上的图像中截取的对象,将所述截取的对象放置于背景图像中,得到第一平面图像;接收第一平面图像中特征像素的凸凹参数,根据该特征像素的凸凹参数计算该第一平面图像上每个像素对应的凸凹参数;将第一平面图像上各像素对应的凸凹参数转化为偏移参数,对第一平面图像上每个像素进行偏移,得到第二平面图像。 A stereoscopic image generating method, comprising: receiving an object, taken from more than one image in the taken image object is placed in the background, to obtain a first image plane; receiving a first planar image characteristic pixels punch parameters, punch parameters calculated corresponding to each pixel on the image plane in accordance with a first feature parameter of the pixel irregularities; corresponding to each pixel on the image plane of the first parameter into irregularities offset parameter for each image on a first plane pixel offset, to obtain a second image plane.
2.如权利要求1所述的方法,其特征在于:得到所述第二平面图像后,所述方法还包括:合并所述第一平面图像和第二平面图像, 生成立体图像,或者合并两幅以上第二平面图像,生成立体图像。 2. The method according to claim 1, wherein: after obtaining the second image plane, the method further comprising: combining the first image and the second planar image plane to generate a stereoscopic image, or a merger of the two more second web plane image, generating the stereoscopic image.
3.如权利要求1所述的方法,其特征在于:得到所述第二平面图像后,所述方法还包括:对所述第二平面图像中的空白像素进行修复填充。 The method according to claim 1, wherein: after obtaining the second image plane, the method further comprising: the second image plane blank pixels repair filler.
4.如权利要求1或2或3所述的方法,其特征在于,所述接收第一平面图像中特征像素的凸凹参数,根据该特征像素的凸凹参数计算该第一平面图像上每个像素对应的凸凹参数的步骤包括:根据对象上第一像素到该对象上各特征像素的距离以及各特征像素的凸凹参数计算获得所述第一像素的凸凹参数;重复本步骤获得所述对象上所有像素的凸凹参数;对第一平面图像上所有对象执行上述操步骤,得到第一平面图像上每个像素对应的凸凹参数。 4. The method of claim 1 or 2 or as claimed in claim 3, wherein said receiving a first parameter irregularities characteristic pixels in the image plane, is calculated for each pixel on the image plane in accordance with a first feature parameter of the pixel irregularities irregularities corresponding parameters comprises the step of: a first pixel on the object according to the object distance of each pixel of the convex-concave characteristics and parameters of each pixel is obtained by calculation characteristic parameter of the first pixel irregularities; repeat this step for all of the object is obtained on pixel irregularities parameters; all of the above operation on the object image plane on a first step, to obtain a first planar image irregularities parameters corresponding to each pixel pair.
5.如权利要求4所述的方法,其特征在于:所述根据对象上第一像素到该对象上各特征像素的距离以及各特征像素的凸凹参数计算获得所述第一像素的凸凹参数的步骤包括:所述第一像素的凸凹参数等于各特征像素的权重系数、距离参数和凸凹参数三者乘积之和,其中,所述距离参数为所述第一像素到该特征像素的距离与所述第一像素到所有特征像素的距离之和的比值。 5. The method according to claim 4, wherein: the first pixel on the object according to the distance of each pixel on the object characteristics and parameters of each characteristic pixels embossed irregularities obtained by calculation of parameters of the first pixel comprising the step of: the first pixel of each feature parameter is equal to irregularities pixel weighting coefficient, a product of the three parameters and the distance parameter and the punch, wherein the first parameter is the distance from pixel to pixel and the feature the first pixel and the distance to all features of the ratio of the pixels.
6.如权利要求1所述的方法,其特征在于: 所述偏移参数包括偏移方向以及偏移距离;所述将第一平面图像上各像素对应的凸凹参数转化为偏移参数,对第一平面图像上每个像素进行偏移,得到第二平面图像的步骤包括:将第一平面图像上各像素对应的凸凹参数转化为第一偏移参数,对第一平面图像上每个像素进行第一次偏移,得到第一幅第二平面图像;将第一平面图像上各像素对应的凸凹参数转化为第二偏移参数,其中所述第二偏移参数中的偏移距离等于当前偏移次数、偏移系数以及第一偏移参数中偏移距离的乘积,对第一平面图像上每个像素进行第二次偏移,得到第二幅第二平面图像;将第一平面图像上各像素对应的凸凹参数转化为第三偏移参数,其中所述第三偏移参数中的偏移距离等于当前偏移次数、偏移系数以及第一偏移参数中偏移距离的 6. The method according to claim 1, wherein: said offset parameter comprises offset distance and an offset direction; corresponding to the each pixel on the image plane of a first parameter into irregularities offset parameter for each step of a first pixel offset in the image plane, obtain a second image plane comprising: a first corresponding to each pixel on the image plane into a first parameter irregularities offset parameter, each pixel on the image plane of the first performing a first shift, the first one to obtain a second image plane; corresponding to each pixel of the image on a first plane into a second parameter irregularities offset parameter, wherein the second offset equal to the offset distance parameter current offset frequency offset coefficient and a product of a first offset parameter offset distance for each pixel on a second image plane of the first offset, the second web to obtain a second image plane; the first plane corresponding to each pixel of the image is embossed on the parameters into a third displacement parameter, wherein the third offset parameter is equal to the current offset from the frequency offset, the first offset parameter and the offset factor in the offset distance 乘积,对第一平面图像上每个像素进行第三次偏移,得到第三幅第二平面图像; 以此类推,得到多幅第二平面图像。 Product, for each pixel on the image plane of the first third shift, a second web to obtain a third image plane; and so, to obtain a second plurality of planar images.
7.如权利要求1或2或3或6所述的方法,其特征在于: 所述偏移参数包括偏移方向以及偏移距离;所述将第一平面图像上各像素对应的凸凹参数转化为偏移参数的步骤包括: 将第一平面图像上第二像素对应的凸凹参数的正负转化为所述第二像素对应的偏移参数中的偏移方向,将第二像素对应的凸凹参数的绝对值转化为所述第二像素对应的偏移参数中的偏移距离。 Or 7. The method of claim 361 or claim 2, wherein: said offset parameter comprises offset distance and an offset direction; the conversion corresponding to each pixel of the first image plane unevenness parameter a step of offset parameter comprising: positive and negative second pixel conversion parameter irregularities on a first plane image corresponding to the offset direction of the offset parameters corresponding to a second pixel, the second pixel parameter corresponding male and female into the absolute value of the second pixel shift distance corresponding to the offset parameter.
8. —种生成立体图像系统,包括第一平面图像生成装置、凸凹参数计算装置、第二平面图像生成装置,其中:所述第一平面图像生成装置,其用于接收从一幅以上的图像中截取的对象,将所述截取的对象放置于背景图像中,得到第一平面图像;所述凸凹参数计算装置,其用于接收第一平面图像中特征像素的凸凹参数,根据该特征像素的凸凹参数计算该第一平面图像上每个像素对应的凸凹参数;所述第二平面图像生成装置,其用于将第一平面图像上各像素对应的凸凹参数转化为偏移参数,对第一平面图像上每个像素进行偏移,得到第二平面图像。 8. - kind of a stereoscopic image generating system, comprising a first planar image generating apparatus, unevenness parameter calculating means, the second planar image generating apparatus, wherein: said first plane image generating means for receiving an image from one or more taken in the object, the object is placed, taken in the background image, to obtain a first image plane; the punch parameter calculating means for receiving a first image plane parameters characteristic pixels irregularities, according to this characteristic pixels convexo concave punch parameter calculation parameter corresponding to each pixel on the first image plane; the second plane image generating means for each pixel corresponding to a first parameter into a plane image irregularities offset parameter, the first each pixel offset in the image plane, to obtain a second image plane.
9.如权利要求8所述的系统,其特征在于:所述系统还包括立体图像生成装置,其用于在得到所述第二平面图像后,合并所述第一平面图像和第二平面图像,生成立体图像,或者合并两幅以上第二平面图像,生成立体图像。 9. The system according to claim 8, wherein: said system further comprises a stereoscopic image generating means for obtaining the second plane in the image, merging the first image and the second planar image plane generating a stereoscopic image, merging two or more second planar image, a stereoscopic image generation.
10.如权利要求8所述的系统,其特征在于:所述系统还包括修复装置,其用于对所述第二平面图像中的空白像素进行修复填充。 10. The system according to claim 8, wherein: said system further comprises a repair device, for the second image plane blank pixels repair filler.
11.如权利要求8或9或10所述的系统,其特征在于:所述凸凹参数计算装置用于采用以下方式接收第一平面图像中特征像素的凸凹参数, 根据该特征像素的凸凹参数计算该第一平面图像上每个像素对应的凸凹参数:所述凸凹参数计算装置用于重复执行以下步骤得到所述对象上所有像素的凸凹参数: 根据对象上第一像素到该对象上各特征像素的距离以及各特征像素的凸凹参数计算获得所述第一像素的凸凹参数。 11. The system of claim 8 or 9 or as claimed in claim 10, wherein: said parameter calculating means for receiving the convex-concave irregularities characteristic parameters for the first pixel in the image plane in the following manner, the feature parameters calculated pixel punch unevenness parameter corresponding to each pixel on the first image plane: the punch parameter calculating means for repeating the following steps to give irregularities on the parameters of all pixels of an object: a first pixel on the object according to the object pixel each feature irregularities and the distance parameter of each pixel of the feature parameters obtained by calculation of the first pixel irregularities.
12.如权利要求11所述的系统,其特征在于:所述凸凹参数计算装置用于采用以下方式根据对象上第一像素到该对象上各特征像素的距离以及各特征像素的凸凹参数计算获得所述第一像素的凸凹参数:所述第一像素的凸凹参数等于各特征像素的权重系数、距离参数和凸凹参数三者乘积之和,其中,所述距离参数为所述第一像素到该特征像素的距离与所述第一像素到所有特征像素的距离之和的比值。 12. The system of claim 11, wherein: said punch means for calculating the following parameters according to the first embodiment to each of the pixels on the object feature pixels on the object distance and feature parameters of each pixel irregularities obtained by calculation the first pixel irregularities parameters: the first pixel of each feature parameter is equal to irregularities pixel weighting coefficient, from the sum of products of the three parameters and the parameters and unevenness, wherein the parameter is a distance to the first pixel and the ratio of the distance from all the pixels of the characteristic features of the first pixel to pixel.
13.如权利要求6所述的系统,其特征在于: 所述偏移参数包括偏移方向以及偏移距离;所述第二平面图像生成装置用于采用以下方式将所述将第一平面图像上各像素对应的凸凹参数转化为偏移参数,对第一平面图像上每个像素进行偏移,得到第二平面图像:将第一平面图像上各像素对应的凸凹参数转化为第一偏移参数,对第一平面图像上每个像素进行第一次偏移,得到第一幅第二平面图像;将第一平面图像上各像素对应的凸凹参数转化为第二偏移参数,其中所述第二偏移参数中的偏移距离等于当前偏移次数、偏移系数以及第一偏移参数中偏移距离的乘积,对第一平面图像上每个像素进行第二次偏移,得到第二幅第二平面图像;将第一平面图像上各像素对应的凸凹参数转化为第三偏移参数,其中所述第三偏移参数中的偏移距离等于当前偏移次数、偏 13. The system according to claim 6, wherein: said offset parameter comprises offset distance and an offset direction; the second plane image generating means for following the manner of the first image plane the parameters corresponding to each pixel into irregularities offset parameter for each pixel on the image plane of the first shift to obtain a second image plane: the first corresponding to each pixel on the image plane into a first offset parameter irregularities parameter, for each pixel on the first image plane for the first time offset, a second planar obtain a first image; corresponding to each pixel of the image on a first plane into a second parameter irregularities offset parameter, wherein said a second offset distance equal to the current offset parameter is the offset frequency offset from the product of a first coefficient and the offset parameter offset, for each pixel on a second image plane of the first shift, to give first two second planar image; corresponding to each pixel of the image on the first plane into the third parameter irregularities offset parameter, wherein the third offset parameter offset distance equal to the current offset frequency bias 系数以及第一偏移参数中偏移距离的乘积,对第一平面图像上每个像素进行第三次偏移,得到第三幅第二平面图像; 以此类推,得到多幅第二平面图像。 A first offset parameter and the offset factor in the product distance for each pixel on the image plane of the first third shift, a second web to obtain a third image plane; and so, to obtain a second plurality of planar image .
14.如权利要求8或9或10或13所述的系统,其特征在于: 所述偏移参数包括偏移方向以及偏移距离;所述第二平面图像生成装置用于采用以下方式将第一平面图像上各像素对应的凸凹参数转化为偏移参数:将第一平面图像上第二像素对应的凸凹参数的正负转化为所述第二像素对应的偏移参数中的偏移方向,将第二像素对应的凸凹参数的绝对值转化为所述第二像素对应的偏移参数中的偏移距离。 14. The system 8, or 9 or 10 or according to claim 13, wherein: said offset parameter comprises offset distance and an offset direction; the second plane image generating means for the first embodiment in the following irregularities parameter corresponding to each pixel into an image on a plane offset parameters: the parameters of the positive and negative second pixel conversion irregularities on a first image plane corresponding to the second pixel shift direction corresponding to an offset parameter, the absolute value of the second punch corresponding to the pixels into offset distance parameter corresponding to the offset parameter in the second pixel.
CN 201110117012 2011-05-06 2011-05-06 Stereoscopic image generation method and system CN102158725B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201110117012 CN102158725B (en) 2011-05-06 2011-05-06 Stereoscopic image generation method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201110117012 CN102158725B (en) 2011-05-06 2011-05-06 Stereoscopic image generation method and system

Publications (2)

Publication Number Publication Date
CN102158725A true CN102158725A (en) 2011-08-17
CN102158725B CN102158725B (en) 2013-04-10

Family

ID=44439862

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201110117012 CN102158725B (en) 2011-05-06 2011-05-06 Stereoscopic image generation method and system

Country Status (1)

Country Link
CN (1) CN102158725B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103310477A (en) * 2013-06-27 2013-09-18 北京青青树动漫科技有限公司 Generation method of three-dimensional image
CN103544725A (en) * 2013-11-19 2014-01-29 马宁 Two-dimensional stereoscopic animation making method
CN103795999A (en) * 2013-11-26 2014-05-14 深圳市唯特视科技有限公司 Three-dimensional image generating method and system
CN105872517A (en) * 2015-12-28 2016-08-17 乐视致新电子科技(天津)有限公司 Method and device for adjusting parallax through virtual reality
CN106231283A (en) * 2016-06-12 2016-12-14 深圳超多维光电子有限公司 Construction method, device and the stereoscopic display device of a kind of virtual three-dimensional scene

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1669337A (en) * 2002-06-10 2005-09-14 拉斐尔军备开发局有限公司 Method for producing stereoscopic images from monoscopic images
CN1739303A (en) * 2003-01-20 2006-02-22 三洋电机株式会社 Three-dimensional video providing method and three-dimensional video display device
CN101266546A (en) * 2008-05-12 2008-09-17 深圳华为通信技术有限公司 Method for accomplishing operating system three-dimensional display and three-dimensional operating system
CN101600123A (en) * 2009-07-06 2009-12-09 四川大学 Method for shifting parallel vidicon array for obtaining parallactic image
CN101933335A (en) * 2008-01-29 2010-12-29 汤姆森特许公司 Method and system for converting 2d image data to stereoscopic image data

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1669337A (en) * 2002-06-10 2005-09-14 拉斐尔军备开发局有限公司 Method for producing stereoscopic images from monoscopic images
CN1739303A (en) * 2003-01-20 2006-02-22 三洋电机株式会社 Three-dimensional video providing method and three-dimensional video display device
CN101933335A (en) * 2008-01-29 2010-12-29 汤姆森特许公司 Method and system for converting 2d image data to stereoscopic image data
CN101266546A (en) * 2008-05-12 2008-09-17 深圳华为通信技术有限公司 Method for accomplishing operating system three-dimensional display and three-dimensional operating system
CN101600123A (en) * 2009-07-06 2009-12-09 四川大学 Method for shifting parallel vidicon array for obtaining parallactic image

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103310477A (en) * 2013-06-27 2013-09-18 北京青青树动漫科技有限公司 Generation method of three-dimensional image
CN103310477B (en) * 2013-06-27 2016-05-11 北京青青树动漫科技有限公司 A kind of 3-dimensional image generation method
CN103544725A (en) * 2013-11-19 2014-01-29 马宁 Two-dimensional stereoscopic animation making method
CN103795999A (en) * 2013-11-26 2014-05-14 深圳市唯特视科技有限公司 Three-dimensional image generating method and system
CN103795999B (en) * 2013-11-26 2016-01-20 深圳市唯特视科技有限公司 A kind of method and system generating stereo-picture
CN105872517A (en) * 2015-12-28 2016-08-17 乐视致新电子科技(天津)有限公司 Method and device for adjusting parallax through virtual reality
CN106231283A (en) * 2016-06-12 2016-12-14 深圳超多维光电子有限公司 Construction method, device and the stereoscopic display device of a kind of virtual three-dimensional scene

Also Published As

Publication number Publication date
CN102158725B (en) 2013-04-10

Similar Documents

Publication Publication Date Title
US7557824B2 (en) Method and apparatus for generating a stereoscopic image
Allène et al. Seamless image-based texture atlases using multi-band blending
US9445072B2 (en) Synthesizing views based on image domain warping
US8711204B2 (en) Stereoscopic editing for video production, post-production and display adaptation
KR101419979B1 (en) Method and system for converting 2d image data to stereoscopic image data
JP5340952B2 (en) 3D projection display
JP2005353047A (en) Three-dimensional image processing method and three-dimensional image processor
JP3180757B2 (en) Maximum flow method for obtaining a stereo correspondence between multiple field of view
EP2184713A1 (en) Method and device for generating a depth map
CN1956555B (en) Three-dimensional image processing apparatus and method
CN101908230B (en) Regional depth edge detection and binocular stereo matching-based three-dimensional reconstruction method
US9030469B2 (en) Method for generating depth maps from monocular images and systems using the same
US20120293624A1 (en) System and method of revising depth of a 3d image pair
US8761501B2 (en) Method for 3D video content generation
US9153032B2 (en) Conversion method and apparatus with depth map generation
JP2014522591A (en) Alignment, calibration, and rendering systems and methods for square slice real-image 3D displays
CN101437170B (en) System and method for generating multi-eye visual image
Wu et al. Repetition-based dense single-view reconstruction
WO2011052389A1 (en) Image processing device and image processing method
CN102695064B (en) Apparatus for generating real-time stereoscopic image and method thereof
US8571304B2 (en) Method and apparatus for generating stereoscopic image from two-dimensional image by using mesh map
CN100511124C (en) Free multi visul point polyprojecting 3D displaying system and method
US20110285822A1 (en) Method and system for free-view relighting of dynamic scene based on photometric stereo
JP2014532941A (en) Generation of a depth map for an input image using an exemplary approximate depth map associated with an exemplary similar image
TWI554103B (en) Image capturing device and digital zooming method thereof

Legal Events

Date Code Title Description
C06 Publication
C10 Entry into substantive examination
C14 Grant of patent or utility model
C56 Change in the name or address of the patentee
C56 Change in the name or address of the patentee