Thursday, January 29, 2009

Resizing SD to HD

Let’s now take a look at up rezing from SD to HD and a couple of different available options. We are going to consider NTSC and assume square pixels for simplicity.

SD has an aspect ratio of 4:3 with video frame with horizontal dimension of 640 and a vertical dimension of 480 pixels or 640 x 480 (we always count horizontal first.) The two flavors of HD are 1280 x 720 and 1920 x 1080 with an aspect ratio of 16:9. Figure 2 shows frames with the same proportions to illustrate.




The simplest approach is to stretch the SD image to fill the HD frame. But this results with very fat looking people. Not very pretty. The next easy option is to enlarge the SD image in the vertical dimension to match HD first. For that we compute the ratios of the vertical sizes. For 720 we have 720/480 = 1.5. So we need to enlarge the horizontal size by the same ratio to maintain the picture proportions: 640 x 1.5 = 960. That means that we are left with 1280 – 960 = 320 in width without picture. We could split the 320 in half to create two vertical black bands of 160 pixels in width each.


Now for the 1080 case we have 1080/480 = 2.25 and 640 x 2.25 = 1440. So we are left with a 1920 – 1440 = 480 wide area of the 16:9 picture that can be split in two bands, one on each side of the SD image of 240 pixels in width.


In both cases (720 and 1080) the resulting video looks like figure 3.



There are some algorithms that stretch the image horizontally to fill the entire HD frame at the expense of distorting the original image. Some algorithms evenly stretch the image horizontally and others keep the center of the original image intact and incrementally stretch out to the sides (kind of like a fish eye effect.)

Next post: Resizing affects color?

No comments: