31st May 2024

Understanding Digital Imaging: Essential Technical Concepts

Digital-Imaging-VS-Online-img

Introduction

In the world of digital imaging, several technical concepts form the foundation of how images are created, stored, and manipulated. This blog will explore these essential aspects, providing a comprehensive understanding of terms such as pixel, resolution, bitrate, bit depth, compression (both lossy and lossless), PPI, and color representation in various formats.

PIXEL:

“You took a photo of your friend and showed it to them. However, your friend's response was, 'This is fine, but the pixels are broken, man.' Intrigued, you asked, 'What do you mean by pixels?' 'I don’t even know,' your friend admitted, 'but that's probably why the quality seems low.”

pixel-image

Let’s get into detail about pixels. A pixel is nothing but a dot. Yeah, that's it—a dot.

More professionally, it's the smallest unit of a digital image that contains information about color and brightness.

This means that an image is composed of a large number of pixels. But how and what do they represent? Pixels consist of one or more channels, and each channel consists of bits to represent the color of the image."

  • Channels: Channels represent the individual color components of a pixel. For example, in the RGB color model, a pixel typically consists of three channels: red, green, and blue. In the CMYK color model, a pixel can have four channels: cyan, magenta, yellow, and black
  • Bits: Each channel consists of a certain number of bits used to represent the intensity or color value of that channel. The number of bits per channel determines the color depth or precision of the image. For example, an 8-bit channel can represent 256 different intensity levels, while a 16-bit channel can represent 65,536 levels.

We will explore more about image formats and how bits are arranged in a picture later in this blog.

Resolution:

Resolution refers to the number of pixels arranged horizontally and vertically in an image or video. For example, a resolution of 1920x1200 means there are 1920 pixels horizontally and 1200 pixels vertically. Resolution determines the level of detail and clarity of the image but does not inherently dictate the physical dimensions of the display. How? Let’s understand PPI and pixel density.

resolution-image
  • PPI: "PPI (pixels per inch) measures the resolution of a digital image on a screen, indicating how many pixels are displayed per inch. A higher PPI results in a clearer and more detailed image on screens."
  • Pixel Density: "Let me ask you a question. You are watching a video on YouTube, and the quality of the video is low. You then change the quality from 240p to 1080p. What is this, and how does it change the quality?”

Let's see. As mentioned before, resolution determines the level of detail and clarity. For instance, 640x480 resolution contains fewer pixels than 1920x1080. When you change the video quality from 240p to 1080p, your phone's display size remains constant, but you are packing more pixels into it. Even if the image dimension is smaller than your display size, it is automatically stretched to fit the screen. Packing more pixels into the same space gives you a higher quality image. This is called pixel density.

More technically, pixel density is a concept that combines both resolution and screen size. Pixel density is measured in pixels per inch (PPI). A higher PPI means more pixels are packed into each inch of the display, resulting in a sharper image. For example, a smartphone screen with a 1920x1080 resolution on a 5-inch display has a higher PPI compared to a 24-inch monitor with the same resolution."

Bit Depth:

"So bits in the pixels represent the color of that pixel, right? Let’s get into more. Bit depth indicates the number of bits used to represent the color of a single pixel. Higher bit depth allows for more colors and finer gradations."

  • 8-bit: "256 colors per channel, suitable for standard images."
  • 16-bit: "65,536 colors per channel, often used in high-end photography and medical imaging." So higher bit depth means higher quality pixels and higher quality images.
Compression:

Compression reduces the size of image files, making them easier to store and transmit. There are two types of compression:

Lossy Compression: Lossy compression reduces file size by removing some data, which can result in a loss of quality. It is commonly used in formats like JPEG for images and MP3 for audio.

  • Advantages: Smaller file sizes, faster transmission
  • Disadvantages: Quality loss, which may be noticeable at higher compression levels

Question: In lossy compression, some data is removed, right? Which data will be removed?

This process reduces the precision of certain pixel values. For example, instead of storing a color as 16,777,216 possible values, it might only store 1,000,000 possible values. This is one example of lossy compression, and there are many techniques available, each with its advantages and disadvantages. Some of them are ,

  • Quantization
  • DCT (Discrete Cosine Transform)
  • Color Subsampling:

Lossless Compression: Lossless compression reduces file size without losing any data. Formats like PNG for images

  • Advantages: No loss of quality.
  • Disadvantages: Larger file sizes compared to lossy compression.
Bit Arrangement in Formats:

Different image formats arrange bits in various ways to store color information. Here are a few common formats:

RGB (Red, Green, Blue) is a color model where colors are represented as combinations of the three primary colors. Each pixel is typically represented by 8 bits per channel (24 bits total), but higher bit depths are also used.

  • 8-bit RGB: 256 levels per channel, 16.7 million colors.
  • 16-bit RGB: 65,536 levels per channel, 281 trillion colors
bit-arrangement1-image
Grayscale(Y8 , Y16 etc):

Grayscale images contain shades of gray, with each pixel represented by a single intensity value (one channel). They are often used in applications where color is not necessary, such as medical imaging or document scanning.Don't confuse grayscale with black and white images..

  • 8-bit Grayscale: 256 shades of gray.
  • 16-bit Grayscale: 65,536 shades of gray.
bit-arrangement2-image
Black and White

Black and white images have only two colors: black and white. They are commonly used in applications like printing text documents or line drawings.

  • 1-bit Black and White: Each pixel is either black or white, represented by a single bit.

RAW

RAW formats store unprocessed sensor data from digital cameras. They provide maximum flexibility for post-processing because they contain all the captured detail without any compression or processing applied.

  • 12-bit RAW: Common in entry-level and mid-range cameras.
  • 14-bit RAW: Common in high-end cameras, providing even more detail.

Conclusion

Understanding these technical concepts is crucial for anyone working with digital images. From the basics of pixels and resolution to the complexities of bit depth and compression, each aspect plays a vital role in how images are captured, stored, and displayed. By mastering these concepts, you can make more informed decisions about image quality, file sizes, and the best formats for your needs.

Let's develop your ideas into reality