Digital image fundamentals
1 / 102

Digital Image Fundamentals - PowerPoint PPT Presentation

  • Uploaded on

Digital Image Fundamentals. Chapter 2. KEY CONCEPTS. Sampling and quantizing in digitizing images Pixels and image resolution Image bit depth. KEY CONCEPTS. How pixels, image resolution, and bit depth are related to sampling and quantizing Color representation in digital images

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about ' Digital Image Fundamentals' - ruby-tyler

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

Key concepts

  • Sampling and quantizing in digitizing images

  • Pixels and image resolution

  • Image bit depth

Key concepts1

  • How pixels, image resolution, and bit depth are related to sampling and quantizing

  • Color representation in digital images

  • Bit-mapped images versus vector graphics


How many pixels do you capture?

Area the might have much detail

Is reduced to one pixel

“Averaging” effect


Each Sample Point is translated into a pixel

Real world image:Infinite detail

Single Pixel:Finite detail

Quality loss illuminated
Quality Loss illuminated

  • Once the digital image is captured….

  • There is no way to “restore” the original detail.

Analog real world images
Analog / Real World Images

  • In the real world, we can perceive almost infinite detail

  • By…

    • Moving closer

    • Using a microscope

    • Nano-visualization

Sampling number of pixels
Sampling: Number of Pixels


7500 pixels (100 X 75)

Sampling number of pixels1
Sampling: Number of Pixels


1900 pixels (50 X 38)

Sampling number of pixels2
Sampling: Number of Pixels


300 pixels (20 X 15)



Digital Cameras

Up to 12 Megapixels

4000 X 3000 pixels

Consider 300dpi printing

13 X 10’ looks great

Consider 150dpi printing

26 X 20” looks pixelated.

  • Up to 4800 pixels per inch

  • 8 X 10” photograph 

  • 38,400 pixels X 48,000 

  • 1,843,200,000 

  • 1.7 Gigapixels * 32-bit color

  • 6.8 Gigabytes


  • Associated with digital cameras

  • Camera manufactures do NOT follow the base-2 standard so

    • a Megapixel is literally 1 million pixels

    • not 220 pixels.

  • A 3000 × 2000 pixel digital image is 6,000,000 pixels

    • Referred to as six megapixels.

Pixels and dots
Pixels and Dots



Smallest unit that a printer can print.

Smallest unit that a scanner can detect

  • Just the base unit of storage.

  • Does NOT have a set size, i.e., 1 millimeter X 1 millimeter

    • Pixel size depends on the monitor or projector

  • May not be a square

    • Could be a circle of light

Over sampling
Over sampling




Printed as one dot

  • 4800dpi

  • 4800/300 = 16

  • 16 X 16

Under sampling
Under sampling




600/300 = 2

Printed using 2 X 2

NOT taking full advantage of the printers capabilities.

  • 300dpi

  • One dot

Quantization number of colors
Quantization: Number of Colors

Original (16.7 million colors)

2 colors (1-bit)

Quantization number of colors1
Quantization: Number of Colors

Original (16.7 million colors)

4 colors (2-bit)

Quantization number of colors2
Quantization: Number of Colors

Original (16.7 million colors)

8 colors (3-bit)

Quantization number of colors3
Quantization: Number of Colors

Original (16.7 million colors)

16 colors (4-bit)

Quantization number of colors4
Quantization: Number of Colors

Original (16.7 million colors)

32 colors (5-bit)

Quantization number of colors5
Quantization: Number of Colors

Original (16.7 million colors)

64 colors (6-bit)

Quantization number of colors6
Quantization: Number of Colors

Original (16.7 million colors)

256 colors (8-bit)


  • A natural image is colored in continuous tones

    • theoretically has an infinite number of colors.

  • Binary representation restricts the reproduction colors and shades.

    • 8 bits can only encode 256 different color values

  • In image capturing, the process of encoding an infinite number of possible colors into a finite number list of colors is called quantization.

Color selection
Color selection

  • Quantization limits how many colors you can represent in a digital image, but

  • Not which colors you decide to encode.

  • Although this image has only 8 colors

  • The colors are very specific to the original image.

Color palettes
Color Palettes

Image formats (like GIF) can encode different palettes - depends on colors in the original image.

If you chose the colors wisely the image looks more realistic.

Color translation
Color Translation

Meta data “maps” each 3-bit code to a universal 32-bit palette

000  10101010101010101010101001010101

001  10101010101010100010010010010101

010  11010101001000111101010101010101

011  00010101010101010101111010100011

100  11101010111010111011010010100010

101  10101001000100010011110101010000

110  10101010100010110001111001101011

111  00100010001111010010000001111111

Red green blue
Red Green Blue

  • A single 8-bit byte can be used to represent one of 256 different possible values.

  • The values range from 0 to 255.

  • An RGB (red, green, blue) color can be represented in three 8-bit bytes

  • Example:

    • Red: 255 (maximum red) 8-bits

    • Green: 0 (minimum green) 8-bits

    • Blue: 127 (50% blue) 8-bits24-bits total

  • What color is this?

Red green blue1
Red Green Blue

  • Although 24-bit color is sufficient for human vision, 48-bit RGB can be used when applications need to analyze images beyond the spectrum visible to humans.

  • 48-bit RGB color is represented using 16 bits per component of R, G, and B.

32 bit color
32-bit color

  • A 32-bit image is basically 24-bit RGB with an additional 8-bit alpha channel.

  • The alpha channel is used to specify the level of transparency.

  • Unlike 24-bit images that are fully opaque, 32-bit images can be smoothly blended with other images.

Alpha channel

  • Refers to the transparency of a color.

  • Transparency is a powerful feature because it better models real world entities.

  • Consider a digital image of a tinted window.


  • How many possible colors can be represented with 48-bit color depth?

  • How many possible levels of red can be represented with 48-bit RGB color?

  • How many times would a file size increase by going from 24-bit to 48-bit?

Bitmapped images
Bitmapped Images

  • Hopefully, lab helped illustrate this…

Bitmapped images1
Bitmapped Images

But now consider that instead of these being 1’s and 0’s, they are 24-bit, 32-bit, or 48-bit color codes.

Bitmaps raster graphics
Bitmaps  Raster Graphics

  • Bitmapped images also are called raster graphics

  • “rastering” refers to the way most video displays translate the images into a series of horizontal lines on the screen.  


  • Bitmap image formats are the most commonly used in image-editing applications.

  • However, bitmap appearance depends on the resolution of the output device

    • Bitmapped images can appear jagged and lose detail when they’re scaled onscreen or printed.

Jagged images or jaggies
Jagged images (or Jaggies)

  • A picture is worth a thousand words, right?

Alternative to bitmaps
Alternative to Bitmaps

  • Besides pixel by pixel representation, what other way could we store images digitally?

  • Hmmm? Think about it.

  • Math Power!

Vector graphics
Vector Graphics

  • Vector graphics is the use of geometrical primitives such as

    • points,

    • lines,

    • curves, and

    • polygon(s)

  • …to represent images.


x2, y2

  • points,

  • lines,

  • curves, and

  • polygon(s)

  • are all based upon mathematical equations.

x, y coordinate

x1, y1

Splines not in book
Splines (not in book)

  • A spline is a curve defined by piecewise polynomial functions.

Fonts the first vector images
Fonts – The first vector images

  • vectors still appear smooth at higher magnification

  • rasterized graphic

  • rasterized graphic with anti-aliasing


Font magnification example:



Stored as vector

Displayed as scalable raster

Monitors and projects still display using pixels.

To display a vector image, software has to convert the vector information into a temporary raster image.

Called rendering or rasterization

  • Vectors are literally made up of mathematical formulas

  • No pixels at all

  • In principle, vectors can be rendered at limitless resolution

Aliasing formal word for jagged
Aliasing (formal word for jagged)

  • Rasterized images will always appear jagged

    • You just have to zoom in.

  • This jagged effect is called aliasing

  • caused by under-sampling or over-maginfication.

Anti aliasing

  • Pixels with intermediary shades can be used to soften the jaggedness

  • This technique is called anti-aliasing.

  • Technique to make rasterization more smooth.

Raster bitmap and vector formats
Raster (bitmap) and Vector formats



SWF (Shockwave Flash)

SVG (Scalable Vector Graphic)

EPS (Encapsulated Postscript)

AI (Adobe Illustrator)

  • GIF

  • JPEG

  • PICT

  • TIFF

Combo-format (not in book)

PNG (Portable Network Graphic) – Raster format but includes vector information when applicable.

File size
File Size

  • How much file space does a 6-megapixel 24-bit color image take up uncompressed.

  • 6,000,000 pixels × 24 bits per pixel

  • = 144,000,000 bits

  • File size in bytes:

  • 144,000,000 bits/(8 bits per byte)

  • = 18,000,000 bytes

Obvious compression
Obvious Compression

  • Reduce sampling

    • Lower the resolution

    • 3000 X 2000 (6 megapixels)  1500 X 1000 (3 megapixels

  • Lower the color depth

    • 24-bit color  16-bit color

    • Maybe there are only 20,000 different colors present

Clever compression
Clever Compression

  • Run-length encoding (RLE)

  • runs of data are stored as a single data value and count, rather than as the original run.

  • 0000000111110000000000000 (25 bits)

  • (0,7) (1,5) (0, 13)

  • (0, 0111) (1, 0101) (0, 1101)

  • 001111010101101 (15 bits)

  • Patterns instead of runs can be counted.

Clever compression1
Clever Compression

  • Huffman coding

  • Find most frequent color, use smallest representation

    • 1000 white pixels (1)

    • 80 black pixels (01)

    • 24 pink pixels (001)

    • 8 red pixels (0001)

    • 3 blue pixels (00001)

  • 111101001010001

Lzw compression
LZW Compression

  • Lempel-Ziv-Welch (LZW) is a universal lossless data compression algorithm

  • created by Abraham Lempel, Jacob Ziv, and Terry Welch.

  • It was published by Welch in 1984

  • Used in GIF compression.

Deflate compression
DEFLATE Compression

  • Deflate is a lossless data compression algorithm that uses a combination of the LZW algorithm and Huffman coding.

  • Used by the PNG format.

Digital image fundamentals

  • The name "JPEG" stands for Joint Photographic Experts Group,

    • the name of the committee that created the standard.

  • Standardized format published in 1992

  • most widely-used format for storing digital photographs

  • Lossy compression algorithm

  • Reduces pixel blocks (typically 8X8) into a single representation.

Color is a light wave
Color is a light wave

The wavelengths of visible light range from about 380 to 700 nm (nanometers)—creating a continuous spectrum of rainbow color, from the violet end (380 nm) to the red end (700 nm).

Color is a light wave1
Color is a light wave

The retina of the human eye has two categories of light receptors: rods and cones.

Rods are active in dim light but have no color sensitivity.

Cones are active in bright light and have color sensitivity.

Color is a light wave2
Color is a light wave

There are three types of cones: one type is sensitive to red (ρ) wavelengths, one to green (γ), and one to blue (β). The curves represent the relative sensitivity of these three receptors for the normal human eye

What is color
What is color?

  • Color is how our eyes perceive different forms of energy.

  • Energy moves in the form of waves.

What is a wave
What is a wave?

  • Think of a fat guy (Dr. Breimer) doing a cannonball into a pool.

  • The incredible energy created by my fat ass hitting the water is transfer and dispersed into the pool in the form of a wave

Why does energy move in waves
Why does energy move in waves?

  • I don’t f***ing know. Are you 4-years old? you have to ask a million stupid questions?

  • Seriously, there is some complex physics behind the reason, but here is a simple way to explain it….

Why does energy move in waves1
Why does energy move in waves?

  • Q: How does a snake move without legs?

  • A: By going “swish swish”

  • Similarly, the “swish swish” of a wave allows energy to move even in a vacuum.

Why does energy need to move anyway
Why does energy need to move anyway?

  • To get a 40oz beverage from the liquor store

Where were we anyhow

Short wavelength

Long wavelength

Where were we anyhow?

  • Light is a form of energy that travels in a wave pattern.

  • The length of the wave can vary

The human eye
The Human Eye…

  • has Cones and Rods (like nerves) that can detect different wavelengths of light…

  • and send signals to the brain.

Visible energy
Visible Energy

  • We can only see a very limited range of wave lengths.

  • What would it be like if we could see microwaves?

What is your favorite color
What is your favorite color?

  • Can you guess mine?

    • Infared

  • My son’s favorite color is yellow, red, black, white, blue, purple, brown (poop color), khaki (light poop color), and orange.

    • This is his way of saying he hates pink

Tristimulus theory
Tristimulus Theory

  • Any color can be produced by mixing different amounts of three additive primaries


  • Create color by using a combination of red green and blue light (RGB)

How do tvs and computer monitors create color1
How do TVs and Computer Monitors create color?

  • The same way our eyes detect color.

  • By mixing the three wavelengths your eyes can detect.

Red yellow and blue not
Red, Yellow and Blue (NOT!)

  • In kindergarten, we all learned that the primary colors were:

  • Red, Yellow, and Blue, right?

  • Well, that was a lie.

  • Just, like in 1st grade when they told you there was a giant vacuum in space.

  • There is NO giant vacuum in space.

  • Microwaves are NOT invisible.

  • And, Yellow is NOT a primary color!


  • Yellow is ONLY considered primary when mixing paint or ink

  • Mixing paint is different than mixing light

  • More colors = darker color

  • Red + Green is toodark (brownish, notyellow)


  • Mixing light is different than mixing paint.

  • It is an additive and synergistic process

  • More color = lighter color

  • Red + Green = bright yellow.

  • Red + Green + Blue = white!

Back to tvs and monitors
Back to TVs and Monitors

  • The surface is black, no light equals black.

  • Each pixel is created from three separate light signals.

  • Two models:

    • RGB: Red, Green, Blue

    • CMYK:

      • Cyan

      • Magenta

      • Yellow

      • Key (level of intensity – bright to dark)

Pixel components
Pixel Components

  • If you put colors close enough together, the eye perceives them as one color.

Tvs and monitors
TVs and Monitors

  • Light signals can be generated in many different ways

  • The key is that you want the pixel to be very small and bright.

  • Three technologies:

    • CRT: Cathode Ray Tube

    • LCD: Liquid Crystal Display

    • Plasma

Crt cathode ray tube
CRT: Cathode Ray Tube

  • Glass tube containing an electron gun and a fluorescent screen

Lcd liquid crystal display
LCD: Liquid Crystal Display

  • Each pixel consists of a layer of molecules aligned between transparent electrodes, and polarizing filters

Plasma tv
Plasma TV

  • Cells between two panels of glass hold neon and xenon gas. Gas is electrically turned into a plasma which excites phosphors to emit light.

Rgb vs wavelength
RGB vs. Wavelength

  • Technologically, it is easier to control color by emitting three different colors RGB, rather than vary the wavelength to create a “pure” color.

  • Similar to Binary

    • Can encode any number in binary

    • Can encode any color with RGB combination

Rgb vs wavelength1
RGB vs. Wavelength

  • In fact, the cones and rods in the eyes detect only three colors.

  • We see more than three because the cones and rods send “mixed” or synergistic signals to the brain.

  • Humans have a hard time distinguishing RGB mixtures from “pure colors” because we sense color as RGB mixtures anyway.

Rgb is great but not perfect
RGB is great but not perfect

  • You can NOT reproduce all the visible color wavelengths using RGB combinations

  • But, you can get pretty close.

Rgb vs cmyk

  • RGB is NOT suitable for printing on paper.

  • Color printers can NOT produce Yellow (Red+Green) because ink does not have the same synergistic properties of light.

  • Thus, Yellow has to be a primary pigment.

  • The color wheel gets turned.

Rgb vs cmyk1

  • CMYK: Cyan, Magenta, Yellow, and K (Key) which is really black.

  • RGB is used almost exclusively for TVs/Monitors (where the surface is Black), you don’t need Key/Black

  • Because CMYK is also for print (where paper is typically white), you need Black (C+M+Y = purplish brown).

  • How do you get White with RGB?

Complementary colours


Complementary Colours

  • Subtract additive primary from white gives its complement

    • Equivalently, add other two additive primaries

      • C = G+B = W-R

      • M = R+B = W-G

      • Y = R+G = W-B

  • Cyan, magenta and yellow are subtractive primary colours (mixing ink/paint)

Digital image fundamentals

  • CMYK encoding is used for applications that focus on printing: Photo Developing software and publishing software like QuarkXpress, Framemaker, etc.

  • Applications that use RGB must convert to CMYK for printing

  • Some RGB colors (on the monitor) can be perfectly matched using CMYK.

Digital color
Digital Color

  • Operating Systems and applications encode color using bits.

  • Very early color systems only used 2 bits (4 colors).

  • Dr. B’s first computer (IBM 8086) supported only 4 colors CMYK.

  • As process speeds increased and graphics hardware improved

  • 8 bit color and 16 bit color became the standard (1988-1994)

Data color
Data  Color

  • Assume a four color encoding (2 bits)

  • Assume a monitor with 640 X 480 pixels

  • Monitor refreshes 60 times per second

    • (60 Hertz)

  • The operating system must send…

  • 640 X 480 X 2 X 60 bits per second.

  • = 36 million bit per second.

Data color hardware
Data  Color: Hardware

  • Monitor plugs into a video/graphics card.

  • The video card converts the bit pattern into an electrical signal.

  • Monitors and graphics cards work together because of international standards.

    • For example, VGA standard


  • The electrical signal triggers the pixel color.

  • CRT and LCD technology has a limit on

    • How small a pixel can be.

    • How bright it can be

    • How often it can be refreshed

      • 60-90 Hertz is the typical range

Data color software
Data  Color: Software

  • The graphics card actually plugs into the mother board of the computer.

  • The bit pattern travels across the motherboard.

  • A device driver is used so that the operating system can communicate with the graphics card.

  • A device driver is just small program…still written directly in assembly language.

Graphics cards
Graphics Cards

  • Old graphics card were just signal converters

  • New graphics cards have memory (RAM) and processors

    • Takes the burden off of the computer’s processor.

    • Enables 24-bit color at resolutions as high as 2560x1600.

    • Plus graphics card can also do things like render vectors (geometry computations).


Rgb color depth
RGB Color Depth

  • Choose number of bits for each of R, G and B

  • More bits per color means more total colors, but image files will be larger

  • 8 bits per color is not the standard: 24-bit color, 16.7 million colors




Rgb color depth1
RGB Color Depth

  • 8 bits (1 byte) per component means that you have 256 different “levels”

  • If R = G = B, color is a shade of gray.

  • Human eye can distinguish 256 shades of gray

  • So, while 16.7 million colors is beyond what the human eye can distinguish.

  • 24-bit RGB is under quantized for gray.

  • But for Gray only.

Practical technique color palettes
Practical Technique:Color Palettes

  • Choose 256 most important colors in an image to store in its palette

  • When 24-bit image is reduced to indexed color, some colors may be missing form the palette

    • Replace missing color by nearest, may lead to posterization

    • Dither – use pattern of dots and optical mixing

  • Web-safe palette – 216 colors guaranteed to reproduce accurately on all platforms and browsers

Digital image fundamentals



  • Alternative way of specifing colour

  • Hue (roughly, dominant wavelength)

  • Saturation (purity)

  • Value (brightness)

  • Model HSV as a cylinder: H angle, S distance from axis, V distance along axis

  • Basis of popular style of colour picker