The present invention relates to the field of adaptive display interpolators. More particularly, the invention relates to a method for panoramically interpolating a video, whose initial aspect ratio is different from the aspect ratio of the display screen, based on the contents of the video.
Today, the broadcasted TV videos are typically mixed between two different standard aspect ratios of 16:9 and 4:3. This mix-up is due to the different standards of TV broadcasting which have evolved over the years. In consequence, today's TV sets also differ in their native aspect ratio in accordance with these standards. Therefore, a certain TV with a specific native aspect ratio is sometimes required to interpolate the incoming broadcasted aspect ratio to fit its native aspect ratio. The changing of aspect ratio may be done in a number of ways depending on the resolution capabilities and native aspect ratio of the TV set, and depending on the contents and parameters of the TV broadcasts.
Changing an image of a video from a 4:3 aspect ratio to a 16:9 aspect ratio may be done using one of the following techniques: (a) by adjusting the horizontal length (width) of the image to the horizontal length of the screen, so that upper and lower parts of each image of the incoming video are left out during display, otherwise known as “center cut”. (b) By shrinking the display of the incoming video so as to adjust the vertical length (height) of the image to the vertical length of the screen, thereby presenting two thick black stripes on the sides of the screen, otherwise known as “letter box”. (c) By adjusting the vertical length of the image to the vertical length of the screen and linearly up scaling the horizontal length of the image to fit the screen, whereby the original aspect ratio within the image is no longer maintained. (d) By adjusting the vertical length of the image to the vertical length of the screen and panoramically (symmetrically, non-linearly) up scaling the horizontal length of the image to fit the screen.
Changing an image of a video from a 16:9 aspect ratio to a 4:3 aspect ratio may be done using the following techniques: (a) by adjusting the vertical length (height) of the image to the vertical length of the screen, so that certain parts of each image's sides of the incoming video are left out, otherwise known as “center cut”. (b) By shrinking the display of the incoming video so as to adjust the horizontal length (width) of the image to the horizontal length of the screen, thereby presenting two thick black stripes on top and bottom of the screen, otherwise known as “letter box”. (c) By adjusting the vertical length of the image to the vertical length of the screen and linearly down scaling the horizontal length of the image to fit the screen, whereby the original aspect ratio within the image is no longer maintained. (d) By adjusting the vertical length of the image to the vertical length of the screen and panoramically (symmetrically, non-linearly) down scaling the horizontal length of the image to fit the screen.
All the above mentioned techniques have their drawbacks; however, the panoramic adjustment exploits all the screen area and provides a good un-distorted view of the center of the image, where most of the important details are displayed.
In some of the cases, the video contents themselves are broadcasted in a different aspect ratio than their initial aspect ratio. For example, a movie which was initially filmed using an aspect ratio of 16:9 is sometimes broadcasted using a standardized 4:3 aspect ratio. In this example, the black stripes, of the letter box technique, are added to the video data prior to broadcasting in order to provide a broadcast of the standardized 4:3 aspect ratio. However, when the user's TV receives this broadcast it treats the incoming video as a regular standardized 4:3 video without taking into account that some of the video data is superfluous. In some of the cases, the user's TV will re-interpolate this video to fit the native aspect ratio of the TV, which may be different. In this case, the re-interpolation may cause an even greater distortion, loss of data, or unfilled screen area. Furthermore, the same movie may have different parts which are interpolated differently using the interpolation techniques described above. In this case using the same re-interpolation technique may cause visible distortions during the display of the movie.
US 2007/0098302 discloses an image converter circuit which is capable of converting images to a panoramic display. The disclosed converter can convert the horizontal/vertical number of pixels of an image into the number of pixels of a display device in a panoramic view. However, the disclosed converter does not deal with the contents of the image, its superfluous image data, and the size and color of the superfluous data.
It is an object of the present invention to provide a method for interpolating an image having one aspect ratio into a different aspect ratio.
It is another object of the present invention to provide a method for interpolating a video into a different aspect ratio while discarding the superfluous data in the video.
It is still another object of the present invention to provide a method for interpolating a broadcasted video having an initial aspect ratio into a panoramic display having a different aspect ratio.
It is still another object of the present invention to provide a method for interpolating a broadcasted video having an initial aspect ratio and an initial set resolution into a panoramic display having a different aspect ratio and a different set resolution
Other objects and advantages of the invention will become apparent as the description proceeds.
The present invention relates to a method for panoramically interpolating a video from a first aspect ratio to a second aspect ratio comprising the steps of: (a) receiving at least one frame; (b) tracking said frame horizontally or vertically pixel line by pixel line; (c) computing the average luminance value of each of said pixel lines; (d) comparing each said average luminance value to a set threshold for finding the superfluous lines; (e) trimming said frame by deleting said superfluous lines; (f) calculating the required curve for the panoramic scaling of said trimmed frame; and (g) interpolating said trimmed frame into a panoramic display based on said calculations.
The present invention also relates to a method for panoramically interpolating a video from a first aspect ratio to a second aspect ratio comprising the steps of: (a) receiving more than one frame; (b) tracking each frame horizontally or vertically pixel line by pixel line; (c) computing the average luminance value of each of said pixel lines of each frame; (d) comparing each said average luminance value to a set threshold for finding the numbers of superfluous lines; (e) filtering said numbers of said superfluous lines with at least one IIR filter, for producing at least one filtered number of superfluous lines; (f) trimming at least one of said frames by deleting said filtered number of said superfluous lines; (g) calculating the required curve for the panoramic scaling of said trimmed frame; and (h) interpolating said trimmed frame into a panoramic display based on said calculations.
Preferably, the method further comprises the step of detecting if the frame belongs to new scene, and if so calibrating the filter accordingly.
In one embodiment, the received frame belongs to the YCbCr color space.
In another embodiment, the received frame belongs to the RGB color space.
In the drawings:
a is an example of a frame that had an initial aspect ratio of 16:9 and was interpolated into a standardized 4:3 aspect ratio.
b is an example of the frame after trimming the superfluous dark ribbons.
c is an example of the frame after scaling and panoramic interpolation.
Typically only two IIR filters are needed for a single scene; either in one case: one for the top and one for the bottom, or in another case: one for right and one for left.
For the sake of brevity an example of an IIR filter is set forth:
Y—is the number of dark lines.
a—is a constant (typically less than 1) set by the user which defines the tracking speed and accuracy.
Y
n
=a*Y
n−1+(1−a)Ynow
Thus each new number of dark lines (Ynew) is fed to the filter and processed with the previous number of dark lines (Yn−1). The new filtered number (Yn) is sent to trimmer 200 for trimming the frame accordingly.
For the sake of brevity a non-limiting example is set forth for illustrating the method of the invention, according to one embodiment. In
For the sake of enablement an example of the scaling of a panoramic curve is calculated forth, according to one embodiment:
In this example a single frame is requested for panoramic interpolation in order to fit a screen having a different aspect ratio.
Fw—the width of the frame (in pixels).
Fh—the height of the frame (in pixels).
Sw—the width of the screen (in pixels).
Sh—the height of the screen (in pixels).
S
h
/F
h
=R
h
S
w
/F
w
=R
w
Rnorm=Rw/Rh
In this example Rnorm is bigger than one (for example panoramic scaling of 720×480 to 1280×720).
The circumference C of an ellipse is
Nevertheless in this case this approximation may be used:
At this point we can assume that C=Rnorm*2 as the panoramic view is only a half of the total circumference of the ellipse. For the sake of brevity the long axis of the ellipse is 1, meaning that a=½. Thus b can be extracted from equation 2. After extracting b, a and b may be inserted in the ellipse equation:
which equals to:
and y may be derived dy/dx.
The derivative dy/dx is then fed into the equation:
Which allows the calculating of the scaling ratio for pixel at position x in the source frame.
In one of the embodiments, this ratio can be also approximated by quasi linear function.
In another embodiment the invention may be used for a frame having an any other color space, for example ROB color space. In this embodiment all the pixels' parameters are averaged and compared with a set threshold. For example, a threshold of 5 may be selected where the average of all the RGB parameters of the average pixel of a line must be below in order to effectively define that line as a dark line,
While some embodiments of the invention have been described by way of illustration, it will be apparent that the invention can be carried into practice with many modifications, variations and adaptations, and with the use of numerous equivalents or alternative solutions that are within the scope of persons skilled in the art, without departing from the invention or exceeding the scope of claims.