1
  1. What are the definitions of and relations between several quantities of image files:

    • resolution unit
    • resolution
    • width and height
    • Pixels Per Unit
    • Pixel Units
    • density

    For example, I saw a usage of convert from Imagick, where the above quantities appear, but I don't know their exact meanings.

    $ convert 1.jpg  -units PixelsPerInch -density 300x300 1c.jpg
    
    $ exiftool 1*
    
    ======== 1.jpg
    File Type                       : JPEG
    Resolution Unit                 : None
    X Resolution                    : 1
    Y Resolution                    : 1
    Image Width                     : 2500
    Image Height                    : 3072
    Image Size                      : 2500x3072
    
    ======== 1c.jpg
    File Type                       : JPEG
    Resolution Unit                 : inches
    X Resolution                    : 300
    Y Resolution                    : 300
    Image Width                     : 2500
    Image Height                    : 3072
    Image Size                      : 2500x3072
    
    $ convert 2.png  -units PixelsPerInch -density 300x300 2c.png
    
    $ exiftool 2*
    
    ======== 2.png
    File Type                       : PNG
    Image Width                     : 2500
    Image Height                    : 3072
    Pixels Per Unit X               : 11929
    Pixels Per Unit Y               : 11929
    Pixel Units                     : Meters
    Image Size                      : 2500x3072
    
    ======== 2c.png
    File Type                       : PNG
    Image Width                     : 2500
    Image Height                    : 3072
    Pixels Per Unit X               : 30000
    Pixels Per Unit Y               : 30000
    Pixel Units                     : Meters
    Image Size                      : 2500x3072
    
  2. How is DPI in scanning related to the above quantities?

Thanks!

Tim
  • 17,287

2 Answers2

1

Resolution Unit: Resolution unit is nothing but the physical quantifier of the image in mm, inch etc.

Resolution: Resolution is sometimes identified by the width and height of the image in pixels

Width and height: Combination of width and height is know as resolution.

Pixels Per Unit: Number of lines in image per height.

Pixel Units : Number of lines in a image is called as Pixel Units.

Density: Pixel density is simply a measure of how many pixels will fit into a given area. It is determined by the size of the pixels: the smaller the pixels, the higher the pixel density.

DPI: Dots Per Inch. Rough estimation of an image of their physical entity. 1.jpg is a physical entity 1c.jpg is a DPI estimate of physical entity.

Matt
  • 1,226
BDRSuite
  • 6,234
1

The terms don't necessarily have universal definitions and are often used in different ways.

Resolution originates from a definition of how closely two lines or elements of an image can be and still be resolved visually (good explanation here). It is usually used in the context of density--pixels or dots per unit. So Resolution Unit is the unit of measure (e.g., inch), that the resolution is being expressed in.

Resolution is more generally used in the density sense to define how to relate the pixels or dots to physical size. On a typical display, with a resolution of around 96 pixels per inch, an image resolution of 96 ppi would display "full size" (100% zoom), where each image pixel is displayed with one screen pixel. So a 400x600 pixel image would occupy roughly 4"x6" on the screen. Zooming on the screen is accomplished by using a different resolution and then averaging or interpolating image pixels to determine what gets displayed by each screen pixel. You typically adjust print size through the resolution setting. If you print that same image at 200 dpi, the output will occupy 2"x3".

Image width and height are the number of pixels in each direction.

Pixels per unit is how resolution is expressed, but it is also used in an absolute sense (divorced from any notion of visual acuity). It is used as a physical measurement when applied to a device rather than a resolution setting for an image. The computer screen is manufactured with pixels in a pattern at a certain density. The image sensor in a camera packs a certain number of pixels into a certain sensor size. The pixel units would be the unit of measure for the device (e.g., mm for a camera sensor or inches for a screen), so pixels per mm on a camera sensor would be the number of pixels in one mm along one dimension of the sensor. (Technically, "pixel" refers to the smallest element in an image so sensor elements aren't pixels but produce pixels.) The usage in your example is really resolution and reflects a math exercise. If you were to use meters as a unit of measure, that's what the resolution would calculate to be.

Resolution actually refers to one direction. It is often expressed as two resolutions in one to reflect both directions. Density normally reflects resolution (or pixels per unit) in both dimensions.

In scanning, the sensor has optical characteristics that allow it to capture pixels at some mechanically-defined density. That is often different from what you need for a particular use. The scanner software allows you to select a different output resolution, which is accomplished by averaging or interpolating the results from adjacent sensor pixels. The DPI setting defines the image resolution you want the scanner software to output after processing the raw scan.

fixer1234
  • 27,486