Understanding Digital Imaging
Understanding Digital Imaging
Understanding Digital Imaging
Pixels
A pixel is a sampling of an image at a certain location. Therefore, pixels
do not have any true size or shape. Pixels are the smallest visible units
of a digital image on a displayable screen
The more pixels you have the sharper the image will be
The amount of pixels you have is known as the resolution of the
screen
On a monitor, they are tiny dots or rectangles of red, green, and blue
that are grouped together to create a color sample
Raster graphics are also resolution dependent, which means that at the
correct viewing percentage, they will look sharp and clear, but if you
zoom in, they will pixelate and lose their overall quality.
Monochrome/Bit-Map Images
Gray-scale Images
A 640 x 480 8-bit colour image requires 307.2 KB of storage (the same
as 8-bit greyscale)
Most 24-bit images are 32-bit images, the extra byte of data for each pixel is used to
store an alpha value representing special effect information
For the Audio Video Production Companies, file size (video quality) is determined by the
client and distribution method.
For Broadcast Companies, a smaller file size (lower video quality) is often preferred in
order to maximize storage capacity and bandwidth of their network.
Example:
a standard video application screen stage or canvas that is 720 x 480 pixels in size. The DPI is 72 and
the bit depth is 24 bits RGB (16.7 million colors).
This produces a file that is 345,600 total pixels in size and is 10 inches x 6.66 inches in print size. There
are 1,036,800 bytes, 1012.5 kilobytes (kb) and .9887 Megabytes (Mb) in the file. Some applications will
tell you all of this information, but others will not. You can calculate this by yourself so it is not a
mystery how the computer comes up with these numbers.
Total pixels is an easy math problem. It is simply the total pixels of any size area (length x width =
area).
L x W = Area
SD Video - 720 px x 480 px = 345,600 total pixels
HD Video – 1920px x 1080px = 2,073,600 total pixels (sometime called 2K resolution)
To convert pixels to inches you need to know that there are 72 pixels per inch. The
formula to convert pixels to inches is X/72=inches, where X is the number of pixels on a
side.
There are several formulas for the number of bytes of data each pixel holds, but the
average we will use here is 3, which is the norm for RGB color.
The formula for figuring out the number of bytes in an image is L x W x 3 = Bytes,
where the length and width are measured in pixels.
Back in the early computer days, when data cost so much to process and store and we
managed data in kilobytes, the standard was set to binary kilobytes. Memory chips and
file sizes are kilobytes (1024 bytes) or megabytes (1024x1024 bytes) or gigabytes
(1024x1024x1024 bytes). Yes, it really doesn’t matter to us today if we have some extra
kb’s in storage when we’re measuring our storage in gigs, but it still matters when you’re
saving tens of thousands of images to be used in a game, animation or video. Even today
we still need to keep our file sizes as small as possible.
Color models
There are two type of color model
Additive and Subtractive Color Model s
RGB Color Mode RGB stands for red, green, and blue.
In RGB mode, these colors are mixed in an additive manner to create the colors seen
on a monitor or television.
This color mode is based on the human perception of color. Humans see wavelengths
of light in the range of 400 to 700 nanometers (nm).
This range enables us to see from violet to red in a continuous rainbow. In our eyes,
receptors called cones are sensitive to red, green, and blue light.
CMYK Color Mode
CMYK stands for cyan, magenta, yellow, and black. In CMYK mode, these colors
are mixed in a subtractive form specifically for print.
This subtractive model is not a native format for a computer because the screens
are created in a additive color mode with light.
HSV Color Mode HSV stands for hue, saturation, and value.
This color mode is also known as HSB (hue, saturation, and brightness) and HSL
(hue, saturation, and lightness).
This color mode is actually a transformation of RGB mode, which means that it is
a color picker model to allow for easy color selection.
YUV Color Mode YUV color mode uses luma (Y) and two chrominance (UV)
components.
Luma is the brightness of the image and chrominance is the color.
This color mode is used to interface between analog and digital equipment like
digitizing old VHS tape. This format is used to compress data into the MPEG and
JPEG file formats.
Resolution, Device Aspect Ratio, and Pixel
Safe areas
Safe areas and title safe areas on a monitor or screen was created to
account for the bezel of old televisions and the shape of the old TV
screens
Bezel is the overlapping parts of a TV case that would occlude the
screen
The safe area is about 10% of the outer edge of the screen, title safe is
about 20% of the outer edge of the screen
Interlaced and progressive scanning
Progressive scanning draws a whole image, like a photograph, from top
to bottom until the image is completed.
This progressive vertical scanning occurs at a very high rate, and the
Persistence of Vision theory indicates that we will never perceive the
scanning on the monitor.
The speed at which this scanning happens is called the
refresh rate.
You may have witnessed a flickering on your computer
monitor that typically means the refresh rate of the monitor
needs to be adjusted for smooth movement.
Interlacing was created because old television sets could not hold an
image on the screen through the phosphors long enough before the
scan could complete, so the image would fade away before the next
cycle.
So the lines were broken into alternating even and odd lines, enabling
the television to draw the image faster.
These alternating lines are called fields. The actual images would be
captured in subframes at twice the usual display frame rate
For example 50herts will be seen as 100herts
Standard System Independent Formats
The following brief format descriptions are the most commonly used formats.
Limited to only 8-bit (256) colour images, suitable for images with few
distinctive colours (e.g., graphics drawing)
Supports interlacing
JPEG
Lossy compression which allows user to set the desired level of qual-
ity/compression
TIFF
Developed by the Aldus Corp. in the 1980’s and later supported by the
Microsoft
TIFF is a lossless format (when not utilizing the new JPEG tag which
allows for JPEG compression)
It does not provide any major advantages over JPEG and is not as user-
controllable it appears to be declining in popularity
Postscript/Encapsulated Postscript
PAINT was originally used in MacPaint program, initially only for 1-bit
monochrome images.
PICT format is used in MacDraw (a vector based drawing program) for
storing structured graphics
X-windows: XBM
Compression
Compression is the reduction or reordering of data in your file to make
that file smaller so it can be more easily distributed and viewed.
However, the way you compress images and video can
greatly change the quality and usability of those files.
The compression of video and image files has two basic parts:
compressing and decompressing.
The act of compressing and decompressing always comes as a duo,
and a codec is used to start and complete this process.
Codec, short for compression/decompression, is a program
that allows the ease of viewing or editing video or images.
The primary idea of compressing a file is to use only what information is
needed and to lose data that is not as important, to shrink the file size.
There are types of compression
Lossy compression allows for the loss of some data to shrink the final
file size.
Human observation of visual data is taken into account when the codec
is discarding data to give a good representation of the original image.
But the bottom line of lossy compression is that you are losing
image quality in exchange for a faster playback and smaller file
size
and after that information is lost, it cannot be brought back.
Lossless compression does not allow for a loss of quality. This type of
compression
typically does not create as small of a file size as a lossy compression,
but the final quality is the most important aspect of lossless
compression.
Video can use either spatial or temporal compression.
Spatial compression looks at each frame individually, picks out the
differences, and changes only the information that is different from
frame to frame.
Temporal compression, instead of looking at the differences of every
frame, chooses certain frames called keyframes in which to write all the
pixel information.
Then for all other frames between the keyframes, the codec writes only
the pixel information indicating differences from these keyframes.
The frames between the keyframes are called delta frames.
Digital cameras have come a long way in a short amount of time. These
capturing devices can now capture very high-definition images with the
aid of a lens at an incredible rat
Digital video cameras enable video to be recorded at various frame
rates.
Basics of Video
6.6.1 Types of Colour Video Signals
The following figures (Fig. 6.27 and 6.28) are from A.M. Tekalp, Digital
video processing, Prentice Hall PTR, 1995.
NTSC Video
525 scan lines per frame, 30 frames per second (or be exact, 29.97 fps,
33.37 msec/frame)
Aspect ratio 4:3
Colour representation:
PAL Video
625 scan lines per frame, 25 frames per second (40 msec/frame)
Colour representation:
Advantages:
4:2:0 –> Subsampled in both the horizontal and vertical axes by a factor
of 2 between pixels as shown in the Fig. 6.30.
4:1:1 and 4:2:0 are mostly used in JPEG and MPEG (see Chapter 4).
525/60 625/50
Luminance resolution 720 x 485 720 x 576 352 x 240 176 x 120
Fields/sec 60 50 30 30
CCIR 601 uses interlaced scan, so each field only has half as much
vertical resolution (e.g., 243 lines in NTSC). The CCIR 601
(NTSC) data rate is
˜
165 Mbps.
Video Format
Both NTSC rates and integer rates are supported (i.e., 60.00, 59.94,
30.00, 29.97, 24.00, and 23.98).