1. Technical Field
The invention relates to an adjusting method. Particularly, the invention relates to a method for adjusting a stereo image and an image processing device using the same.
2. Related Art
A stereo image is composed of more than two images of different viewing angles. When a user views a stereo image display, a left eye of the user views an image of one viewing angle, and a right eye views an image of another viewing angle, such that a 3-dimension image is produced in user's brain. However, the images of different viewing angles are displayed on a screen in a plane, so that the user's eyes focus on the screen, and the user's brain produces the stereo image located in front of or behind the screen. Such situation may lead to a dizzy or uncomfortable feeling of the user. When an object in the stereo image is displayed at a screen boundary, a part of the object is probably “shielded” by the screen boundary. When the user's eyes view the part of the object shielded by the screen boundary, the user may intuitively regard that the shielded part is imaged behind the screen. However, if the part of the object that is not shielded by the screen is imaged in front of the screen, the user may have an uncomfortable feeling, and such situation is referred to as stereoscopic window violation.
Referring to
Therefore, how to avoid the stereoscopic window violation is an important issue concerned by related technicians.
Accordingly, the invention is directed to a method for adjusting a stereo image and an image processing device using the same, by which stereoscopic window violation is avoided.
An embodiment of the invention provides a method for adjusting a stereo image, which is adapted to an image processing device. The stereo image is displayed on a screen. The method includes following steps. A plurality of depth values of the stereo image are obtained, where a plurality of first depth values correspond to a boundary region of the screen. It is determined whether one of the first depth values is negative parallax. If one of the first depth values is negative parallax, the depth values are adjusted such that the first depth values are not negative parallax.
In an embodiment, the stereo image includes a first image and a second image. The steps of obtaining the depth values of the stereo image includes following steps. A plurality of first feature points of the first image are obtained, and a plurality of second feature points of the second image are obtained, and the first feature points and the second feature points are matched to calculate the depth values.
In an embodiment, the step of determining whether one of the first depth values is the negative parallax includes following steps. A minimum depth value in the first depth values is obtained, and it is determined whether the minimum depth value is negative parallax.
In an embodiment of the invention, the step of adjusting the depth values such that the first depth values are not negative parallax includes following steps. The minimum depth value is added by a shift value to generate a second depth value, where the second depth value is not negative parallax, and the depth values other than the minimum depth value are added by the shift value.
In an embodiment of the invention, the second depth value is zero parallax.
According to another aspect, an embodiment of the invention provides an image processing device including a memory and a processor. The memory stores a plurality of instructions. The processor executes the instructions to execute following steps. A plurality of depth values of a stereo image are obtained, where a plurality of first depth values correspond to a boundary region of a screen. It is determined whether one of the first depth values is negative parallax. If one of the first depth values is negative parallax, the depth values are adjusted such that the first depth values are not negative parallax.
According to the above descriptions, in the method and the image processing device of the invention, the depth values can be adjusted to avoid stereoscopic window violation.
In order to make the aforementioned and other features and advantages of the invention comprehensible, several exemplary embodiments accompanied with figures are described in detail below.
The accompanying drawings are included to provide a further understanding of the invention, and are incorporated in and constitute a part of this specification. The drawings illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention.
Referring to
The processor 210 is used for executing a plurality of instructions. For example, the processor 210 is a central processing unit (CPU), a microprocessor or a digital signal processor (DSP).
The memory 200 stores a plurality of instructions, and the processor 210 executes the instructions. For example, the memory 220 is a dynamic random access memory (DRAM), a static random access memory (SRAM), a flash memory or other memories.
Referring to
Based on a magnitude of the depth value, an object is imaged in front of or behind the screen. If the object is imaged in front of the screen, the depth value corresponding to the object is negative parallax. Comparatively, if the object is imaged behind the screen, the depth value corresponding to the object is positive parallax. In the exemplary embodiment, a negative depth value is the negative parallax, and a positive depth value is the positive parallax. However, in other exemplary embodiments, the processor 210 can also take the positive depth value as the negative parallax, which is not limited by the invention.
Depth values (which are also referred to as first depth values) of a region 350 correspond to a boundary region of the screen. The processor 210 determines whether a depth value of negative parallax exists in the region 350, and if the depth value of negative parallax exists in the region 350, the processor 210 adjusts all of the depth values in the depth map 330, such that the depth value of negative parallax does not exist in the region 350. In the present embodiment, a width of the region 350 is one pixel. However, the width of the region 350 can also be more pixels, which is not limited by the invention. It is assumed that the depth value of an object is negative parallax, i.e. a viewer regards that the object 340 is imaged in front of a screen.
Referring to
Referring back to
In the present embodiment, the processor 210 adds all of the depth values by the same shift value. However, in another embodiment, the processor 210 can also adds different depth values by different shift values according to the content, brightness or color of the stereo image. On the other hand, in the aforementioned example, a sum of the minimum depth value and the shift value is 0. However, in other embodiments, the sum of the minimum depth value and the shift value can be any positive number (i.e. the positive parallax), though the invention is not limited thereto.
Referring to
Referring to
In step S604, it is determined whether one of the first depth values is negative parallax. If a determination result of the step S604 is negative, the flow is ended, and if the determination result of the step S604 is affirmative, a step S606 is executed.
In the step S606, the depth values are adjusted such that the first depth values are not negative parallax.
Various steps of
In summary, in the method and the image processing device of the invention, the depth values can be adjusted when the depth values corresponding to the boundary region are negative parallax, so as to avoid the stereoscopic window violation.
It will be apparent to those skilled in the art that various modifications and variations can be made to the structure of the invention without departing from the scope or spirit of the invention. In view of the foregoing, it is intended that the invention cover modifications and variations of this invention provided they fall within the scope of the following claims and their equivalents.