1. Field of the Invention
The present invention relates to a depth information generation method in a stereo display system, and in particular to a depth information generation method capable of generating depth information through disparity estimation.
2. The Prior Arts
Advanced Stereo Display Technology relies on depth map information to produce stereo effect. In viewing 3-D images, multi vision-angle images must be merged, so that the viewer may view images of different vision-angles in producing a sense of stereo of real life. Therefore, in taking pictures, a plurality of cameras have to be used to achieve multi vision-angle broadcasting. However, the volume required for storing multi vision-angle display is exceedingly large, therefore, vision-angle merging technology must be used to reduce volume of data required to be stored. In addition, the vision-angle merging technology is realized through matching depth information of the respective vision-angles. As such, how to produce correct and accurate depth map is a critical technology in stereo display applications.
Presently, most of the depth generation technologies are capable of producing a single image having depth. Though in order to promote 3-D display, a 2-D to 3-D depth generation system is required, yet that is only a transition technology for promoting and popularizing 3-D display system. Since the multi vision-angle 3-D image generation technology is the mainstay for the development of 3-D display in the future, therefore the development of multi vision-angle image depth generation technology is an urgent task in this field. And that can be applied in a pseudo vision-angle generation technology for merging vision angles, so that not only the hardware cost (for example, camera used for taking pictures) and data storage space can be reduced, but the viewer may also experience the stereo sense of real life.
Refer to
1. Repetitive region/Texture region: for example, for window curtain, wall, sky, etc, it could search and obtain a plurality of similar corresponding points, therefore, it may compute similar matching values, so it is rather difficult to determine the accurate depth values.
2. Occlusion region: that means it can take pictures of one side of an image, but it can not obtain pictures of the other side of image, thus it can not find the corresponding point.
3. Depth non-continuous region: for example, edge of an object, in case that fixed block size is used to match, it is difficult to get accurate depth map near the edge.
The matching cost computation method used frequently are: Sum of Absolute Difference (SAD), Sum of Square Difference (SSD), Mean of Absolute Difference (MAD), Mean of Absolute Difference (MAD), and Hamming Distance, etc., and they all have the problem of inaccurate matching mentioned above, that can be expressed in the following expressions (1) to (4). Wherein, L and R indicate left map and right map, W indicates a matching block, ∥W∥ indicates size of block, d is the disparity range, with its range from 0 to dr−1. Wherein, the Hamming Distance is computed from the information of the original left and right maps after going through the Census Transform, other parameters can be computed directly from the original left and right maps. The Census Transform is as shown in
In addition, in a treatise “Occlusion handling based on support and decision” of Proc. Of IEEE ICIP, pp. 1777-1780, September 2009, a support-and-decision process is used to repair image depth, with color difference serving as weight, to compute the support function of the Occlusion Region. The higher function value thus obtained is used to compensate for the background depth, while the lower function value is to compensate for the foreground depth. However, this algorithm is capable of repair actions only through repeated computations, thus increasing the computation time required.
Therefore, presently, the design and performance of the stereo display system depth generation method is not quite satisfactory, and it has much room for improvements.
In view of the problems and shortcomings of the prior art, A major objective of the present invention is to provide a disparity estimation depth generation method, which utilizes edge-adaptive block matching to find the correct depth value based on characteristic of object shape, to enhance the accuracy of block matching.
Another objective of the present invention is to provide a disparity estimation depth generation method, which utilizes the unreliable depth region depth refinement algorithm, to cross check the errors of the left and right depth maps, and reduce bits of color information of the original left and right maps, as such defining ranges of the repaired depth map, to eliminate large amount of errors in the occlusion region.
A further objective of the present invention is to provide a disparity estimation depth generation method, which utilizes group-based disparity estimation, and left and right depth replacement algorithms to determine swiftly disparity values of blocks, so as to raise computation speed.
In order to achieve the above-mentioned objective, the present invention provide a disparity estimation depth generation method. Wherein, on receiving the input original left and right maps in the stereo color image, perform filtering of the original left and right maps, to generate the left and right maps respectively. Next, perform edge detection of objects in the left and right maps, to detect information of the two edges based on an edge-adaptive algorithm, in determining size of at least a matching block in the left and right maps. Then, compute the matching cost, to produce the preliminary depth maps of the left and right maps, and perform cross-check, to find the unreliable depth regions with un-conforming depth from the preliminary depth maps. Finally, repair errors in the unreliable depth regions, to obtain correct depth of the left and right maps.
Further scope of the applicability of the present invention will become apparent from the detailed description given hereinafter. However, it should be understood that the detailed description and specific examples, while indicating preferred embodiments of the present invention, are given by way of illustration only, since various changes and modifications within the spirit and scope of the present invention will become apparent to those skilled in the art from this detailed description.
The patent or application file contains at least one drawing executed in color. Copies of this patent or patent application publication with color drawing(s) will be provided by the Office upon request and payment of the necessary fee.
The related drawings in connection with the detailed description of the present invention to be made later are described briefly as follows, in which:
The purpose, construction, features, functions and advantages of the present invention can be appreciated and understood more thoroughly through the following detailed description with reference to the attached drawings. And, in the following, various embodiments are described in explaining the technical characteristics of the present invention.
The present invention provides a disparity estimation depth generation method, to adopt edge-adaptive block matching algorithm to enhance accuracy of block matching, to utilize unreliable depth region depth refinement algorithm to correct a large amount of errors in the occlusion region, and also propose a group-based disparity estimation algorithm and a left and right depth replacement algorithm to increase the computation speed.
Refer to
Then, at step S14, perform edge detection of an object in the left and right maps, through utilizing Sobel, Canny, Laplacian, Robert or Prewitt edge detection algorithm. Furthermore, the contrast of the original left and right maps can be enhanced, to increase the edge detection effect. The contrast enhancement algorithm can be classified into linear enhancement and Histogram Equalization. Herein, the linear enhancement is taken as an example for explanation. As shown in the following equation (5), wherein, a is an enhancement value of enhanced image, b is a bias value of enhanced image. As such, through adjusting a and b, the original maps I(i, j) may produce image of better contrast, and I′ (i, j) represents enhanced image.
I′(i,j)=a*I(i,j)+b (5)
Then, utilize the edge-adaptive algorithm to detect information of two edges, to determine the size of at least a matching block in the left and right maps. Presently, the matching blocks can be classified into fixed blocks and dynamic blocks. The depth information producing by disparity matching algorithm using fixed block size has the following characteristics: the depth map produced by large matching block has less noise, but the shape of the object is less complete; while the shape of an object in a depth map produced by small matching block is more complete, but it has more noise. Therefore, depth information producing by disparity matching algorithm using fixed block size is certain to have one of the shortcomings mentioned above. In the present invention, the dynamic block and edge-adaptive block algorithms are adopted to determine block size through using edge information. As shown in
In determining edge-adaptive block size, firstly, the extension length has to be defined, which can be classified into extension lengths in four directions of up, down, left, and right, indicating movement from present position to extend upward, downward, to the left, or to the right, until it reaches the edge of the object. Then, based on the edge map generated as mentioned above, determine size and shape of a matching block. If the present position is on an edge, then it is extended upward, downward, to the left, and to the right, the width of a pixel, with the purpose of keeping the accuracy in the depth non-continuous portion. In case the position is not on the edge, then search and compute the extension length from this point in upward and downward directions, and then from the extended regions thus obtained, compute the extension length from this point to the right direction and to the left direction. Refer to
Upon determining matching block size for each of the positions, then in step S16 compute Matching Cost, generate preliminary depth maps respectively for the left map and right maps. The following equation (8) is used to compute Matching Cost of fixed block size, bsize is a range of fixed block size. Upon determining the block size, the dynamic block matching algorithm adopts the same approach to compute Matching Cost as that of the fixed block size. The following equation (9) is used to compute the matching cost of edge-adaptive block size. Wherein, L and R represent respectively left and right map information, and subscript c represents YUV three sets of information, dr is matching range. Then, substitute parameters u_length, d_length, r_length, l_length into equation (8) as the range of an arbitrary block size.
Upon finishing computing Matching Cost of YUV, allocate the three sets of Matching Costs with appropriate ratio, as shown in the following equation (10). Since human eye is more sensitive to illuminance information Y, than to the color information UV, so allocate YUV with ratio of 2:1:1, to determine the final Matching Cost. The depth value is determined through a Winner Takes All (WTA) strategy, so that each position has a depth value, to form preliminary depth map of left and right maps.
Cost=0.5*CostY+0.25*CostU+0.25*CostV (10)
Through the computation mentioned above, serious errors still exist in occlusion regions of left and right preliminary depth maps, and that can be corrected by using the mutually complementary characteristics of left and right preliminary depth maps. Therefore, in step S18 of the present embodiment, a cross-check is utilized, to classify the regions in the left and right maps having different depth values into an unreliable depth region; meanwhile, use the statistical information of adjacent pixel depth values to correct the depth value of the unreliable depth region, so as to eliminate the errors in occlusion regions of left and right preliminary depth maps.
The checking of left depth map is taken as an example for explanation, and the conditions for determining unreliable depth regions are as shown in the following equation (11). Suppose d is the depth value of position (i, j) in the left map, and when the difference of depth values between position (i−d, j) of the right map and that of the position (i, j) of left map exceeds an allowable range, then mark the position in the left map having that depth value as in an unreliable depth region. Or in case the difference of depth values is within an allowable range, then keep the depth value of that position.
|Ldepth(i,j)−Rdepth(i−d,j)|>offset (11)
After finding out the unreliable depth regions in the left and right maps, perform step S20 to refine the unreliable depth region, to obtain depth map having correct depth values in the left and right maps. In the present invention, the original map is used as a basis for refining the preliminary depth map. Before refining the preliminary depth map, the last four bits of RGB value of the original left and right color maps are replaced with 0, as such the minimum difference of RGB of the respective pixel positions are all 16. Therefore, it is easier to partition range of refined depth map based on the information of color map. The four-bit reduction method used in the present invention is a simple color partition method. In order to obtain better color partition effect, K-means, Mean Shift algorithms can be used.
In the following, the refinement of the preliminary depth map of the left map is taken as an example for explanation. As shown in
Then, record the depth values within the color similarity (cs) in the window frame, plot them into a histogram, and use the histogram to select the refining depth value. In the present invention, the depth value that appears most frequently in the histogram is used to refine the depth values in the unreliable depth region. The algorithm is realized through the pseudo codes as shown in
For the matching blocks determined through using the edge-adaptive algorithm, their depth values should be close. The present invention utilizes this characteristic to propose a group-based disparity estimation algorithm to reduce computation time. As shown in
In addition to the group-based disparity estimation algorithm mentioned above, the present invention further provides a left-right depth replacement algorithm. The advantage of this algorithm is that, since the difference between the left and right color maps lies in their differences in the occlusion regions. Therefore, by subtracting the right color map from the left color map, then the occlusion region is left, and that can be used to eliminate the computations required for the non-occlusion region in the left and right maps, thus reducing the time required for computing the left and right maps. The flowchart of the left-right depth replacement algorithm is as shown in
Summing up the above, the present invention provides a disparity estimation depth generation method, which utilizes edge-adaptive matching block search algorithm and unreliable depth region refinement depth generation algorithm, to enhance significantly the accuracy of depth generation. Compared with fixed matching block, the edge-adaptive matching block algorithm may use the shape of the object well to find out the correct disparity value. In addition, with regard to refining depth map, the unreliable depth region refinement algorithm is utilized, to detect the errors of left and right depth maps through cross-check, then utilize the original left and right color map information of reduced bits to refine the errors detected through cross-check, to further reduce error rate of disparity matching. In order to reduce computation time required for disparity estimation, the present invention also provides a group-based disparity estimation algorithm and a left and right depth replacement algorithm, to increase computation speed.
The above detailed description of the preferred embodiment is intended to describe more clearly the characteristics and spirit of the present invention. However, the preferred embodiments disclosed above are not intended to be any restrictions to the scope of the present invention. Conversely, its purpose is to include the various changes and equivalent arrangements which are within the scope of the appended claims.
Number | Date | Country | Kind |
---|---|---|---|
100149936 | Dec 2011 | TW | national |