[go: up one dir, main page]

CN102238313A - Method for generating image conversion matrix, image conversion method and device thereof - Google Patents

Method for generating image conversion matrix, image conversion method and device thereof Download PDF

Info

Publication number
CN102238313A
CN102238313A CN2010101670093A CN201010167009A CN102238313A CN 102238313 A CN102238313 A CN 102238313A CN 2010101670093 A CN2010101670093 A CN 2010101670093A CN 201010167009 A CN201010167009 A CN 201010167009A CN 102238313 A CN102238313 A CN 102238313A
Authority
CN
China
Prior art keywords
image
source
target
matrix
dimensional rotation
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.)
Pending
Application number
CN2010101670093A
Other languages
Chinese (zh)
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.)
Ali Corp
Original Assignee
Ali Corp
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 Ali Corp filed Critical Ali Corp
Priority to CN2010101670093A priority Critical patent/CN102238313A/en
Publication of CN102238313A publication Critical patent/CN102238313A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)

Abstract

The invention provides a method for generating an image conversion matrix, an image conversion method and a device thereof. And, projecting the three-dimensional rotation matrix onto a two-dimensional plane to generate a two-dimensional rotation matrix. And calculating and generating a source position corresponding to the target position according to the two-dimensional rotation matrix and the affine transformation matrix and the target position in the target image. The source position is located in the source image, and the affine transformation matrix is used for displacing, scaling and deforming the target image. Pixel data is generated according to the source location and the source pixel closest to the source location. The pixel data is received as a target pixel value of the target position to generate a target image.

Description

Produce method, image conversion method and the device thereof of video conversion matrix
Technical field
The invention relates to a kind of video conversion technology, and particularly relevant for a kind of instant conversion image, and make the image of conversion have the bidimensional image switch technology of approximate stereoeffect.
Background technology
Electronic product uses the diagram in user's interface often or shows two dimension (two-dimensional, 2D) images such as photo, film.The portions of electronics product can be rotated image, moves, three-dimensional (three-dimensional, 3D) conversion allow the user appreciate and more convenient when browsing image, or increase novel sense for convergent-divergent etc.
Existing 3-dimensional image switch technology mainly is to utilize business software to handle image, as open graphic package storehouse (Open Graphics Library, OpenGL) etc., it can allow image have 3-dimensional image effects such as the depth of field, rigid body rotation (solid body rotation), three-dimensional convergent-divergent.But when handling image, must additionally increase processor, memory, buffer or the like many elements, thereby increase cost by the complex software in open graphic package storehouse and so on.In addition, it is longer to utilize software to handle the required time of image, thereby is difficult to instantaneity ground conversion image.
The mode of another kind of conversion image is to handle bidimensional image by hardware unit.Though present image processor is simple relatively, cost is lower, only image can be done image processing such as two-dimensional plane rotation, convergent-divergent, does not comprise the function of 3-dimensional image conversion.
Summary of the invention
The invention provides a kind of image conversion method, the video conversion matrix and its inverse matrix that are calculated by the three-dimensional rotation matrix that is projected to two dimensional surface, just can use the hardware structure of two-dimensional transformations, allow the image after changing have the effect of approximate three-dimensional convergent-divergent, distortion and rotation.
With another viewpoint, the invention provides a kind of video conversion device, the video conversion matrix and its inverse matrix that are calculated by the three-dimensional rotation matrix that is projected to two dimensional surface, just can use the hardware structure of two-dimensional transformations, allow the image after changing have the effect of approximate three-dimensional convergent-divergent, distortion, displacement and rotation.
The present invention proposes a kind of image conversion method, and it comprises the following steps.At first, utilize will originate a plurality of end points of image of video conversion matrix to come the source position to be converted to a plurality of end points target location of target image, to define the zone of source video conversion to target image.According to the inverse matrix of video conversion matrix, the source position of coming that produces corresponding target location is calculated in the target location in the target image afterwards, and above-mentionedly come the source position to be arranged in the source image.Then, in the basis source image come source position and the most approaching predetermined number that comes the source position come source pixel to produce pixel data.And, with the target pixel value of above-mentioned pixel data, to produce target image as the target location.Wherein, above-mentioned target image is shown in the display unit.
In one embodiment of this invention, the step that produces this pixel data comprises utilizing above-mentionedly comes source pixel to make interpolation to calculate, to produce pixel data.
In one embodiment of this invention, above-mentioned predetermined number is one, and the step that produces pixel data comprises: directly use and the most approachingly come the pixel value that comes source pixel of source position as pixel data.
In one embodiment of this invention, above-mentioned video conversion matrix is tried to achieve according to two-dimentional spin matrix and affine transition matrix, and two-dimentional spin matrix is the three-dimensional rotation matrix that the three-dimensional rotation angle is formed to be projected to two dimensional surface produce.
In one embodiment of this invention, the above-mentioned video conversion matrix product that is two-dimentional spin matrix and affine transition matrix.
Also comprise the following steps: in one embodiment of this invention target image is covered on the background video, to produce composite image, wherein composite image is shown in the display unit.
In one embodiment of this invention, the target location in the target image is calculated the source position of coming that produces corresponding target location and also comprise the following steps: at first check the source position whether to be positioned at the source image.When coming the source position not to be positioned at the source during image, the pixel data of corresponding target location is set at default background pixel value.When coming the source position to be positioned at the source during image, subsequent steps then, the source pixel of coming of coming source position and the most approaching predetermined number that comes the source position in the basis source image is used the generation pixel data.
In another angle, the present invention proposes a kind of video conversion device, and it comprises video conversion unit and output unit.The video conversion unit produces the three-dimensional rotation matrix according to the three-dimensional rotation angle, and with the projection of three-dimensional rotation matrix in two dimensional surface to produce two-dimentional spin matrix, and according to two-dimentional spin matrix and affine transition matrix, utilize the target location in the target image to calculate the source position of coming that produces corresponding target location, wherein, come the source position to be arranged in the source image.And the source pixel of coming of coming source position and the most approaching predetermined number that comes the source position in the basis source image is used the generation pixel data.Output unit receives pixel data with the target pixel value as the target location, uses the generation target image, and wherein target image is shown in the display unit.
In one embodiment of this invention, above-mentioned video conversion unit multiply by two-dimentional spin matrix and affine transition matrix to calculate mutually tries to achieve the video conversion matrix, then calculate again and try to achieve the inverse matrix of video conversion matrix, and utilize inverse matrix and target location to calculate to produce the source position.
In one embodiment of this invention, the video conversion device also comprises the edge calculations unit, it utilizes will originate a plurality of end points of image of video conversion matrix to come the source position to be converted to a plurality of end points target location of target image, to define the zone of source video conversion to target image.
In one embodiment of this invention, the video conversion device also comprises the image mixed cell, and it is covered in target image on the background video, and to produce composite image, wherein, above-mentioned composite image is shown in the display unit.
With another viewpoint, the present invention proposes a kind of method that produces the video conversion matrix, and it comprises the following steps: at first, utilizes the three-dimensional rotation angle to produce the three-dimensional rotation matrix.Then, with the projection of three-dimensional rotation matrix in two dimensional surface, to produce two-dimentional spin matrix.Afterwards, try to achieve the video conversion matrix according to two-dimentional spin matrix and affine transform matrix calculations.And, calculate the inverse matrix of trying to achieve the video conversion matrix, wherein, when obtaining the source image, just can produce target image, so that target image is shown in the display unit according to inverse matrix and source image.And the target pixel value of target location can utilize and come the pixel value of source position to produce in the corresponding target location in the target image, thereby uses the generation target image, and comes the source position to be arranged in the source image.
In one embodiment of this invention, image conversion method also comprises the following steps: to come the source position to be converted to a plurality of end points target location of target image by will originate a plurality of end points of image of video conversion matrix, to define the zone of source video conversion to target image.
Based on above-mentioned, embodiment of the invention utilization is projected to video conversion matrix and its inverse matrix that the three-dimensional rotation matrix and the affine matrix of two dimensional surface are calculated, can calculate the source by the target location in the target image and come the source position producing corresponding pixel value in the image, but make video conversion not need buffer and the instant playback image.Meanwhile, also can be in the converting structure of two dimension, allow target image after the conversion have the effect of approximate perspective transformations.
Description of drawings
Fig. 1 is the calcspar according to a kind of video conversion device of first embodiment of the invention;
Fig. 2 is according to the source video conversion of the first embodiment of the invention schematic diagram to target image;
Fig. 3 is the flow chart according to a kind of image conversion method of first embodiment of the invention;
Fig. 4 is the calcspar according to a kind of video conversion device of second embodiment of the invention;
Fig. 5 is the schematic diagram according to the composite image method of second embodiment of the invention;
Fig. 6 is the flow chart according to a kind of image conversion method of third embodiment of the invention.
Drawing reference numeral
100,400: video conversion device BI: background video
110: video conversion cells D I: target image
120: output unit DP: target location
130: edge calculations unit MI: composite image
150: display unit SI: the source image
460: image mixed cell SP: come the source position
BA: borderline region TM: video conversion matrix
E1, E2, E3, E4: four end points of source image come the source position
E1 ', E2 ', E3 ', ' E4 ': four end points of the target image of corresponding source image come the source position
TM -1: the inverse matrix of video conversion matrix
RA: the hatched example areas between borderline region and the target image
S310~S390: the step of image conversion method
S610~S640: the step of image conversion method
Embodiment
For above-mentioned feature and advantage of the present invention can be become apparent, embodiment cited below particularly, and cooperate appended graphic being described in detail below.
Please refer to Fig. 1 and Fig. 2, Fig. 1 is the calcspar according to a kind of video conversion device 100 of first embodiment of the invention, and Fig. 2 is the schematic diagram that is converted to target image DI according to the source image SI of first embodiment of the invention.Video conversion device 100 comprises video conversion unit 110 and output unit 120.Video conversion unit 110 produces the three-dimensional rotation matrix according to the three-dimensional rotation angle, with the projection of three-dimensional rotation matrix in two dimensional surface to produce two-dimentional spin matrix.And video conversion unit 110 is according to two-dimentional spin matrix and affine transition matrixes, by the target position D P in the target image DI with calculate produce corresponding target position D P come source position SP, wherein come source position SP to be arranged in the image SI that originates.In addition, video conversion unit 110 basis source position SP and the most approaching source position SP's of coming comes source pixel to produce pixel data.Output unit 120 receives the target pixel value of pixel data as target position D P, and with generation target image DI, and target image DI can be shown in the display unit 150.
In present embodiment, video conversion device 100 also comprises edge calculations (bound-boxingcalculation) unit 130, it utilizes will the originate end points of image SI of above-mentioned video conversion matrix to come the source position to be converted to the end points target location of corresponding target image DI, to define the transition region that source image SI is converted to target image DI.
Usually know that for this area is had the knowledgeable can understand the present invention more, the operation workflow and the principle of the image conversion method of the embodiment of the invention are described at this, please be simultaneously with reference to Fig. 1, Fig. 2 and Fig. 3.Fig. 3 is the flow chart according to the image conversion method of first embodiment of the invention.Wherein, video conversion device 100 is in order to the image conversion method of execution graph 3.The target of present embodiment is to utilize video conversion matrix T M and its inverse matrix TM -1Target image DI will be converted to with will originating image SI instantaneity.Wherein, video conversion matrix T M is by the three-dimensional rotation matrix T 3DBe projected to the two-dimentional spin matrix T of two dimensional surface 2DAnd the product of affine transition matrix AT, therefore allow the image of conversion can have approximate three-dimensional effect.And owing to come source position SP can utilize video conversion matrix T M to be converted on the target position D P, target position D P just can be by the inverse matrix TM of video conversion matrix T M -1Try to achieve source position SP with backwards calculation.Thus, video conversion device 100 does not just need additionally to increase buffer and keeps in image, and can directly utilize the inverse matrix TM of video conversion matrix T M -1Calculate the pixel value that each is positioned at the target position D P of target image DI, with instant generation target image DI.
Above-mentioned three-dimensional rotation matrix T 3DFormed by the three-dimensional rotation angle.Affine transition matrix AT then comprises source image SI and is converted to the convergent-divergent of target image DI, all multi-parameters that rigid body is out of shape and move the position, and these parameters and the anglec of rotation can be set according to user's demand.For example, video conversion unit 110 can according to the user the given parameter and the anglec of rotation produce video conversion matrix T M, also can produce video conversion matrix T M by the parameter and the anglecs of rotation default in the video conversion unit 110.
Describe the flow process of image conversion method in detail at this.In step S310, the video conversion unit 110 in the video conversion device 100 at first according to the three-dimensional rotation angle to produce the three-dimensional rotation matrix T 3DThe three-dimensional rotation angle comprises X-axis anglec of rotation α, Y-axis anglec of rotation β and Z axle anglec of rotation θ in present embodiment.The three-dimensional rotation matrix T 3DShown in equation (1) and (2):
T 3 D = RM Z × RM Y × RM X = cos θ ‾ - sin θ ‾ 0 sin θ ‾ cos θ ‾ 0 0 0 1 × cos β ‾ 0 sin β ‾ 0 1 0 - sin β ‾ 0 cos β ‾ × 1 0 0 0 cos α ‾ - sin α ‾ 0 sin α ‾ cos α ‾ . . ( 1 )
= ( cos θ ‾ ) ( cos β ‾ ) - ( sin θ ‾ ) ( cos α ‾ ) + ( cos θ ‾ ) ( sin β ‾ ) ( sin α ‾ ) ( sin θ ‾ ) ( sin α ‾ ) - ( cos θ ‾ ) ( sin β ‾ ) ( sin α ‾ ) ( sin θ ‾ ) ( cos β ‾ ) ( cos θ ‾ ) ( cos α ‾ ) + ( sin θ ‾ ) ( sin β ‾ ) ( sin α ‾ ) - ( cos θ ‾ ) ( sin α ‾ ) + ( sin θ ‾ ) ( sin β ‾ ) ( cos α ‾ ) - ( sin β ‾ ) ( cos β ‾ ) ( sin α ‾ ) ( cos θ ‾ ) . . ( 2 )
Can find out the three-dimensional rotation matrix T by equation (1) 3DIn present embodiment Z axis rotation matrix RM Z, Y-axis spin matrix RM YWith X-axis spin matrix RM XProduct.X-axis spin matrix RM XExpression points to the source vector V (not illustrating) that comes of source position SP to rotate X-axis anglec of rotation α, Y-axis spin matrix RM for X-axis from the initial point of rectangular coordinate system YThen expression comes source vector V for Y-axis rotation Y-axis anglec of rotation β, and Z axis rotation matrix RM ZThen expression comes source vector V for Z axle rotation Z axle anglec of rotation θ.Equation (2) is the Z axis rotation matrix RM with equation (1) Z, Y-axis spin matrix RM YWith X-axis spin matrix RM XThe three-dimensional rotation matrix T that multiplies each other and launched 3D
Then enter step S320, video conversion unit 110 is with the three-dimensional rotation matrix T 3DBe projected to two dimensional surface, to produce two-dimentional spin matrix T 2D, so just can use two-dimentional framework to reach approximate three-dimensional conversion effect.In present embodiment, the three-dimensional rotation matrix T 3DThe step that is projected to two dimensional surface is with the three-dimensional rotation matrix T 3DFirst row the 3rd row, second row the 3rd row, the third line first row be made as " 0 " with the operator of the third line secondary series, and with the three-dimensional rotation matrix T 3DThe tertial operator of the third line be made as " 1 ", in the hope of two-dimentional spin matrix T 2DTwo dimension spin matrix T 2DShown in equation (3):
T 2 D = ( cos _ θ ) ( cos _ α ) - ( sin _ θ ) ( cos _ β ) + ( cos _ θ ) ( sin _ α ) ( sin _ β ) 0 ( sin _ θ ) ( cos _ α ) ( cos _ θ ) ( cos _ β ) + ( sin _ θ ) ( sin _ α ) ( sin _ β ) 0 0 0 1 . . . ( 3 )
Afterwards, video conversion unit 110 two-dimentional spin matrix T of foundation in step S340, S350 and S370 2DWith affine transition matrix AT, come source position SP with what calculate to produce corresponding target position D P by the target position D P in the target image DI.Affine transition matrix AT comprises that in present embodiment X-axis zooming parameter SX, Y-axis zooming parameter SY, X-axis rigid body deformation parameter SHX, Y-axis rigid body deformation parameter SHY, X-axis moving parameter TX and y-axis shift move parameter TY, and it can be out of shape blurring, convergent-divergent and rigid body by the parameter that affine transition matrix AT provides.By this, just affine transition matrix AT shown in equation (4):
AT = SX SHX TX SHY SY TY 0 0 1 . . . ( 4 )
In present embodiment, at first video conversion unit 110 calculates at step S340 and tries to achieve video conversion matrix T M.Wherein, video conversion matrix T M is by the three-dimensional rotation matrix T 3DThe two-dimentional spin matrix T of projection 2DAnd the product of affine transition matrix AT, shown in equation (5):
TM = T 2 D × AT =
( cos _ θ ) ( cos _ α ) - ( sin _ θ ) ( cos _ β ) + ( cos _ θ ) ( sin _ α ) ( sin _ β ) 0 ( sin _ θ ) ( cos _ α ) ( cos _ θ ) ( cos _ β ) + ( sin _ θ ) ( sin _ α ) ( sin _ β ) 0 0 0 1 × SX SHX TX SHY SY TY 0 0 1
= A B C D E F 0 0 1 . . . ( 5 )
Because video conversion matrix T M is via two-dimentional spin matrix T 2DOperator after multiplying each other with affine transition matrix AT is too numerous and diverse, represents with A to F with operator of second row at this first row with video conversion matrix T M.The operator of video conversion matrix T M the third line can calculate simply to try to achieve and be (0,0,1).
Therefore, just come source position SP to convert target position D P to by video conversion matrix T M, shown in equation (6):
DP X DP Y 1 = T 2 D × AT × SP X SP Y 1 = TM × SP X SP Y 1 . . . ( 6 )
(SP wherein X, SP Y) be the coordinate that comes source position SP, and (DP X, DP Y) be the coordinate of target position D P.
In order to calculate the pixel value of trying to achieve each target position D P, above-mentioned equation (6) can be with the inverse matrix TM that takes advantage of video conversion matrix T M in about equal sign -1Try to achieve following equation (7) and derive, to obtain the coordinate of source position SP by target position D P.Its derivation is as follows:
DP X DP Y 1 = TM × SP X SP Y 1 . . . ( 6 )
⇒ TM - 1 DP X DP Y 1 = TM - 1 TM × SP X SP Y 1 = SP X SP Y 1
⇒ SP X SP Y 1 = TM - 1 DP X DP Y 1 . . . ( 7 )
Therefore when program S350, video conversion unit 110 convenient calculating with video conversion matrix T M are tried to achieve its inverse matrix TM -1, shown in equation (8):
TM - 1 = A B C D E F 0 0 1 - 1 = 1 AE - BD E - B BF - CE - D A - AF + CD 0 0 AE - BD
= E AE - BD - B AE - BD BF - CE AE - BD - D AE - BD A AE - BD - AF + CD AE - BD 0 0 AE - BD AE - BD . . . ( 8 )
By combining of equation (7) and (8), just can pass through target position D P and inverse matrix TM -1Calculating tries to achieve source position SP, shown in equation (9):
SP X SP Y 1 = TM - 1 DP X DP Y 1 = E AE - BD - B AE - BD BF - CE AE - BD - D AE - BD A AE - BD - AF + CD AE - BD 0 0 AE - BD AE - BD DP X DP Y 1 . . . ( 9 )
Equation (9) can also convert the simultaneous equations shown in equation (10) to:
SP X = ( E AE - BD ) × DP X + ( - B AE - BD ) × DP Y + ( BF - CE AE - BD ) SP Y = ( - D AE - BD ) × DP X + ( A AE - BD ) × DP Y + ( - AF + CD AE - BD ) . . . ( 10 )
At this moment, just need to define the zone that source image SI is converted to target image DI, to obtain target position D P one by one.Therefore in step S360, edge calculations unit 130 comes source position E1, E2, E3 and E4 to be converted to four end points target location E1 ', E2 ', the E3 ' and E4 ' of corresponding target image DI respectively by will originate four end points of image SI of video conversion matrix T M, is converted to the borderline region BA of target image DI to define source image SI.Wherein, borderline region BA is the minimum rectangle that comprises target image DI, and four end points target location E1 ' of target image DI, E2 ', E3 ' all are positioned on the square boundary of borderline region BA with E4 '.So just do not need to calculate the pixel value of whole image, only need the central pixel value of computation bound area B A, can improve video conversion efficient.
In addition, because present embodiment is an example with the source image SI of rectangle, therefore the borderline region BA among the step S360 also is a rectangle, should come to produce corresponding borderline region BA according to the source image SI of other shapes by visual its design requirement but use embodiment of the invention person, the present invention should be as limit.In some application examples, the borderline region BA among the step S360 also can directly be considered as the quadrangle (being target image DI zone) that E1 ', E2 ', E3 ' and E4 ' are surrounded; If or source image SI is N limit shape (N is integer and N 〉=3), then edge calculations unit 130 can be converted to its end points among the borderline region BA of N limit shape.Also or when source image SI was circular image, then borderline region BA was the Minimum Area that comprises target image DI.
Just enter step S370 after obtaining borderline region BA, a target position D P is obtained in video conversion unit 110 from borderline region BA, and will try to achieve the corresponding source position SP that comes with calculating in its substitution equation (10).Then in step S380, video conversion unit 110 checks source position SP whether to be positioned at source image SI.If come source position SP not to be positioned at source image SI, represent that this target position D P is not arranged in target image DI, but in Fig. 2 borderline region BA to the hatched example areas RA between the target image DI.Video conversion unit 110 is convenient among the step S381 pixel data of corresponding target position D P is set at default background pixel value, or this target position D P skipped over disregards.
If the source position SP that comes that tries to achieve is positioned at source image SI, then enter step S382, come that source position SP and the most approaching source position SP's of coming come source pixel to produce the pixel data of corresponding target position D P among the video conversion unit 110 basis source image SI.In order to eliminate or issuable edge sawtooth (aliasing) phenomenon when being reduced in video conversion, to use the present embodiment person and can look its design requirement and carry out corresponding action.In the present embodiment, video conversion unit 110 is carried out and is adapted to bicubic interpolation (adaptivebicubic interpolation) automatically, comes source pixel to try to achieve pixel data with calculating according to a plurality of of the predetermined number of the most approaching source position SP of coming.Wherein, adapt to the bicubic interpolation method automatically and be this area and have and know that usually the knowledgeable can understand and implement easily, do not add to give unnecessary details at this.
In other embodiment, this area has knows issuable edge crenellated phenomena when the knowledgeable can also utilize its interpolation computing method of knowing with elimination or minimizing video conversion usually, and the interpolation computational methods of present embodiment are not in order to limit the present invention.If pay no attention to the edge crenellated phenomena, video conversion unit 110 also can directly use the pixel data that the pixel value that comes source pixel of the most approaching source position SP of coming produces as institute's desire in another embodiment, and only use one to come source pixel to produce pixel data this moment.
Then in step S390, the pixel data that output unit 120 receiving step S381 or S382 are produced is perhaps ignored this target position D P according to step S381 is described as the target pixel value of target position D P.Output unit 120 just can produce target image DI according to the target pixel value of these target position D P, it is shown in display unit 150.In step S391, check whether target position D P all in the borderline region BA and its pixel value are disposed then.If all target position D P and its pixel value in the borderline region BA are not disposed as yet, video conversion unit 110 just comes back to step S370 and obtains next target position D P among the borderline region BA with repeating step S370 to S390, produces the pixel value that is positioned at all target position D P of borderline region BA by this.
The second embodiment of the present invention below is described, please refer to Fig. 4 and Fig. 5.Fig. 4 is the calcspar according to a kind of video conversion device 400 of second embodiment of the invention.Fig. 5 is the schematic diagram of mixing (blending) image method according to second embodiment of the invention.Wherein, present embodiment is similar to above-mentioned first embodiment, so same apparatus and process description do not repeat them here.Its difference is that video conversion device 400 also comprises image mixed cell 460, and it is covered in target image DI on the background video BI, and to produce composite image MI, wherein composite image MI can be shown in the display unit 150.
Describe the embodiment of the invention at this with another viewpoint, please refer to Fig. 6 (and asking simultaneously) with reference to Fig. 1 and Fig. 3.For the image SI of source, when video conversion device 100 obtained this source image SI, its video conversion unit 110 should calculate finished video conversion matrix T M and its inverse matrix TM -1(that is completing steps S310 to S350).Therefore it is as described below that the image SI that originates can directly carry out switch process:
Step S610 comes the source position to be converted to a plurality of end points target location of target image DI according to will originate a plurality of end points of image SI of video conversion matrix T M, to define the zone of source video conversion to target image.
Step S620 is according to video conversion matrix T M and its inverse matrix TM -1, the target location in the target image DI is calculated the source position of coming that produces corresponding target location.
In the step S630 basis source image come source position and the most approaching predetermined number that comes the source position come source pixel to produce pixel data.
Step S640 is with the target pixel value of pixel data as the target location, and to produce target image, wherein target image is shown in the display unit.
Can be according to above-mentioned steps corresponding in other application examples, video conversion unit 110 also may store many default video conversion matrix T M and its inverse matrix TM -1, in order to conversion source image SI.Therefore when realizing present embodiment, step S310~S350 differs and is decided to be the prerequisite step of conversion source image SI.Therefore, video conversion device 100 can be in obtaining at first to enter step S610 (promptly can be considered step S360) behind the image SI of source, edge calculations unit 130 comes source position E1, E2, E3 and E4 according to the end points of video conversion matrix T M and source image SI, uses and defines the borderline region BA that source image SI is converted to target image DI.
Enter step S620 (promptly can be considered step S370) afterwards, video conversion unit 110 comes source position SP according to video conversion matrix T M with what the target position D P in the target image DI calculate to produce corresponding target position D P.Then, (can be considered the blanket of step S380, step S381 and step S382) in step S630, video conversion unit source position SP in 110 future comes source pixel to produce pixel data with the most approaching source position SP's of coming.And in step S640 (can be considered step S390 and S391 blanket) with the target pixel value of this pixel data as target position D P.Then, video conversion unit 110 checks whether the target position D P in the borderline region BA is disposed by step S391, does not then get back to step S610 to continue the conversion image if dispose.When just the target position D P in the borderline region BA disposes, just can in step S640, export target image DI to display unit 150, use that target image DI is presented in the display unit 150.The thin portion of other of present embodiment flow process is included in the various embodiments described above, so do not repeat them here.
In sum, embodiments of the invention utilize the video conversion matrix to obtain the transfer equation formula of source image and target image, wherein the video conversion matrix is to utilize the three-dimensional rotation matrix that is projected to two dimensional surface to calculate and get with the affine matrix that move the position with the three-dimensional convergent-divergent of representative, rigid body distortion, to allow the image of conversion have the effect of approximate stereo rotating, distortion and convergent-divergent by lower-cost two-dimensional transformations framework.Embodiments of the invention utilize the borderline region of video conversion matrix computations video conversion, so do not need to calculate the pixel value of whole image, only need the central pixel value in computation bound zone, can improve video conversion efficient.In addition, by the inverse matrix of video conversion matrix, above embodiment can directly calculate the pixel value of trying to achieve target location in the target image, need not use buffer with instant conversion image.
Though the present invention discloses as above with embodiment; right its is not in order to limit the present invention; have in the technical field under any and know the knowledgeable usually; without departing from the spirit and scope of the present invention; when doing a little change and retouching, so protection scope of the present invention is worked as with being as the criterion that claim was defined.

Claims (14)

1.一种影像转换方法,其特征在于,所述的影像转换方法包括:1. an image conversion method, is characterized in that, described image conversion method comprises: 依据一影像转换矩阵将一来源影像的多个端点来源位置转换至一目标影像的多个端点目标位置,以界定所述来源影像转换至所述目标影像的区域;transforming a plurality of end point source positions of a source image to a plurality of end point target positions of a target image according to an image transformation matrix, so as to define an area transformed from the source image to the target image; 依据所述影像转换矩阵的反矩阵,将所述目标影像内的一目标位置计算产生对应所述目标位置的一来源位置,其中所述来源位置位于所述来源影像中;calculating a target position in the target image to generate a source position corresponding to the target position according to an inverse matrix of the image transformation matrix, wherein the source position is located in the source image; 依据所述来源影像中的所述来源位置与最接近所述来源位置的一预设数量的来源像素以产生一像素数据;以及generating pixel data according to the source position and a predetermined number of source pixels closest to the source position in the source image; and 将所述像素数据作为所述目标位置的一目标像素值,以产生所述目标影像,其中所述目标影像显示于一显示单元中。The pixel data is used as a target pixel value of the target position to generate the target image, wherein the target image is displayed in a display unit. 2.如权利要求1所述的影像转换方法,其特征在于,产生所述像素数据的步骤包括利用上述来源像素作内插计算,以产生所述像素数据。2. The image conversion method according to claim 1, wherein the step of generating the pixel data comprises using the source pixels for interpolation calculation to generate the pixel data. 3.如权利要求1所述的影像转换方法,其特征在于,所述预设数量为一,而且产生所述像素数据的步骤包括直接使用最接近所述来源位置的所述来源像素的像素值作为所述像素数据。3. The image conversion method according to claim 1, wherein the preset number is one, and the step of generating the pixel data comprises directly using the pixel value of the source pixel closest to the source position as the pixel data. 4.如权利要求1所述的影像转换方法,其特征在于,所述影像转换矩阵依据一二维旋转矩阵与一仿射转换矩阵求得,且所述二维旋转矩阵是将一三维旋转角度组成的一三维旋转矩阵投影至二维平面所产生。4. The image conversion method according to claim 1, wherein the image conversion matrix is obtained according to a two-dimensional rotation matrix and an affine transformation matrix, and the two-dimensional rotation matrix is a three-dimensional rotation angle The resulting three-dimensional rotation matrix is projected onto a two-dimensional plane. 5.如权利要求4所述的影像转换方法,其特征在于,所述仿射转换矩阵包括一X轴缩放参数、一Y轴缩放参数、一X轴变形参数、一Y轴变形参数、一X轴移动参数与一Y轴移动参数。5. The image conversion method as claimed in claim 4, wherein the affine transformation matrix comprises an X-axis scaling parameter, a Y-axis scaling parameter, an X-axis deformation parameter, a Y-axis deformation parameter, and an X-axis scaling parameter. An axis movement parameter and a Y axis movement parameter. 6.如权利要求4所述的影像转换方法,其特征在于,所述影像转换矩阵为所述二维旋转矩阵与所述仿射转换矩阵的乘积。6. The image transformation method according to claim 4, wherein the image transformation matrix is a product of the two-dimensional rotation matrix and the affine transformation matrix. 7.如权利要求1所述的影像转换方法,其特征在于,所述的影像转换方法还包括将所述目标影像覆盖于一背景影像上,以产生一混合影像,其中所述混合影像显示于所述显示单元中。7. The image conversion method according to claim 1, further comprising overlaying the target image on a background image to generate a mixed image, wherein the mixed image is displayed on in the display unit. 8.如权利要求1所述的影像转换方法,其特征在于,将所述目标影像内的一目标位置计算产生对应所述目标位置的一来源位置还包括:8. The image conversion method according to claim 1, wherein calculating a target position in the target image to generate a source position corresponding to the target position further comprises: 检查所述来源位置是否位于所述来源影像内;check if the source location is within the source image; 当所述来源位置并没有位于所述来源影像内,将对应所述目标位置的像素数据设定为预设的背景像素值;When the source position is not located in the source image, setting the pixel data corresponding to the target position as a preset background pixel value; 当所述来源位置位于所述来源影像内,则依据所述来源影像中的所述来源位置与最接近所述来源位置的一预设数量的来源像素以产生一像素数据。When the source position is located in the source image, generating a pixel data according to the source position in the source image and a preset number of source pixels closest to the source position. 9.一种影像转换装置,其特征在于,所述的影像转换装置包括:9. An image conversion device, characterized in that, the image conversion device comprises: 一影像转换单元,依据一三维旋转角度产生一三维旋转矩阵,将所述三维旋转矩阵投影于二维平面以产生一二维旋转矩阵,依据所述二维旋转矩阵与一仿射转换矩阵,由一目标影像内的一目标位置以计算产生对应所述目标位置的一来源位置,其中所述来源位置位于一来源影像中,并且依据所述来源影像中的所述来源位置与最接近所述来源位置的一预设数量的来源像素以产生一像素数据;以及An image conversion unit generates a three-dimensional rotation matrix according to a three-dimensional rotation angle, projects the three-dimensional rotation matrix on a two-dimensional plane to generate a two-dimensional rotation matrix, and generates a two-dimensional rotation matrix according to the two-dimensional rotation matrix and an affine transformation matrix, by a target position within a target image to generate a source position corresponding to the target position, wherein the source position is located in a source image, and the source position in the source image is closest to the source a predetermined number of source pixels of the position to generate a pixel data; and 一输出单元,接收所述像素数据作为所述目标位置的一目标像素值,以产生所述目标影像,其中所述目标影像显示于一显示单元中。An output unit receives the pixel data as a target pixel value of the target position to generate the target image, wherein the target image is displayed on a display unit. 10.如权利要求9所述的影像转换装置,其特征在于,所述影像转换单元将所述二维旋转矩阵与所述仿射转换矩阵相乘以计算求得一影像转换矩阵,再计算求得所述影像转换矩阵的一反矩阵,并且利用所述反矩阵与所述目标位置计算产生所述来源位置。10. The image conversion device according to claim 9, wherein the image conversion unit multiplies the two-dimensional rotation matrix and the affine transformation matrix to calculate an image conversion matrix, and then calculates An inverse matrix of the image transformation matrix is obtained, and the source position is calculated using the inverse matrix and the target position. 11.如权利要求10所述的影像转换装置,其特征在于,所述的影像转换装置还包括:11. The image conversion device according to claim 10, wherein the image conversion device further comprises: 一边缘计算单元,其利用所述影像转换矩阵将所述来源影像的多个端点来源位置转换至所述目标影像的多个端点目标位置,以界定所述来源影像转换至所述目标影像的区域。an edge calculation unit, which uses the image transformation matrix to transform a plurality of end point source positions of the source image to a plurality of end point target positions of the target image, so as to define a region where the source image is transformed to the target image . 12.如权利要求9所述的影像转换装置,其特征在于,所述的影像转换装置还包括:12. The image conversion device according to claim 9, wherein the image conversion device further comprises: 一影像混合单元,将所述目标影像覆盖于一背景影像上,以产生一混合影像,其中所述混合影像显示于所述显示单元中。An image mixing unit overlays the target image on a background image to generate a mixed image, wherein the mixed image is displayed on the display unit. 13.一种产生影像转换矩阵的方法,其特征在于,所述产生影像转换矩阵的方法包括:13. A method for generating an image transformation matrix, characterized in that the method for generating an image transformation matrix comprises: 利用一三维旋转角度产生一三维旋转矩阵;generating a three-dimensional rotation matrix using a three-dimensional rotation angle; 将所述三维旋转矩阵投影于二维平面,以产生一二维旋转矩阵;projecting the three-dimensional rotation matrix onto a two-dimensional plane to generate a two-dimensional rotation matrix; 依据所述二维旋转矩阵与所述仿射转换矩阵计算求得一影像转换矩阵;以及calculating an image transformation matrix according to the two-dimensional rotation matrix and the affine transformation matrix; and 计算求得所述影像转换矩阵的一反矩阵,Calculate and obtain an inverse matrix of the image transformation matrix, 其中,当获得一来源影像时,依据所述反矩阵与所述来源影像来产生一目标影像,以使所述目标影像显示于一显示单元中,且所述目标影像的一目标位置的一目标像素值利用对应所述目标位置的一来源位置的像素值来产生,藉以产生所述目标影像,所述来源位置位于所述来源影像中。Wherein, when a source image is obtained, a target image is generated according to the inverse matrix and the source image, so that the target image is displayed on a display unit, and a target at a target position of the target image The target image is generated by generating pixel values using pixel values of a source location corresponding to the target location, the source location being located in the source image. 14.如权利要求13所述的方法,其特征在于,所述的方法还包括:14. The method of claim 13, further comprising: 通过所述影像转换矩阵将所述来源影像的多个端点来源位置转换至所述目标影像的多个端点目标位置,以界定所述来源影像转换至所述目标影像的区域。A plurality of end point source positions of the source image are transformed to a plurality of end point target positions of the target image by the image transformation matrix, so as to define a region where the source image is transformed into the target image.
CN2010101670093A 2010-04-22 2010-04-22 Method for generating image conversion matrix, image conversion method and device thereof Pending CN102238313A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010101670093A CN102238313A (en) 2010-04-22 2010-04-22 Method for generating image conversion matrix, image conversion method and device thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010101670093A CN102238313A (en) 2010-04-22 2010-04-22 Method for generating image conversion matrix, image conversion method and device thereof

Publications (1)

Publication Number Publication Date
CN102238313A true CN102238313A (en) 2011-11-09

Family

ID=44888482

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010101670093A Pending CN102238313A (en) 2010-04-22 2010-04-22 Method for generating image conversion matrix, image conversion method and device thereof

Country Status (1)

Country Link
CN (1) CN102238313A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI490514B (en) * 2013-12-17 2015-07-01 Inventec Corp Detecting system for production line and method thereof
TWI556623B (en) * 2015-07-03 2016-11-01 友達光電股份有限公司 Controlling method of three-dimensional image

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1169808A (en) * 1995-11-14 1998-01-07 索尼公司 Device and method for processing image
CN1244278A (en) * 1996-12-27 2000-02-09 切克梅特国际公司 System and method for synthesizing three-D video from two-D video source
CN1273405A (en) * 1999-05-06 2000-11-15 英业达集团(南京)电子技术有限公司 Method for generating three-D graphics
CN1397050A (en) * 2000-09-27 2003-02-12 皇家菲利浦电子有限公司 Method and apparatus for providing image to be displayed on screen
CN1399230A (en) * 1994-06-20 2003-02-26 世雅企业股份有限公司 Image processing method and equipment
CN101488232A (en) * 2009-02-20 2009-07-22 南京师范大学 Implanted true three-dimension volumetric display method oriented to C Tech software
CN101518045A (en) * 2006-09-21 2009-08-26 索尼株式会社 Image processing device, image processing method, and program
CN101593349A (en) * 2009-06-26 2009-12-02 福州华映视讯有限公司 Bidimensional image is converted to the method for 3-dimensional image

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1399230A (en) * 1994-06-20 2003-02-26 世雅企业股份有限公司 Image processing method and equipment
CN1169808A (en) * 1995-11-14 1998-01-07 索尼公司 Device and method for processing image
CN1244278A (en) * 1996-12-27 2000-02-09 切克梅特国际公司 System and method for synthesizing three-D video from two-D video source
CN1273405A (en) * 1999-05-06 2000-11-15 英业达集团(南京)电子技术有限公司 Method for generating three-D graphics
CN1397050A (en) * 2000-09-27 2003-02-12 皇家菲利浦电子有限公司 Method and apparatus for providing image to be displayed on screen
CN101518045A (en) * 2006-09-21 2009-08-26 索尼株式会社 Image processing device, image processing method, and program
CN101488232A (en) * 2009-02-20 2009-07-22 南京师范大学 Implanted true three-dimension volumetric display method oriented to C Tech software
CN101593349A (en) * 2009-06-26 2009-12-02 福州华映视讯有限公司 Bidimensional image is converted to the method for 3-dimensional image

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI490514B (en) * 2013-12-17 2015-07-01 Inventec Corp Detecting system for production line and method thereof
TWI556623B (en) * 2015-07-03 2016-11-01 友達光電股份有限公司 Controlling method of three-dimensional image

Similar Documents

Publication Publication Date Title
US8970714B2 (en) Image capturing apparatus, image processing apparatus, and method thereof
EP3522105B1 (en) Method and device for performing mapping on spherical panoramic image
CN104661010B (en) Method and device for establishing three-dimensional model
CN101930620B (en) Image processing method and associated apparatus for rendering three-dimensional effect using two-dimensional image
CN103440660B (en) The micro-pattern matrix rapid generation of a kind of integration imaging based on GPU
JP2019160330A (en) Image generating device, and image display control device
CN113643414B (en) Three-dimensional image generation method and device, electronic equipment and storage medium
CN103745439A (en) Method and device for amplifying image
JPH0771936A (en) Device and method for processing image
Zhang et al. A line scan camera-based structure from motion for high-resolution 3D reconstruction
CN105721768A (en) Method and apparatus for generating adapted slice image from focal stack
CN103632390A (en) Method for realizing naked eye 3D (three dimensional) animation real-time making by using D3D (Direct three dimensional) technology
CN103955960A (en) Image viewpoint transformation method based on single input image
CN102238313A (en) Method for generating image conversion matrix, image conversion method and device thereof
CN114519778B (en) Target three-dimensional reconstruction method, device, equipment and medium of multi-angle SAR data
WO2023173727A1 (en) Image processing method and apparatus, and electronic device
CN111343444A (en) Three-dimensional image generation method and device
CN103325086B (en) A kind of deformation method of the three-dimensional picture based on tetrahedral coordinate system
CN109636874B (en) Perspective projection method, system and related device for three-dimensional model
CN102314686B (en) Reference view field determination method, system and device of splicing type panoramic video
CN103854252A (en) Implementation method and implementation device for image deformation
CN102368335A (en) Improved method for drawing scene model by billboard technology
CN114815286A (en) Parameter determination method, device and equipment of full-parallax three-dimensional light field display system
JP2013041500A (en) 3d engine operating with only html5 2d-drawing specification
US10748249B2 (en) Image data processing method and apparatus

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20111109