This application claims the priority benefit of Taiwan application serial no. 97105930, filed on Feb. 20, 2008. The entirety of the above-mentioned patent application is hereby incorporated by reference herein and made a part of specification.
1. Field of the Invention
The present invention relates to a virtual imaging technique based on a parallel processing method for synthesizing multi-view images.
2. Description of Related Art
Generally, when an actual scene is captured by a camera, images thereof assumed to be captured from other viewing angles cannot be deduced accurately. If the images of different viewing angles are required to be accurately deduced, conventionally, such images may be synthesized according to images captured from near-by viewing angles.
A complete multi-view image video system includes a plurality of processing stages.
Though some conventional computer vision techniques are provided to obtain two-dimensional (2D) images with different viewing angles, since a calculation thereof is too complicated, processing efficiency thereof is relatively low. Therefore, the conventional image synthesis technique still requires to be developed.
The present invention is directed to a parallel processing method for synthesizing multi-view images, by which based on a parallel processing mechanism, a portion of or the whole image synthesis processes are parallel processed.
The present invention provides a parallel processing method for synthesizing multi-view images. The method is as follows. First, multiple reference images are input, wherein each reference image is correspondingly taken from a reference viewing angle. Next, an intended synthesized image corresponding to a viewpoint and an intended viewing angle is determined. Next, the intended synthesized image is divided to obtain a plurality of meshes and a plurality of vertices, of the meshes, wherein the vertices are divided into several vertex groups. Next, scene depths of corresponding objects of the vertex groups are reconstructed. Next, a corresponding relation of near-by captured images is found based on the depths of the vertex groups, so as to synthesize the image.
For example, as shown in
Synthesizing of the images includes a plurality of modes. For example, in a first mode, a conventional interpolation method is not applied, so as to reserve edges of the image for increasing a clarity effect, and in a second mode, a weight-based image interpolation method is applied, so as to synthesize the new image based on an average approach for providing a relatively better visual effect.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, a preferred embodiment accompanied with figures is described in detail below.
Embodiments are provided below for describing the present invention, though the present invention is not limited thereto, and the presented embodiments may also be properly combined with each other.
Research and development of hardware and software based on a parallel processing technique are developed recently, for example, some computer systems allow CPUs thereof having multiple cores for processing. Mover, general purpose graphics processing units (GPGPU) or signal processor such as IBM cell, also provide the ability of parallel processing. Based on the parallel processing technique, the present invention provides an image synthesizing method based on the parallel processing, in which the steps requiring a large amount of calculations may be executed based on the parallel processing method, so as to achieve an improved processing rate.
The present invention provides a multi-view images synthesizing technique, and in coordination of the parallel processing method, the processing rate may be effectively improved. In the multi-view images synthesizing technique, a depth-based interpolation is a 2.5D spatial viewing angle synthesizing technique based on an image-based rendering concept and a model-based rendering concept, and input information thereof are still images or multiple videos. An algorithm thereof is based on a plane sweeping method, by which light rays penetrating through each vertex of a 2D image mesh sweeps different depth planes within a space, so as to construct the most suitable depth information.
In the following content, how to obtain the depths of the vertices, conditions of further subdividing and selecting of the ROI are described. First, a mechanism of selecting the ROI is described.
Next, how to find near-by reference images of each vertex is described.
Wherein m is a value from 0 to M-1. Intervals of the depth dm 228 are not equidistant, but varied in an increasing approach, so as to facilitate finding of suitable depths in regions with relatively great depths.
The 2D image 212 is divided to obtain the plurality of meshes, and each mesh has the plurality of vertices. Each of the vertices and the viewpoint 210 form a view direction 230. For example, the near-by reference images corresponding to the view direction 230 may be find according to the view direction 230 and the viewing angle of the camera 202 used for capturing the reference images. The reference images may have a sequence of C3, C2, C4, C1, C5 . . . according to near-by degrees or distance thereof, and a predetermined number of reference images may be selected from the reference images to function as the near-by reference images.
Moreover, referring to
Referring to
Deduced by analogy, if the projecting depth is correct, the individual projected position on the near-by reference image may approximately present to a color of the object. Therefore, if the reference images within an area of the projected positions are approximately the same, a test depth dm of the vertex is then closed to the actual depth. Therefore, as shown in
Color consistency of near-by reference images may be determined based on a mathematic analysis method. Each vertex has a group of the near-by images corresponding to each test depth. Image differences of the near-by images on an image area of the projected positions may be analysed according to a method, which is not an exclusive method. For example, a correlation parameter rij may be calculated based on the following equation:
Wherein i and j represent any two of the near-by reference images, Iik and Ijk are a k-th pixel data within an image area, Īi and Īj are averages of pixel data within the image area. Taking four near-by reference images as an example, there are 6 correlation parameters, and the r value of a forecast depth then may be obtained by averaging the 6 correlation parameters. By comparing the individual r values of all depths, the forecast depth with the maximum r value then is then found. For example, the optimal depth information may be determined according to the average of the 6 correlation parameters or may be determined by comparing a difference degree between the maximum and the minimum values thereof. By such means, the suitable depth of the vertex then may be determined. Deduced by analogy, the suitable depths of all the vertices on the 2D virtual image are calculated.
Referring to
Namely, as long as the depth difference of any two of the vertices in a mesh is greater than T, the area is then required to be further divided.
Next, when the depths of vertices are obtained, the vertices are then projected to corresponding positions on the near-by reference images according to the depths for image synthesizing. According to a general computer vision concept, weight of each near-by reference image may be determined, and a main parameter of the weight is an angle formed there between.
While considering the weights, some other special circumstances should also be considered.
To be specific,
According to another method, if a single near-by image is within the closed enough range, an image color data thereof then may be directly obtained. If two of the near-by images are within the closed enough range, an image color data of the near-by image with the highest weight then may be obtained. Alternatively, the image color data may be obtained based on an average of the two or more near-by images.
If a second mode is applied, for example, the required image color data may be obtained based on weight interpolation of the near-by images with reference, called multi-texture blending. In other words, the first mode avails maintaining a sharp edge of the image, and the second mode avails image synthesizing of a general area, so as to achieve an optimal synthesizing effect.
After the image view synthesizing method is described, how to perform the parallel processing via a computer system is described. In the present invention, a plurality of different steps for the whole image reconstructing may be simultaneously processed based on a parallel processing method, so as to improve a whole processing efficiency.
When multi arbitrary viewing angel images are reconstructed based on an image-based rendering or a depth-based interpolation technique via computer processing, a plurality of the images captured in different viewing angles is first temporarily stored within a memory of the computer. Next, after necessary initial conditions such as parameters of the camera etc. are set, initial setting of the procedure is then completed.
After initialisation, a viewing angle and a position variation of a user in then obtained via an interactive user interface, so as to calculate relative parameters of a present synthesized image plane. The synthesized image plane is first divided based on a minimum unit of a triangle, for example. In the present embodiment, triangle meshes are taken as an example, although the present invention is not limited thereto.
According to the aforementioned synthesizing mechanism, the vertices of all the triangles are projected into the 3D space according to different depths thereof, and then projected back to the spatial plane of the input images. Then, depth information of all the vertices is obtained by comparing the colors. If the depth differences of the three vertices of a specific triangle are excessive, the triangle then may be divided into four small triangles, and then the aforementioned steps are repeated to obtain the depth information of all the vertices of the triangles. Further fine dividing of the triangle mesh may be referred to as a multi-resolution mesh technique. Finally, the plurality of images captured in different viewing angles are interpolated according to the weights obtained based on the related information such as viewing angle differences, and the user's viewing angle and position etc., so as to obtain the synthesized virtual image corresponding to a present position and viewing angle of the user.
The present invention provides a parallel processing method of multi-resolution mesh technique for reconstructing multi arbitrary viewing angle images. For example, a step of reconstructing the vertex information of the minimum unit of the triangle on the synthesized image plane may be divided into a plurality of groups for parallel processing. In an actual application, the initial triangles may also be divided into a plurality of groups for multi-processing, until all depth information of the vertices on the plane are obtained. Alternatively, each time after the mesh with the same resolution is processed, when a mesh with a next resolution is further divided, the new added triangles are redistributed for balancing an operational burden of each thread. As to the former processing method, after the multi-processing, the new added calculation quantum of each thread may be inconsistent, which may lead to a waste of resources, but this is a convenient way to apply parallel processing As to the latter processing method, each time the multiple threads are restarted or ended, extra resources of the system are consumed. Though the resources of the multiple threads are averaged, extra resources besides the resource required by the algorithm are consumed during restarting and ending of the multiple threads. However, under such circumstance, the whole processing efficiency is still greatly improved.
The present invention is not limited to the aforementioned methods, and other parallel processing method may also be applied to implement the concept of the present invention. In the following content, another embodiment is provided for describing the parallel processing mechanism.
However, according to the parallel processing method, the initial vertices are divided into the plurality of vertex groups, for example, four approximately equivalent vertex groups, and four equivalent memories are assigned thereto for respectively performing the parallel processing. The equivalent memories respectively include utilized memory spaces 1302a, 1304a, 1306a and 1308a, and non-utilized memory spaces 1302b, 1304b, 1306b and 1308b.
During the parallel processing, the processed units may also be initially grouped for once, and until the processing is completed, the processing results are then combined for final synthesizing. Besides, during reconstructing of the image plane information, repeated steps of the parallel processing or information of overlapped area are processed and judged for obtaining the correct results.
Besides, for example, after the mesh shown in
In the present embodiment, the number of groups required for the parallel processing is further analysed. For example, taking the Intel® Core™2 Quad Q6700 Processor with four-core CPU as an example. Moreover, a library provided by the Microsoft Visual Studio 2005 may also be applied for implementing the multiple threads parallel processing. Table 1 is an efficiency comparison of multiple threads and a single thread.
A. single thread
B. multiple threads (2 threads)
C. multiple threads (3 threads)
D. multiple threads (4 threads)
E. multiple threads (8 threads)
F. multiple threads (12 threads)
According to the Table 1, when the multiple threads are applied for accelerating, efficiency of the algorithm is improved. Especially in case of 4 threads (D) corresponding to the four-core system being applied for accelerating, the efficiency thereof is improved for 60%. If the threads are continually increased to 8 (E) and 12 (F), as described above, extra resources besides the resource required by the algorithm are consumed during starting or ending of the multiple threads, and therefore efficiencies thereof are not further improved. Moreover, since the triangles may be overlapped on the boundary, and information of the overlapped area needs to be repeatedly processed for obtaining the correct result, processing efficiency of the multiple threads may be reduced. However, results obtained based on the parallel processing are all better than that shown in column A.
It will be apparent to those skilled in the art that various modifications and variations can be made to the structure of the present invention without departing from the scope or spirit of the invention. In view of the foregoing, it is intended that the present invention cover modifications and variations of this invention provided they fall within the scope of the following claims and their equivalents.
Number | Date | Country | Kind |
---|---|---|---|
97105930 | Feb 2008 | TW | national |