This application claims the benefit of Taiwan application Serial No. 98146266, filed Dec. 31, 2009, the subject matter of which is incorporated herein by reference.
1. Technical Field
The disclosure relates in general to a method and a system for rendering an image, and more particularly to a method and a system for rendering a multi-view image.
2. Description of the Related Art
The digital images have the advantages that no film is wasted, no spaced is occupied, no color fading occurs and the image data can be easily stored, carried and edited so that the digital images have gradually replaced the photos shot on the conventional film.
With the technological development of the digital imaging, various image editing techniques have been continuously developed. The photos can be glorified, some interesting patterns may be added thereto or even a multi-view stereoscopic image may be rendered through the image editing techniques.
However, the method of rendering the multi-view stereoscopic image is quite complicated. Some conventionally existing techniques need more effective processing speed.
According to the present disclosure, a method of rendering a multi-view image is provided. The method includes the following steps. An image capturing unit provides an original image and depth information of the original image. Several threads of a processing unit perform a pixel rendering process and a hole filling process on at least one row of pixels of the original image according to the depth information by way of parallel processing to render at least one new-view image. View-angles of the at least one new-view image and the original image are different. Each of the threads performs a view interlacing process on at least one pixel of the original image and the at least one new-view image by way of parallel processing to render the multi-view image.
According to the present disclosure, a system for rendering a multi-view image is also provided. The system includes an image capturing unit and a processing unit. The image capturing unit provides an original image and depth information of the original image. The processing unit has several threads. The threads perform a pixel rendering process and a hole filling process on at least one row of pixels of the original image according to the depth information by way of parallel processing to render at least one new-view image. View-angles of the at least one new-view image and the original image are different. The threads perform a view interlacing process on at least one pixel of the original image and the at least one new-view image by way of parallel processing to render the multi-view image.
The disclosure will become apparent from the following detailed description of the preferred but non-limiting embodiments. The following description is made with reference to the accompanying drawings.
The detailed descriptions will be made according to several illustrative but non-limiting embodiments. In addition, unessential elements will be omitted from the drawings in order to show the technological features of the present disclosure clearly.
For example,
In this embodiment, the multi-view image PM (shown in
First, in step S101, the image capturing unit 110 provides the original image P0 and the depth information of the original image P0.
Next, in step S102, the threads 121 of the processing unit 120 perform the pixel rendering process and the hole filling process on at least one row of pixels of the original image P0 according to the depth information by way of parallel processing to render at least one new-view image. In this illustrated embodiment, multiple new-view images P4−, P3−, P2−, P1−, P1+, P2+, P3+ and P4+ are rendered in this step.
As shown in Example 1 of
As shown in Example 2 of
As shown in Example 2 of
The pixel rendering process and the hole filling process may be demonstrated in the following Table 1.
In one original image, more than one Foreground object image and more than one background object image may appear. One Foreground object may be located at a left side of a certain background object, and may also simultaneously appear at the right side of another background object. Therefore, when the photographer moves to the new view-angle, the occluding effect and the gap effect may simultaneously appear. Therefore, the occluding effect and the gap effect have to be processed when the new-view image is rendered.
In addition, it is possible to perform the pixel rendering process from left to right and then to perform the hole filling process from right to left at the view-angle C4+. Similarly, because the pixel rendering process and the hole filling process have reverse directions, the operations of the pixel rendering process and the hole filling process may be merged. Consequently, the pixel rendering process and the hole filling process may be finished in the same step.
Therefore, in this step, each thread 121 only needs to perform the pixel rendering process in one direction and then to perform the hole filling process in another direction reverse to the direction of pixel rendering process so that the pixel rendering process and the hole filling process may be finished in the same step.
In addition, this embodiment adopts multiple threads 121 to perform the pixel rendering process and the hole filling process. Each thread 121 may correspond to one row or several rows of pixels. Each thread 121 may simultaneously process the pixel rendering process and the hole filling process to increase the processing speed. If the number of threads 121 is the number of rows of the original image P0, then each thread 121 corresponds to one row of the original image P0 so that each row of the original image P0 may simultaneously perform the pixel rendering process and the hole filling process.
Furthermore, multiple new-view images at different view-angles may be rendered according to one original image P0. If the number of threads 121 is the product of the number of rows of the original image and the number of the new-view images P4−, P3−, P2−, P1−, P1+, P2+, P3+ and P4+, then the pixel rendering process and the hole filling process may be simultaneously performed on each row of each of the new-view images P4−, P3−, P2−, P1−, P1+, P2+, P3+ and P4+.
Then in step S104, each thread 121 performs a view interlacing process on at least one pixel of the original image P0 and the new-view images P4−, P3−, P2−, P1−, P1+, P2+, P3+ and P4+ by way of parallel processing to render one multi-view image PM.
The multi-view image PM is arranged in a manner determined according to the resolution of the display, the view-angles selected, the position selected in the new-view image and the colors selected. This embodiment adopts multiple threads 121 to process the view interlacing processes in parallel. If the number of threads 121 is a product of the number of rows of the multi-view image PM, the number of columns of the multi-view image PM and the number of primary colors, then the view interlacing processes on the pixels of the multi-view image PM may be simultaneously finished.
After the view interlacing process of the first embodiment is performed, the saw-tooth effect may be generated. Therefore, the resolutions of each new-view image and the final multi-view image PM may be adjusted to be the same, and then the view interlacing process is performed. Consequently, the saw-tooth effect may be effectively reduced.
For example, when the resolutions of each new-view image and the final multi-view image PM are adjusted to be the same, the pixel positions of the multi-view image PM may directly correspond to the pixel positions of each new view-angle to reduce the saw-tooth effect.
As shown in
In another embodiment, these threads 121 may also arrange the odd-numbered rows of the left-eye view-angle image PL to the even-numbered rows of the multi-view image PM′, and arrange the even-numbered rows of the right-eye view-angle image PR to the odd-numbered rows of the multi-view image PM′. Adopting such a method may also achieve the effect of generating the stereoscopic image.
In still another embodiment, the threads 121 may also arrange the even-numbered rows of the left-eye view-angle image PL to the even-numbered rows of the multi-view image PM′, and arrange the odd-numbered rows of the right-eye view-angle image PR to the odd-numbered rows of the multi-view image PM′. Adopting such a method may also achieve the effect of generating the stereoscopic image.
In yet still another embodiment of the disclosure, the threads 121 may also arrange the even-numbered rows of the left-eye view-angle image PL to the odd-numbered rows of the multi-view image PM′, and arrange the odd-numbered rows of the right-eye view-angle image PR to the even-numbered rows of the multi-view image PM′. Adopting such a method may also achieve the effect of generating the stereoscopic image.
In another embodiment, the threads 121 may also arrange the odd-numbered rows of the original image P0 to the even-numbered rows of the multi-view image PM″, and arrange the even-numbered rows of the new-view image PN to the odd-numbered rows of the multi-view image PM″. Adopting such a method may also achieve the effect of generating the stereoscopic image.
In still another embodiment, the threads 121 may also arrange the even-numbered rows of the original image P0 to the even-numbered rows of the multi-view image PM″, and arrange the odd-numbered rows of the new-view image PN to the odd-numbered rows of the multi-view image PM″. Adopting such a method may also achieve the effect of generating the stereoscopic image.
In yet still another embodiment, the threads 121 may also arrange the even-numbered rows of the original image P0 to the odd-numbered rows of the multi-view image PM″, and arrange the odd-numbered rows of the new-view image PN to the even-numbered rows of the multi-view image PM″. Adopting such a method may also achieve the effect of generating the stereoscopic image.
In this embodiment, the pixels neighboring the gap may be used to fill the gap in the hole filling process. So, it is possible to perform the hole filling process and the view interlacing process simultaneously.
This embodiment adopting the images at two different view-angles to constitute one multi-view image may utilize a programming interface system to speed up the view interlacing process. The programming interface system may be, for example, the OpenGL (Open Graphics Library).
Although the operation of the programming interface system is described according to the examples of the left-eye view-angle image PL and the right-eye view-angle image PR, the programming interface system may also be applied to the new-view image PN and the original image P0.
Generally, the above disclosure is directed to a method and a system for rendering a multi-view image, in which the speed of processing the multi-view image is increased by way of parallel processing.
While the disclosure has been described by way of examples and in terms of preferred embodiments, it is to be understood that the disclosure is not limited thereto. On the contrary, it is intended to cover various modifications and similar arrangements and procedures, and the scope of the appended claims therefore should be accorded the broadest interpretation so as to encompass all such modifications and similar arrangements and procedures.
| Number | Date | Country | Kind |
|---|---|---|---|
| 98146266 | Dec 2009 | TW | national |