You are on page 1of 10

Image Processing – Compression

10/11/2021 Unrestricted Internal Use 1


Digital Image Compression
Another form of ‘image processing’ that is important in data storage is the
application of compression techniques to compress the image for storage.
Digital images are stored as computer files. Files are groupings of data that are
kept on digital storage media like CD, tape, etc. When the digital image is
stored directly as pixels, the file that holds the data is called a raw image file.
These files can be quite large and the storage of a large number of them can
be difficult and time consuming.
Some files use a compression scheme to reduce the amount of data that must be
stored, but one must be very careful in the selection of the technique used.
Compression schemes take advantage of the repetition in pixel characteristics, e.g.,
color, brightness, etc., that occurs in large collections of data or in the features
that make up the image.

10/11/2021 Unrestricted Internal Use 2


The Digital Image Compression
Compression can be shown using the picture below. We can store it as an image with a large
amount of data, or using the following two methods:
 we could just store the phrase “A large circle with horizontal lines
through it.” Or,
 we could make up very short codes to represent the pixel data since
the image uses only a few different pixel values. These shortened
codes could be stored along with a code key to allow us to
reconstruct the original pixel values when we want the image
restored.

In both cases, we could store a very small encoded image or description rather than the
original large one. With the latter approach, we could get back our original image with
no degradation or loss of original pixels. But not so for the first approach, where how
the reconstructed image would look would depend completely on the artistic and
drawing skill of the individual tasked with recreating “a large circle with horizontal lines
through it.”

10/11/2021 Unrestricted Internal Use 3


The Digital Image - Compression
The point of this discussion is that compression schemes may be lossy or lossless. The
lossy schemes give the best data reduction – but care must be taken - since some
image file formats may give excellent compression but the cost of the compression
will be paid in data loss.
There are many different mathematical methods used for image compression – some
are shown below:
 GIF (Graphic interchange format) - Lossless for grayscale images, can be lossy for
color images since color imagery is forced to an indexed color map.
 TIFF (Tagged interchange file format) - Compression scheme selectable; most
schemes used are lossless.
 JPEG (Joint photographic experts group) - Inherently lossy, JPEG removes
redundant data based on a model of human color perception. JPEG can be used
to store a lossless image, but the file size will be greater than that of a raw
image!
The DR uses jpeg compression since the browser is designed to display these images.
The actual preview image displayed on the console is a jpeg rendition of the .ss4
raw image data.
Thumbnail images are also created for various display windows within the browser GUI
pages.

10/11/2021 Unrestricted Internal Use 4


Numerical Size of a Digital Image

The numerical size (number of bits) of


an image is the product of two
factors:
The number of pixels which is found
by multiplying the pixel length and
width of the image.
The bit depth (bits per pixel).  This is
usually in the range of 8-16 bits, or 1-2
bytes, per pixel.
The significance of numerical size is
that the larger the image
(numerically), the more memory and
disk storage space is required, and
more time for processing and
distribution of images is required.

10/11/2021 Unrestricted Internal Use 5


Image Compression

Image compression is the process of


reducing the numerical size of digital
images.
There are many different
mathematical methods used for image
compression.
The level of compression is the factor
by which the numerical size is
reduced.  It depends on the
compression method and the selected
level of compression.
Lossless compression is when there is
no loss of image quality, and is
commonly used in many medical
applications.
Lossee compression results in some
loss of image quality and must be
used with care for diagnostic images.

10/11/2021 Unrestricted Internal Use 6


JPEG Image Compression

• JPEG Image Compression


JPEG is a lossy compression method. In other words, to save space it just
throws away parts of an image.
The JPEG algorithm divides the image into squares (you can see these
squares on badly-compressed JPEGs).
Then it uses a piece of mathematics called Discrete Cosine
Transformation to turn the square of data into a set of curves, some
small, some big, that go together to make up the image - the lossy bit
defines how much you want to compress the image the algorithm
throws away the less significant part of the data (the smaller curves)
which adds less to the overall "shape" of the image.
The lossy compression method can generate artifacts - unwanted effects
such as false color and blockiness - if not used carefully.
JPEG Image Compression
This is a high quality JPEG of a duck which takes up
43k of disk space.

The same picture, this time compressed to medium


quality. There are virtually no visible artifacts of the JPEG
compression process, and yet the image takes up only 13k.

This is the same image compressed to the lowest quality setting,


and then blown up four times. Note the tell-tale squares. There
are times when this level of quality is acceptable. The image is
only 3.5k at this level of compression.

10/11/2021 Unrestricted Internal Use 8


JPEG Image Compression

A standard bitmap image(.bmp) of a


chest is shown at left.
The same image appears with a high
quality jpg compression.
The images appear essentially
identical.

Chest Radiograph – Chest Radiograph –


(.bmp) image (.jpg) image

10/11/2021 Unrestricted Internal Use 9


Image Compression

There appears to be little


difference between the two,
but when zoomed in, the
compressed data radiograph
displays pixilation (jagged
edges) and more blurring of
detail than the bitmapped
file format.
The well defined area in the
circle is barely visible in the
compressed image.

10/11/2021 Unrestricted Internal Use 10

You might also like