Calculation of image pixel length

Can I find out what are the ways to calculate the length of 1 pixel in centimeters? The images that I have are 640x480. I would like to compare 2 pixels in different places on the image and find the difference in distance. Thus, I will need to find out what is the length of a pixel in centimeters. Thank.

+3
source share
4 answers

A pixel is a relative unit of measure; it does not have an absolute size.

Edit Have . As for your editing: again, you can calculate the distance between two pixels in an image in pixels, not centimeters. As a simple example, think about video projectors: if you project, say, a 3 × 3px image onto a wall, the distance between the leftmost and rightmost pixels can range from a few millimeters to several meters. If you move the projector closer to or further from the wall, the pixel size will change and any distance that you calculated earlier will become incorrect.

( ). , , , .

. , .

+6

:

pixel width = width of monitor viewable area / number of horizontal pixels

pixel height = height of monitor viewable area / number of vertical pixels
+4

, , .

dpi ( ), 2,54 . (, ..).

, . , , , "100%" .

, , , ( 96 , 120), , ...

+2

dpi ( 96 ), dpi

for example, a 15-inch monitor should have a width of 12 inches, so depending on the horizontal resolution you will get another horizontal dpi, assuming a screen width of 1152 pixels, you really get 96 dpi

0
source

Source: https://habr.com/ru/post/1736303/


All Articles