Principle of pixel transverse-longitudinal ratio formula

Source: Internet
Author: User

In the book 3D Mathematical Fundamentals-graphics and game development, we see the concept of pixel-to-width ratio. Of course it's good to understand that pixels are squares, so the pixel-to-width ratio is 1.

For pixel aspect ratio details, please refer to msdn:https://msdn.microsoft.com/zh-cn/library/cc294571.aspx, I will parse the meaning of the formula after quoting

The references are as follows:

The pixel aspect ratio refers to the ratio of the width (x) of the pixel to the height (y). The ratio of square pixels is 1:1, but the height and width of non-square (rectangular) pixels are not the same. This concept is similar to the frame aspect ratio, which is the ratio of the entire width to the height of the image. Typically, a TV pixel is a rectangle, and a computer pixel is a square. As a result, images that look right on a computer monitor will deform on the TV screen, especially when the spherical image is displayed. In Microsoft Expression Encoder, you can set options to display non-square pixel media correctly, and to output non-square pixel content.

Note that the frame aspect ratio of an image does not necessarily qualify the pixel aspect ratio. A widescreen image with a frame aspect ratio of 16:9 can contain square or non-square pixels. For example, a digital video with a frame aspect ratio of 720x486 is often treated as a widescreen video and created using rectangular pixels. However, images with the same frame aspect ratio may actually be created in an image-editing program and are therefore created in a square pixel environment. Pixel aspect ratio

If you encode a video source using pixels that appear to be squares but are not square, the output will deform, as shown in the following figure. Circles created with rectangular pixels (left) and the same circle (right) displayed on the computer monitor

If you know the frame aspect ratio (IX:IY) and the exact height and width of the image source, you can use the following formula to determine the X-and Y-values of the pixel aspect ratio:

Pixelaspectratiox/pixelaspectratioy = (Ix * height)/(Iy * width)

For example, if the image is 720 x 360 pixels and the frame aspect ratio is widescreen (16:9), then:

Pixelaspectratiox=8 and pixelaspectratioy=9
Pixelaspectratiox/pixelaspectratioy = (16*360)/(9*720) = 8/9

Expression Encoder performs this calculation when you select or enter a frame aspect ratio. For more information, see Set video aspect ratio. Please read the pixel aspect ratio formula given in the book:


Analytical:

Pixel width/pixel height = (physical width/physical height) * (width of pixel ratio of high/pixel)

But I don't like the way that can't see the principle at a glance, I changed to the following form


Other words


That is: (physical width/width of pixels)/(physical height/pixel height) = wide physical size per pixel/high physical size per pixel

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.