Image Processing Method and Associated Apparatus for Rendering Three-dimensional Effect Using Two-dimensional Image
Abstract
An image processing method for rendering a three-dimensional by transforming a first quadrilateral image to a second quadrilateral image is provided, with at least one of the first and second quadrilateral images being a trapezoidal image. The image processing method includes providing the first quadrilateral image, generating coordinates of four vertices associated with the second quadrilateral image according to the first quadrilateral image and the three-dimensional effect; determining a relative height and a relative width according to a height and a width of the first quadrilateral image and the coordinates of the four vertices; and generating a plurality of pixel values of the second quadrilateral image with reference to a plurality of pixel values of the first quadrilateral image according to the relative height and the relative width.
Claims
exact text as granted — not AI-modified1 . An image processing method, for rendering a three-dimensional (3D) effect by transforming a first quadrilateral image to a second quadrilateral image, at least one of the first and second quadrilateral images being a trapezoidal image, the method comprising:
providing the first quadrilateral image; generating coordinates of four vertices associated with the second quadrilateral image according to the first quadrilateral image and the 3D effect; determining a relative height and a relative width according to a height and a width of the first quadrilateral image, and the coordinates of the four vertices; and generating a plurality of pixel values of the second quadrilateral image with reference to a plurality of pixel values of the first quadrilateral image according to the relative height, and the relative width.
2 . The method as claimed in claim 1 , wherein the 3D effect is a rotation effect of the first quadrilateral image in a 3D space.
3 . The method as claimed in claim 2 , wherein the step of generating the coordinates of the four vertices comprises:
generating the coordinates of the four vertices according to a rotation angle associated with the 3D effect of the first quadrilateral image.
4 . The method as claimed in claim 1 , further comprising:
calculating a plurality of coordinate change rates according to the coordinates of the four vertices; wherein, the second quadrilateral image is the trapezoidal image, and the pixel values of the second quadrilateral image are generated according to the coordinate change rates, the relative height, and the relative width.
5 . The method as claimed in claim 4 , wherein the trapezoidal image has a pair of horizontal parallel sides, and the step of calculating the coordinate change rates comprises:
calculating coordinate change rates of two left vertices of the trapezoidal image to generate a first coordinate change rate; and calculating coordinate change rates of two right vertices of the trapezoidal image to generate a second coordinate change rate; wherein, the first and second coordinate change rates are utilized for obtaining coordinates of two terminal points of each horizontal scan line of the second quadrilateral image.
6 . The method as claimed in claim 4 , wherein the trapezoidal image has a pair of vertical parallel sides, and the step of calculating the coordinate change rates comprises:
calculating coordinate change rates of two upper vertices of the trapezoidal image to generate a first coordinate change rate; and calculating coordinate change rates of two lower vertices of the trapezoidal image to generate a second coordinate change rate; wherein, the first and second coordinate change rates are utilized for obtaining coordinates of two terminal points of each vertical scan line of the second quadrilateral image.
7 . The method as claimed in claim 1 , wherein the second quadrilateral image comprise a target pixel, the step of generating the pixel values of the second quadrilateral image comprises:
obtaining a corresponding scan line of the first quadrilateral image according to the relative height and a position of the target pixel; determining a pixel distance according to the relative width; and determining at least one pixel of the corresponding scan line of the first quadrilateral image according to the pixel distance and the position of the target pixel, and generating a target pixel value of the target pixel according to a pixel value of the at least one pixel.
8 . The method as claimed in claim 1 , wherein the first quadrilateral image has different brightness from that of the second quadrilateral image.
9 . The method as claimed in claim 1 , further comprising:
displaying the first quadrilateral image and the second quadrilateral image in sequence.
10 . An image processing apparatus, for rendering a 3D effect by transforming a first quadrilateral image to a second quadrilateral image, at least one of the first and second quadrilateral images being a trapezoidal image, the apparatus comprising:
a target image determining unit, for generating coordinates of four vertices associated with the second quadrilateral image according to the first quadrilateral image and the 3D effect; a pixel determining unit, for determining a relative height and a relative width according to a height and width of the first quadrilateral image and the coordinates of the four vertices, and accordingly determining a corresponding relationship between a plurality of pixels of the first quadrilateral image and a plurality of pixels of the second quadrilateral image; and a calculation unit, for generating a plurality of pixel values of the second quadrilateral image with reference to a plurality of pixel values of the first quadrilateral image according to the corresponding relationship.
11 . The apparatus as claimed in claim 10 , wherein the 3D effect is a rotation effect of the first quadrilateral image in a 3D space.
12 . The apparatus as claimed in claim 11 , wherein the target image determining unit generates the coordinates of four vertices of the second quadrilateral image according to a rotation angle associated with the 3D effect of the first quadrilateral image.
13 . The apparatus as claimed in claim 10 , wherein the pixel determining unit calculates a plurality of coordinate change rates according to the coordinates of the four vertices, and when the second quadrilateral image is the trapezoidal image, the pixel determining unit determines the corresponding relationship according to the coordinate change rates, the relative height and the relative width.
14 . The apparatus as claimed in claim 13 , wherein the trapezoidal image has a pair of horizontal parallel sides, the pixel determining unit calculates coordinate change rates of two left vertices of the trapezoidal image to generate a first coordinate change rate, and calculates coordinate change rates of two right vertices of the trapezoidal image to generate a second coordinate change rate, and the first and second coordinate change rates are utilized for obtaining coordinates of two terminal points of each horizontal scan line of the second quadrilateral image.
15 . The apparatus as claimed in claim 13 , wherein the trapezoidal image has a pair of vertical parallel sides, the pixel determining unit calculates coordinate change rates of two upper vertices of the trapezoidal image to generate a first coordinate change rate, and calculates coordinate change rates of two lower vertices of the trapezoidal image to generate a second coordinate change rate, and the first and second coordinate change rates are utilized for obtaining coordinates of two terminal points of each vertical scan line of the second quadrilateral image.
16 . The apparatus as claimed in claim 16 , wherein the first quadrilateral image has different brightness from that of the second quadrilateral image.Join the waitlist — get patent alerts
Track US2010321380A1 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.