CN103200415B - A kind of 2D turns the image processing method of 3D - Google Patents

A kind of 2D turns the image processing method of 3D Download PDF

Info

Publication number
CN103200415B
CN103200415B CN201310144187.8A CN201310144187A CN103200415B CN 103200415 B CN103200415 B CN 103200415B CN 201310144187 A CN201310144187 A CN 201310144187A CN 103200415 B CN103200415 B CN 103200415B
Authority
CN
China
Prior art keywords
pixel
gtg
image
mean value
object image
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.)
Active
Application number
CN201310144187.8A
Other languages
Chinese (zh)
Other versions
CN103200415A (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.)
Hualu Publishing & Media Co Ltd
China Hualu Group Co Ltd
Original Assignee
Hualu Publishing & Media Co Ltd
China Hualu Group Co Ltd
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 Hualu Publishing & Media Co Ltd, China Hualu Group Co Ltd filed Critical Hualu Publishing & Media Co Ltd
Priority to CN201310144187.8A priority Critical patent/CN103200415B/en
Publication of CN103200415A publication Critical patent/CN103200415A/en
Application granted granted Critical
Publication of CN103200415B publication Critical patent/CN103200415B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Processing (AREA)
  • Testing, Inspecting, Measuring Of Stereoscopic Televisions And Televisions (AREA)

Abstract

The invention discloses the image processing method that a kind of 2D turns 3D.First the present invention obtains two object images, one of them first object image is based on initial 2D Computer image genration, another the second object image is then based on the 2D Computer image genration after amplifying, be second pixel of 0 for GTG in the second object image, need to repair in conjunction with the first object image and the second object image, to obtain the second complete object image, the second object image is as eye image, initial 2D image as left-eye image, thus achieves the conversion of 2D to 3D.

Description

A kind of 2D turns the image processing method of 3D
Technical field
The present invention relates to computer video process field, particularly relate to the image processing method that a kind of 2D turns 3D.
Background technology
Compare common 2D picture, 3D is more three-dimensional true to nature, and spectators can be allowed to produce sensation on the spot in person.Current 3D technology can be divided into bore hole formula and spectacle two kinds, and bore hole formula 3D technology is mainly used in industrial commercial display aspect at present, and spectacle 3D technology is then mainly used for consumer market.
The method for processing video frequency that 2D turns 3D technology normally first obtains the gray level image of 2D image, and gray level image process being obtained to the depth map of whole 2D image, take original image as left-eye image, then generates eye image in conjunction with original image and depth map.Prior art often concentrates on degree of depth map generalization method, less to the process of the object image generated based on original image and depth map, but in fact can make up the defect of object image to the process of object image, reduce the requirement for degree of depth map generalization quality.
Summary of the invention
For above-mentioned technical problem, the invention provides and a kind ofly repair object image turns 3D image processing method with the 2D improving conversion effect.
Technical scheme provided by the invention is:
2D turns an image processing method of 3D, comprises the following steps:
Step one, according to initial 2D Computer image genration ID figure;
Step 2, by initial 2D Nonlinear magnify n doubly, obtain intermediate image, ID figure is amplified n doubly, obtain intermediate depth figure;
Step 3, utilize initial 2D image and ID figure, obtain the first object image, utilize intermediate image and intermediate depth figure to obtain the second object image;
Step 4, obtain the coordinate that GTG in the second object image is a second pixel of 0, in described second object image GTG be not 0 pixel be defined as the 3rd pixel;
The coordinate of the first pixel that step 5, calculating a the second pixel are corresponding in the first object image, concrete computational methods are: with the coordinate of second pixel divided by n, obtain the coordinate of first pixel corresponding to second pixel, thus obtain all with a the second pixel the first pixel one to one;
Step 6, obtain the GTG of all second pixels, the acquisition methods of the GTG of any one the second pixel is:
When the GTG of first pixel is not 0, give second pixel corresponding with it by the GTG of this first pixel,
Calculate centered by second pixel, with r1 be in the circle of radius, the first mean value of the GTG of the 3rd pixels whole in square area that area is maximum, wherein, in this square area, the number of the 3rd pixel accounts for 90% of total number of pixel
Compare the GTG of second pixel and described first mean value, when GTG and the difference of the first mean value and the ratio of the first mean value are less than or equal to 0.05, using GTG as the final GTG of this second pixel, when GTG and the difference of the first mean value and the ratio of the first mean value are more than or equal to 0.05, calculate centered by this second pixel, be in the circle of radius with r2, second mean value of the GTG of the 3rd pixels whole in the square area that area is maximum, wherein, the difference of r2 and r1 is the width of the 3rd pixel, and using the second mean value as the final GTG of second pixel,
When the GTG of first pixel is 0, calculate centered by second pixel, with r3 be in the circle of radius, the 3rd mean value of the GTG of the 3rd pixels whole in square area that area is maximum, wherein, in this square area, the number of the 3rd pixel accounts for 95% of total number of pixel, and using the final GTG of the 3rd mean value as this second pixel, wherein, r3 is the integral multiple of r1;
Step 7, by all obtain GTG the second object image down multiple n after, as eye image, using initial 2D image as left-eye image, export eye image and left-eye image to 3D display device.
Preferably, described 2D turns in the image processing method of 3D, and n is 4.
Preferably, described 2D turns in the image processing method of 3D, and r1 is 2.5 times of the width of the 3rd pixel.
Preferably, described 2D turns in the image processing method of 3D, and r3 is 2 ~ 5 times of r1.
First the present invention obtains two object images, one of them first object image is based on initial 2D Computer image genration, another the second object image is then based on the 2D Computer image genration after amplifying, be second pixel of 0 for GTG in the second object image, need to repair in conjunction with the first object image and the second object image, to obtain the second complete object image, the second object image is as eye image, initial 2D image as left-eye image, thus achieves the conversion of 2D to 3D.
Accompanying drawing explanation
Fig. 1 is flow chart of the present invention.
Embodiment
Below in conjunction with accompanying drawing, the present invention is described in further detail, can implement according to this with reference to specification word to make those skilled in the art.
As shown in Figure 1, the invention provides the image processing method that a kind of 2D turns 3D, comprise the following steps:
Step one, according to initial 2D Computer image genration ID figure.
Step 2, by initial 2D Nonlinear magnify n doubly, obtain intermediate image, ID figure is amplified n doubly, obtain intermediate depth figure.
The preferred n of the present invention is 4.Amplification process is, is copied n time by any one pixel in initial 2D image, and is combined into a pixel of intermediate image, and namely the area of a pixel of intermediate image is n times of a pixel point areas in initial 2D image.
Step 3, utilize initial 2D image and ID figure, obtain the first object image, utilize intermediate image and intermediate depth figure to obtain the second object image.
Step 4, obtain the coordinate that GTG in the second object image is a second pixel of 0, in described second object image GTG be not 0 pixel be defined as the 3rd pixel.
The first object image is generated based on initial 2D image and ID figure, and when generating the second object image based on intermediate image and intermediate depth figure, capital forms the pixel that GTG is 0 in the first object image and the second object image, be the pixel of 0 for these GTGs, belong to the defect that image processing process produces, need to make up.
The coordinate of the first pixel that step 5, calculating a the second pixel are corresponding in the first object image, concrete computational methods are: with the coordinate of second pixel divided by n, obtain the coordinate of first pixel corresponding to second pixel, thus obtain all with a the second pixel the first pixel one to one.
The present invention carries out repairing second object image by the first object image, first determine that all the second pixel has a the first pixel of one-to-one relationship with a, its defining method is the coordinate by the first pixel and the second pixel, because the second pixel is by amplifying, therefore, the second pixel coordinate should be the centre coordinate of the first pixel is consistent.
Step 6, obtain the GTG of all second pixels, the acquisition methods of the GTG of any one the second pixel is:
When the GTG of first pixel is not 0, give second pixel corresponding with it by the GTG of this first pixel, calculate centered by second pixel, be in the circle of radius with r1, first mean value of the GTG of the 3rd pixels whole in the square area that area is maximum, wherein, in this square area, the number of the 3rd pixel accounts for 90% of total number of pixel, compare the GTG of second pixel and described first mean value, when GTG and the difference of the first mean value and the ratio of the first mean value are less than or equal to 0.05, using GTG as the final GTG of this second pixel, when GTG and the difference of the first mean value and the ratio of the first mean value are more than or equal to 0.05, calculate centered by this second pixel, be in the circle of radius with r2, second mean value of the GTG of the 3rd pixels whole in the square area that area is maximum, wherein, the difference of r2 and r1 is the width of the 3rd pixel, and using the second mean value as the final GTG of second pixel.
Obtain rule based on certain GTG, repaired completely by the second object image, rational GTG obtains rule, can ensure the repairing quality of the second object image.
For second pixel, when the GTG of first pixel corresponding with it is not 0, then illustrate that deviation has appearred in the formation result of the first object image and the second object image, now, if the error between GTG and the first mean value is in the scope set, then thinking can using this GTG directly as the final GTG of this second pixel; If error exceeds the scope of setting, then think that the first object image is process mistake, can not as a reference, now need to calculate second mean value again, the 3rd pixel not being 0 by other GTGs around the second pixel repairs this second pixel for remaining unchanged.
Find through test, error is proper numerical value 0.05 time.
When solving the first mean value, be obtain result comparatively accurately, account form is set to centered by second pixel, with r1 be radius circle in the maximum square area of area.Preferably, r1 is 2.5 times of the width of the 3rd pixel.
When calculating the second mean value, needing to arrange r2 is the width that r1 adds the 3rd pixel, to obtain result more accurately.
When the GTG of first pixel is 0, calculate centered by second pixel, with r3 be in the circle of radius, the 3rd mean value of the GTG of the 3rd pixels whole in square area that area is maximum, wherein, in this square area, the number of the 3rd pixel accounts for 95% of total number of pixel, and using the final GTG of the 3rd mean value as this second pixel, wherein, r3 is the integral multiple of r1.
If the GTG of the first pixel and the second pixel is 0, the result of the two is consistent.Now the first object image can not as the foundation of the second object image, can only with the second object image from as foundation.At this moment, require that the number of the 3rd pixel in square area accounts for 95% of sum, to ensure there is the 3rd abundant pixel for calculating in this square area.R3 needs to be the integral multiple of r1, preferably 2 ~ 5 times.
Step 7, by all obtain GTG the second object image down multiple n after, as eye image, using initial 2D image as left-eye image, export eye image and left-eye image to 3D display device.
Although embodiment of the present invention are open as above, but it is not restricted to listed in specification and execution mode utilization, it can be applied to various applicable the field of the invention completely, for those skilled in the art, can easily realize other amendment, therefore do not deviating under the universal that claim and equivalency range limit, the present invention is not limited to specific details and illustrates here and the legend described.

Claims (4)

1. 2D turns an image processing method of 3D, it is characterized in that, comprises the following steps:
Step one, according to initial 2D Computer image genration ID figure;
Step 2, by initial 2D Nonlinear magnify n doubly, obtain intermediate image, ID figure is amplified n doubly, obtain intermediate depth figure;
Step 3, utilize initial 2D image and ID figure, obtain the first object image, utilize intermediate image and intermediate depth figure to obtain the second object image;
Step 4, obtain the coordinate that GTG in the second object image is a second pixel of 0, in described second object image GTG be not 0 pixel be defined as the 3rd pixel;
The coordinate of the first pixel that step 5, calculating a the second pixel are corresponding in the first object image, concrete computational methods are: with the coordinate of second pixel divided by n, obtain the coordinate of first pixel corresponding to second pixel, thus obtain all with a the second pixel the first pixel one to one;
Step 6, obtain the GTG of all second pixels, the acquisition methods of the GTG of any one the second pixel is:
When the GTG of first pixel is not 0, give second pixel corresponding with it by the GTG of this first pixel,
Calculate centered by second pixel, with r1 be in the circle of radius, the first mean value of the GTG of the 3rd pixels whole in square area that area is maximum, wherein, in this square area, the number of the 3rd pixel accounts for 90% of total number of pixel
Compare the GTG of second pixel and described first mean value, when GTG and the difference of the first mean value and the ratio of the first mean value are less than 0.05, using GTG as the final GTG of this second pixel, when GTG and the difference of the first mean value and the ratio of the first mean value are more than or equal to 0.05, calculate centered by this second pixel, be in the circle of radius with r2, second mean value of the GTG of the 3rd pixels whole in the square area that area is maximum, wherein, the difference of r2 and r1 is the width of the 3rd pixel, and using the second mean value as the final GTG of second pixel,
When the GTG of first pixel is 0, calculate centered by second pixel, with r3 be in the circle of radius, the 3rd mean value of the GTG of the 3rd pixels whole in square area that area is maximum, wherein, in this square area, the number of the 3rd pixel accounts for 95% of total number of pixel, and using the final GTG of the 3rd mean value as this second pixel, wherein, r3 is the integral multiple of r1;
Step 7, by all obtain GTG the second object image down multiple n after, as eye image, using initial 2D image as left-eye image, export eye image and left-eye image to 3D display device.
2. 2D according to claim 1 turns the image processing method of 3D, it is characterized in that, n is 4.
3. 2D according to claim 1 turns the image processing method of 3D, it is characterized in that, r1 is 2.5 times of the width of the 3rd pixel.
4. 2D according to claim 1 turns the image processing method of 3D, it is characterized in that, r3 is 2 ~ 5 times of r1.
CN201310144187.8A 2013-04-23 2013-04-23 A kind of 2D turns the image processing method of 3D Active CN103200415B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310144187.8A CN103200415B (en) 2013-04-23 2013-04-23 A kind of 2D turns the image processing method of 3D

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310144187.8A CN103200415B (en) 2013-04-23 2013-04-23 A kind of 2D turns the image processing method of 3D

Publications (2)

Publication Number Publication Date
CN103200415A CN103200415A (en) 2013-07-10
CN103200415B true CN103200415B (en) 2016-02-10

Family

ID=48722755

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310144187.8A Active CN103200415B (en) 2013-04-23 2013-04-23 A kind of 2D turns the image processing method of 3D

Country Status (1)

Country Link
CN (1) CN103200415B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102264591B1 (en) * 2015-02-27 2021-06-15 삼성전자주식회사 Image Processing Method and Electronic Device supporting the same

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101631256A (en) * 2009-08-13 2010-01-20 浙江大学 Method for converting 2D video into 3D video in three-dimensional television system
CN102447939A (en) * 2011-10-12 2012-05-09 绍兴南加大多媒体通信技术研发有限公司 Method for optimizing 2D (two-dimensional) to 3D (three-dimensional) conversion of video work

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8605136B2 (en) * 2010-08-10 2013-12-10 Sony Corporation 2D to 3D user interface content data conversion
US9485497B2 (en) * 2010-09-10 2016-11-01 Reald Inc. Systems and methods for converting two-dimensional images into three-dimensional images

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101631256A (en) * 2009-08-13 2010-01-20 浙江大学 Method for converting 2D video into 3D video in three-dimensional television system
CN102447939A (en) * 2011-10-12 2012-05-09 绍兴南加大多媒体通信技术研发有限公司 Method for optimizing 2D (two-dimensional) to 3D (three-dimensional) conversion of video work

Also Published As

Publication number Publication date
CN103200415A (en) 2013-07-10

Similar Documents

Publication Publication Date Title
CN104703044B (en) A kind of picture barrage dissemination method
MX2021006830A (en) Mapping field anomalies using digital images and machine learning models.
CN102892021B (en) New method for synthesizing virtual viewpoint image
KR101906941B1 (en) Image data processing method and apparatus
CN104182969B (en) Internal and external parameter calibration method of single-scanline camera
WO2010088029A3 (en) Single-pass bounding box calculation
JP2016526742A5 (en)
CN103325120A (en) Rapid self-adaption binocular vision stereo matching method capable of supporting weight
CN103093414B (en) A kind of DOM raster data DecryptDecryption and restoration methods
CN102855610A (en) Method for correcting infrared image heterogeneity by using parameter correctness factor
CN104504680A (en) Inverse perspective calibration method used for intelligent vehicle
RU2013121611A (en) 3D DISPLAY DEVICE AND DISPLAY METHOD FOR SUCH
WO2015088693A3 (en) Method and apparatus for optimized presentation of complex maps
CN105988224A (en) 3D display device and Moire fringe reducing method and device thereof
MX2021007733A (en) Learned model generation method, learned.
CN103200415B (en) A kind of 2D turns the image processing method of 3D
CN104469212A (en) Spliced display wall OSD display method and system
CN107339938A (en) A kind of special-shaped calibrating block and scaling method for single eye stereo vision self-calibration
CN104394402A (en) Crosstalk-free integrated imaging 3D display method based on pinhole array
CN104166992A (en) Content perception binocular image zooming method based on grid deformation
CN101783014A (en) Circle detection method
CN103200417B (en) 2D (Two Dimensional) to 3D (Three Dimensional) conversion method
CN103731657A (en) Hole filling processing method of hole-containing image processed by DIBR (Depth Image Based Rendering) algorithm
CN103426393A (en) Color correction method of display device
CN103955890B (en) Stereoscopic image restoration method

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