Você está na página 1de 125

Palestine Polytechnic University

College of Engineering & Technology


Civil and Architectural Engineering Department
Surveying & Geomatics Engineering

Digital PhOTOGRAMMETRY
&
Image processing
Lecture Notes
Lecturer:

Dr. Ghadi Zakarneh


Hebron-Palestine
2014

Contents
Chapter

Name

0
Review to analytical photogrammetry
One

Introduction

Two
Digital images
Three

Digital image acquisition

Four
Image Compression
Five
Digital image enhancement
Six
digital photogrammetric workstation
Seven
Photogrammetric DTM & DSM
Eight
Image Resampling
Nine
Orthophotos production

Course Syllabus
Palestine Polytechnic University
Engineering
Civil and Architectural Engineering Department
Surveying And Geomatics

COURSE: digital photogrammetry and image processing , 3 credit hours, CE531, 2nd

semester 2013/2014

PREREQUISITES (and/or COREQUISITES): photogrammetry2


INSTRUCTOR:

Dr.Eng. Ghadi Zakarneh


office: Wad Al-haria B+307
email: Ghadi@gmx.net
web: www.ghadi.de.tf

TEXT BOOK: Lecture Notes : digital photogrammetry and image processing (2014)
REFERENCES: Digital photogrammetry, 2nd edition, Michel Kasser and Yves Egels
, elements of photogrammetry 3rd edition.

ADDITIONAL MATERIALS or EQUIPMENT NEEDED FOR THE


COURSE: calculators , photogrammetric workstations , scanners , 3D vision tools.
COURSE DESCRIPTION:

Introduction to image processing Imaging geometry Image enhancement Image


compression Image segmentation Recognition and interpretation Scanners Digital
workstations features and requirements advantages and capabilities.

INTENDED LEARNING OUTCOMES:

[What are the Intended learning outcomes of this course?


The student should be able to build 3D stereomodel using digital aerial
photograph.
The student should able to produce digital maps using digital aerial
photographs.
The student should be able to build orthomaps.
The student should be able to build DSM and DEM using digital aerial
photos

Course Outline and Calendar:

[Content and activities of class meetings - by weeks or by hours]


Topics

Weeks (or hours)


1 week
1 week
1 week
1 week
1 week
4 weeks
1 hour
2 weeks
2 weeks
1 weeks

Review
Introduction
Digital images
Digital image acquisition
Image Compression
Digital image enhancement
digital photogrammetric workstation
Photogrammetric DTM & DSM
Image Resampling
Orthophotos production

COURSE POLICIES:

The University's and instructor's policy regarding the course:


Class attendance is important and mandatory.
unexcused absence is dealt through the grading
reporting illnesses is wanted
turning in late work is not accepted
missing home works ,tests or exams: needs formal proof for reasons

TEACHING METHODS:

Lectures
Assignments ,problem solving sessions
discussions
Lab work

ASSESSMENT MEASURES AND GRADING SYSTEM:


Written exams
Assignments , quizzes, reports
Project work
Grading system:

first exam
Second exam
Final
Assignments
Class attendance
Project

15%
15%
30%
5%
5%
30%

Digital Photogrammetry

Ch.0

Dr. Ghadi Zakarneh

Ch0
Review to Analytical
Photogrammetry

Digital Photogrammetry

Ch.0

Dr. Ghadi Zakarneh

Review TO Analytical Photogrammetry

1- Introduction

1. Analytical photogrammetry is a term used to describe the rigorous mathematical


calculation of coordinates of points in object space based upon camera
parameters, measured photo coordinates and ground control.
2. Unlike the elementary methods presented in earlier chapters, this process
rigorously accounts for any tilts that exist in the photos. Analytical
photogrammetry generally involves the solution of large, complex systems of
redundant equations by the method of least squares.
3. Analytical photogrammetry forms the basis of many modem hardware and
software systems, including: stereoplotters (analytical and softcopy), digital
terrain model generation, orthophoto production, digital photo rectification, and
aerotriangulation.
4. This chapter presents an introduction to some fundamental topics and elementary
applications in analytical photogrammetry.
5. The coverage here is limited to computations involving single photos and
stereopairs

2- Image Measurements
1. A fundamental type of measurement used in analytical photogrammetry is an x
and y photo coordinate pair.
2. Since mathematical relationships in analytical photogrammetry are based on
assumptions such as "light rays travel in straight lines" and "the focal plane of a
frame camera is flat," various coordinate refinements may be required to correct
measured photo coordinates for distortion effects that otherwise cause these
assumptions to be violated.
3. A number of instruments and techniques are available for making photo
coordinate measurements.

3- Control Points
Object space coordinates of ground control points, which may be either imageidentifiable features, are generally determined via some type of field survey technique
such as GPS.
It is important that the object space coordinates be based on a three-dimensional
Cartesian system which has straight, mutually perpendicular axes.

Digital Photogrammetry

Ch.0

Dr. Ghadi Zakarneh

4- Collinearity Condition
Perhaps the most fundamental and useful relationship in analytical photogrammetry is
the collinearity condition. Collinearity is the condition that the exposure station, any
object point, and its photo image all lie along a straight line in three-dimensional space.

xa x0 f

m11( X A X L ) m12 (YA YL ) m13 ( Z A Z L )


m31( X A X L ) m32 (YA YL ) m33 (Z A Z L )

ya y0 f

m21( X A X L ) m22 (YA YL ) m23 ( Z A Z L )


m31( X A X L ) m32 (YA YL ) m33 ( Z A Z L )

5- Coplanarity Condition
Coplanarity is the condition that the two exposure stations of a stereopair, any object
point, and its corresponding image points on the two photos all lie in a common plane. In
the figure below, points L1, L2, a1, a2 and A all lie in the same plane.
Epipolar plane: any plane containing the two exposure stations and an object point, in
this instance plane L1AL2

Digital Photogrammetry

Ch.0

Dr. Ghadi Zakarneh

Epopolar line: the intersection of the epipolar plane with the left and right photoplanes.
Given the left photo location of image a1, its corresponding point a2 on the right photo is
known to lie along the right epipolar line. The coplanarity condition equation is:

6- Space Resection By Collinearity

Space resection is a method of determining the six elements of exterior


orientation (, , , XL, YL, and ZL) of a photograph.

This method requires a minimum of three control points, with known


XYZ object space coordinates, to be imaged in the photograph.

For the photograph, we have 6 unknowns, and each control point has 2-observations
(x,y), so 3 control points give us exact solution, 4 control points or more we can apply
least squares solution.

Digital Photogrammetry

Ch.0

Dr. Ghadi Zakarneh

7- Space Intersection By Collinearity


If space resection is used to determine the elements of exterior orientation for both photos
of a stereopair, then object point coordinates for points that lie in the stereo overlap area
can be calculated.

The procedure is known as space intersection, so called because corresponding rays to


the same object point from the two photos must intersect at the point. So common point
with unknown ground coordinates (pass points) can be used in addition to the ground
control points that are still required for scaling and rotation of the model.
Each control point has 2-observations (x,y) in each photograph, this means in two
photographs we have 4-observations for each control or pass point. For each
photograph we have 6 unknowns, this means we have 12 unknowns for both
photographs, in addition for each pass point we have 3unknowns (X,Y,Z).

Digital Photogrammetry

Ch.0

Dr. Ghadi Zakarneh

8- Analytical Stereomodel
1. Aerial photographs for most applications are taken so that adjacent photos overlap
by more than 55 percent. Two adjacent photographs that overlap in this manner
form a stereopair; and object points that appear in the overlap area constitute a
stereomodel.
2. The mathematical calculation of three-dimensional ground coordinates of points
in the stereomodel by analytical photogrammetric techniques forms an analytical
stereomodel

The process of forming an analytical stereomodel involves three primary steps:


1. Interior orientation,
2. Relative orientation, and
3. Absolute orientation.
After these three steps are achieved, points in the analytical stereomodel will have object
coordinates in the ground coordinate system.

Digital Photogrammetry

Ch.0

Dr. Ghadi Zakarneh

9- Analytical Interior Orientation


Interior orientation for analytical photogrammetry is the step which mathematically
recreates the geometry that existed in the camera when a particular photograph was
exposed.
This requires camera calibration information as well as quantification of the effects of
atmospheric refraction. These procedures, commonly called photo coordinate
refinement.
The process are
1. With coordinates of fiducials and image points which have been measured by a
comparator or related device.
2. A 2D coordinate transformation is used to relate the comparator coordinates to the
fiducial coordinate system as well as to correct for film distortion.
3. The lens distortion and principal-point information from camera calibration are
then used to refine the coordinates so that they are correctly related to the
principal point and free from lens distortion.
4. Atmospheric refraction corrections can be applied to the photo coordinates to
complete the refinement,
5. Finish the interior orientation.
The observation equations for this mathematical model are:

ax by c X Vx
dx ey f Y V y

where,
x and y are the machine coordinates.
X and Y are the fiducial coordinates.

VX and VY are the residuals in the observed values.


a through f are the transformation parameters.

Digital Photogrammetry

Ch.0

Dr. Ghadi Zakarneh

10- Analytical Relative Orientation


Analytical relative orientation is the process of determining the relative angular attitude
and positional displacement between the photographs that existed when the photos were
taken. This involves defining certain elements of exterior orientation and calculating the
remaining ones. The resulting exterior orientation parameters will not be the actual values
that existed when the photographs were exposed; however, they will be correct in a
"relative sense" between the photos.
1. In analytical relative orientation, it is common practice to fix the exterior
orientation elements , , , XL, and YL of the left photo of the stereopair to zero
values.
2. Also for convenience, ZL of the left photo (ZL1) is set equal f of, and XL of the
right photo (XL2) is set equal to the photo base b.
3. This leaves five elements of the right photo that must be determined

Using collinearity equations and, with the input data of the coordinates of image
point in each photo, each point gives two equations in the left photo and two equations in
8

Digital Photogrammetry

Ch.0

Dr. Ghadi Zakarneh

the right photo. Each point has three unknown model coordinates X, Y, and Z, in addition
to the five relative orientation unknown parameters ( 2 , 2 , k2, YL2, and ZL2). To solve
this system of equations the least number of pass points needed is n. The n is calculated
as follows:
4n=3n+5
Then
n=5

(minimum number of pass points)

11- Calculating model coordinates


After the solution of relative orientation parameters for the stereopair, the model
coordinates of any point can be calculated by using the collinearity equations. Since the
collinearity equations are non-linear equations, they have to be linearized to their model
coordinates, as described below:

m ( X X L ) m12 (YA YL ) m13 ( Z A Z L )


xa f 11 A

m31 ( X A X L ) m32 (YA YL ) m33 ( Z A Z L )

m ( X X L ) m22 (YA YL ) m23 ( Z A Z L )


y a f 21 A

m31 ( X A X L ) m32 (YA YL ) m33 ( Z A Z L )


The above Equations are rearranged in following form:
F xa Vxa f

r
q

G ya Vya f

s
q

Where,

q m31 ( X A X L ) m32 (YA YL ) m33 (Z A Z L )


r m11 ( X A X L ) m12 (YA YL ) m13 (Z A Z L )
s m21 ( X A X L ) m22 (YA YL ) m23 (Z A Z L )
Those equations can be solved for X, Y, and Z using least squares solution, since
there are four equations for x and y for any point in the two photos.

Digital Photogrammetry

Ch.0

Dr. Ghadi Zakarneh

12- Analytical Absolute Orientation


1. For a stereomodel computed from one stereopair, analytical absolute orientation
can be performed using a 3D conformal coordinate transformation.
2. This requires at least two horizontal and three vertical control points, but
additional control points provide redundancy, which enables a least squares
solution.
3. In the process of absolute orientation, stereomodel coordinates of control points
are related to their 3D coordinates in a ground based system. It is important for
the ground system to be a true Cartesian coordinate system, such as local vertical,
since the 3D conformal coordinate transformation is based on straight, orthogonal
axes.
In the three dimensional conformal coordinates transformation there are three
rotations , , and k about the three axes x, y, and z respectively(This is shown in the
figure below). Also, there are three translations Tx, Ty, and Tz, and a scale factor, thus
giving seven parameters. The transformation equations are developed as the follows:

Omega

Phi

Kappa

X P s(m11 x p m21 y p m31 z p ) Tx

YP s(m12 x p m22 y p m32 z p ) Ty


Z P s(m13 x p m23 y p m33 z p ) Tz

10

Digital Photogrammetry

Ch.0

Dr. Ghadi Zakarneh

13- Aerotriangulation
Aerotriangulation is the term most frequently applied to the process of determining the
X, Y, and Z ground coordinates of individual points based on photo coordinate
measurements.
The photogrammetric procedures discussed so far were restricted to one stereo model. It
is quite unlikely that a photogrammetric project is covered by only two photographs,
however. Most mapping projects require many models; large projects may involve as
many as one thousand photographs, medium sized projects hundreds of photographs.
Advantages of Aerotriangulation
1. Minimizing the field surveying by minimizing the number of required control
points.
2. Most of work is done in laboratory.
3. Access to the property of project area is not required.
4. Field survey in steep and high slope areas is minimized.
5. Accuracy of the field surveyed control points can easily be verified by
aerotriangulation.
Classifications of Aerotriangulation processes
1. Analog: involved manual interior, relative, and absolute orientation of the
successive models of long strips of photos using stereoscopic plotting instruments
having several projectors.
2. Semianalytical aerotriangulation: involves manual interior and relative orientation
of stereomodels within a stereoplotter, followed by measurement of model
coordinates. Absolute orientation is performed numerically hence the term
semianalytical aerotriangulation.
3. Analytical methods :consist of photo coordinate measurement followed by
numerical interior, relative, and absolute orientation from which ground
coordinates are computed.

11

Digital Photogrammetry

Ch.0

Dr. Ghadi Zakarneh

14- Analytical Aerotriangulation


analytical aerotriangulation consist of the following basic steps:
(1) Relative orientation of each stereomodel.
(2) Connection of adjacent models to form continuous strips and/or blocks.
(3) Simultaneous adjustment of the photos from the strips and/or blocks to fieldsurveyed ground control.
Advantages of Aerotriangulation:
Analytical aerotriangulation tends to be more accurate than analog or
semianalytical methods, largely because analytical techniques can more
effectively eliminate systematic errors such as film shrinkage, atmospheric
refraction distortions, and camera lens distortions.
X and Ycoordinates of pass points can be located to an accuracy of within
about 1 / 15,000 of the flying height, and Z coordinates can be located to
an accuracy of about 1/10,000 of the flying height.
planmetric accuracy of 1/350,000 of the flying height and vertical
accuracy of 1 / 180,000 have been achieved.
Freedom from the mechanical or optical limitations imposed by
stereoplotters.
12

Digital Photogrammetry

Ch.0

Dr. Ghadi Zakarneh

15- Simultaneous Bundle Adjustment


Bundle adjustment is The process to adjust all photogranimetric measurements to ground
control values in a single solution.
The process is so named because of the many light rays that pass through each lens
position constituting a bundle of rays. As shown in the figure below.

The solution depends basically on the collinearity condition, where the collinearity
equations are:

The solution of the above equations give the exterior orientation parameters of all images
included in the adjustment (omega, phi, kappa, XL,YL,ZL).
For the adjustment we have:
- 2 observations(x,y) for any control or tie point in a photo.
- 6 unknowns for each photo (omega, phi, kappa, XL, YL, ZL).
- 3 unknowns for each tie point; ground coordinates(X, Y, and Z).

13

Digital Photogrammetry

Ch.0

Dr. Ghadi Zakarneh

Example:
For the bundle adjustment of the following for images, what is the number of unknowns,
observations, and how will the design matrix A appear?

Number of observations:
4 x 6 x 2 = 48 observations (collinearity equations).
Number of unknowns:
4 x 6 + 3 x 4 = 36 unknowns

14

Digital Photogrammetry

Ch.0

Dr. Ghadi Zakarneh

Example:
For the following model what is the number of unknowns, observations, and how will the
design matrix A appear?

15

Digital Photogrammetry

Ch.1

Dr. Ghadi Zakarneh

Ch01
Introduction

16

Digital Photogrammetry

Ch.1

Dr. Ghadi Zakarneh

Digital photogrammetry
1- Introduction
Basic types according to the distance between the object and the camera;
-the Aerial photogrammetry taken by aircrafts,
- and terrestrial photogrammetry using ground fixed cameras.
the classification of photogrammetry according to the processing methods;
first analog photogrammetry was only available using analog
measurements and analog workstations,
with computer advances the analytical photogrammetry using
analytical workstations by measurements on the printed images
and calculations of the points coordinates,
recently with high quality computers the complete
photogrammetric process are applied by computer using digital
images as input and output in as computer files(DTM , DSM ,
orthophotos ).see fig(1).

Fig (1)

Topics in photogrammetry

Analog Photogrammetry
Analog photogrammetric theory
Analog inner orientation
Analog relative orientation
Analog absolute orientation
Analog aerial triangluation
Analog photogrammetric instrument
Analog rectifier
Metric camera

17

Digital Photogrammetry

Ch.1

Dr. Ghadi Zakarneh

Imaging system

Analytic Photogrammetry
Analytical photogrammetric theory
Analytical inner orientation
Analytical relative orientation
Analytical absolute orientation
Analytical aerial triangulation
Multi-sensor, multi-platform integration technology and theory
Analytical plotter
Analytical orthophoto generation
Metric camera
Imaging system
Nonmetric camera
Digital Photogrammetry
Digital image processing
Digital image interpretation
Image matching
Full-automatic inner orientation
Full-automatic relative orientation
Full (semi)-automatic absolute orientation
Full-automatic aerial triangulation
3D measurement and viewing system
Visualization of scene
Multi-sensor, multi-platform integration technology and theory
Geometric rectification with various sensor and imaging system

18

Digital Photogrammetry

Ch.2

Dr. Ghadi Zakarneh

Ch02
Digital Images

19

Digital Photogrammetry

Ch.2

Dr. Ghadi Zakarneh

Digital images
1-Inroduction
An image is a bidimensional function of light intensity, f(x,y), where x and y are
the spatial coordinates and f at a point is proportional to the luminance or grey level at
that point.
digital image is a representation of a two-dimensional image as a finite set of
digital values, called picture elements or pixels.Typically, the pixels are stored in
computer memory as a raster image or raster map, a two-dimensional array of small
integers. These values are often transmitted or stored in a compressed form(GEPG,
TIFF..).
Digital images can be created by a variety of input devices and techniques, such as digital
cameras, scanners, coordinate-measuring machines, seismographic profiling, airborne
radar, and more.

20

Digital Photogrammetry

Ch.2

Dr. Ghadi Zakarneh

2- Types of images:
2-1 Binary Images:
In a binary image, each pixel assumes one of only two discrete values: 1 or 0. A binary
image is a digital image that has only two possible values for each pixel. Binary images
are also called bi-level or two-level. (The names black-and-white, B&W)
Binary images often arise in digital image processing as masks or as the result of certain
operations such as segmentation, thresholding , and dithering. Some input/output devices,
such as laser printers, fax machines, and bilevel computer displays, can only handle
bilevel images.
A binary image is usually stored in memory as a bitmap, a packed array of bits.

2-2 Grayscale Images


greyscale digital image is an image in which the value of each pixel is a single sample.
Displayed images of this sort are typically composed of shades of gray, varying from
black at the weakest intensity to white at the strongest.
Grayscale images intended for visual display are typically stored with 8 bits per sampled
pixel, which allows 256 intensities (i.e., shades of gray) to be recorded.

21

Digital Photogrammetry

Ch.2

Dr. Ghadi Zakarneh

2-3 True color Images


A true color image is an image in which each pixel is specified by three values one
each for the red, blue, and green components of the pixel's color. True color images are
stored as an m-by-n-by-3 data array that defines red, green, and blue color components
for each individual pixel.
Graphics file formats store true color images as 24-bit images, where the red, green, and
blue components are 8 bits each.

3- Colors
The visible spectrum is divided into three sub domains that define the colors using a
constant radiation level:

0.4-0.5 microns: blue.


0.5-0.6 microns: green.
0.6-0.7 microns: red.

Other definition of the basic colors according to the radiation level, so called the
complementary colors:

0.4-0.6 microns: cyan.


0.4-0.5 and 0.6-0.7 microns: magenta.
0.5-0.7 microns : yellow.

22

Digital Photogrammetry

Ch.2

Dr. Ghadi Zakarneh

3-1 Colors modeling


3-1-1 RGB
The RGB color model is an additive model in which red, green and blue (often used in
additive light models) are combined in various ways to reproduce other colors. The name
of the model and the abbreviation "RGB" come from the three primary colors, Red,
Green and Blue. These three colors should not be confused with the primary pigments of
red, blue and yellow, known in the art world as "primary colors".

Color science talks about colors in the range 0.0 (minimum) to 1.0 (maximum).
Most color formulae take these values. For instance, full intensity red is 1.0, 0.0,
0.0.

The color values may be written as percentages, from 0% (minimum) to 100%


(maximum). To convert from the range 0.0 to 1.0, see percentage. Full intensity
red is 100%, 0%, 0%.

The color values may be written as numbers in the range 0 to 255, simply by
multiplying the range 0.0 to 1.0 by 255. This is commonly found in computer
science, where programmers have found it convenient to store each color value in
one 8-bit byte. This convention has become so widespread that many writers now
consider the range 0 to 255 authoritative and do not give a context for their
values. Full intensity red is 255,0,0.

23

Digital Photogrammetry

Ch.2

Dr. Ghadi Zakarneh

When written, RGB values in 24 bpp, also known as Truecolor, are commonly specified
using three integers between 0 and 255, each representing red, green and blue intensities,
in that order. For example:

yellow
(255,255,0)

(0, 0, 0) is black
(255, 255, 255)
is white
(255, 0, 0) is red
(0, 255, 0) is
green
(0, 0, 255) is
red
blue
(255,0,0)
(255, 255, 0) is
yellow
(0, 255, 255) is
cyan
(255, 0, 255) is
magenta

green
(0,255,0)

cyan
(0,255,255)

blue
(0,0,255)

red
(255,0,0)

magenta
(255,0,255)

3-1-2 HSV
The HSV (Hue, Saturation, Value) model, also known as HSB (Hue, Saturation,
Brightness), defines a color space in terms of three constituent components:

Hue, the color type (such as red, blue, or yellow):


o Ranges from 0-360 (but normalized to 0-100% in some applications)
Saturation, the "vibrancy" of the color:
o Ranges from 0-100%
o Also sometimes called the "purity" by analogy to the colorimetric
quantities excitation purity and colorimetric purity
o The lower the saturation of a color, the more "grayness" is present and the
more faded the color will appear, thus useful to define desaturation as the
qualitative inverse of saturation
Value, the brightness of the color:
o Ranges from 0-100%

24

Digital Photogrammetry

Ch.2

Dr. Ghadi Zakarneh

3-2 Transformation between HSV and RGB

An illustration of the relationship between HSV and RGB color spaces.

From RGB to HSV:

25

Digital Photogrammetry

Ch.2

Dr. Ghadi Zakarneh

Let MAX equal the maximum of the (R, G, B) values, and MIN equal the minimum of
those values.

From HSV to RGB:


Hi =
f=
p=
q=
t=
R = V,
R = q,
R = p,
R = p,
R = t,

G = t, B = p
G = V, B = p
G = V, B = t
G = q, B = V
G = p, B = V

R = V,

G = p, B = q

In computer graphics, it is typical to represent each channel as an integer from 0 to 255


instead of a real number from 0 to 1. It is worth noting that when encoded in this way,
every possible HSV color has an RGB equivalent. However, the inverse is not true.
Certain RGB colors have no integer HSV representation. In fact, only 1/256th of the
RGB colors are 'available' in HSV, effectively eliminating a single channel of control
from the graphics artist.

26

Digital Photogrammetry

Ch.2

Dr. Ghadi Zakarneh

4-Radiometric and Spatial Resolution

Radiometric Resolution
The radiometric resolution defines how many different colors/gray values are available in
order to represent an image. The higher the radiometric resolution the more details are
visible, but the more storage space will be needed.

high radiometric resolution

low radiometric resolution

The lowest radiometric resolution we know is a "Black - White" image. A pixels status
can be either 0 (black) or 1 (white).
The image resolution is usually expressed in BIT's.

1 Bit

->

black and white

Storage space 1000x1000 pixel = 122 kByte

6 Bit

->

gray scale 26 (64)

Storage space 1000x1000 pixel = 732 kByte

8 Bit

->

gray scale 28 (256) Storage space 1000x1000 pixel = 977 kByte

etc.

If we consider a RGB image with 8 Bit each channel (24 Bit image) we need a storage
space of nearly 3 MB!

27

Digital Photogrammetry

Ch.2

Dr. Ghadi Zakarneh

Spatial Resolution
The details visible in an image are directly dependent on the spatial resolution. The
higher the resolution the more information is visible. Most of the pixels in a coarse
resolution image contain more than one material or feature; they are "Mixed Pixels". 'A
"mixed pixel" results from the fact that individual areas, consisting of different features
or classes may be below (smaller than) the resolution of the sensor.' . The phenomenon of
Mixed Pixels, which is a common problem of all digital images

Example of "Mixed Pixels"

28

Digital Photogrammetry

Ch.2

Dr. Ghadi Zakarneh

5- Problems with Digital Images


Image Noise, Each imaging process is a physical process. It is dependent on the
intensity and the spectral combination of the electromagnetic radiance Under ideal
conditions it can be expected, that the incoming radiation will be recorded correctly by
the sensor element. However, technique and nature seldom follow ideal cases; therefore
undesired effects are shown in each image. These effects are known as image noise.
Image noise is caused by the sensor system itself. The behavior can be easily explained
on an example of a pure black sheet of paper. By taking a panchromatic digital photo of a
black sheet, it is expected, that the resulting image shows only one measured value (0),
but due to the physical effects during exposure it will not. The examination of the image
will show pixel values, slightly above the expected value (0) as well as very bright points.
'Noise in imaging systems is unavoidable'
5-1 Dark Noise
A CCD, acquiring pixel values without exposure, causes dark noise. Even if no light
reaches the cell, the single cells of a chip send very small amounts of charges. This
charge will be interpreted as light and therefore will be shown as bright points.
In the bright areas of the image, this effect is nearly not discernible, but in dark areas it is.
Dark Noise is highly dependent on the temperature of the imaging system.

Dark noise example

29

Digital Photogrammetry

Ch.2

Dr. Ghadi Zakarneh

5-2 Fixed Pattern Noise


Fixed Pattern Noise is caused by individual pixels having a different response to the same
input.
5-3 Amplifier Noise
Amplifier Noise is caused if the readout of the CCD is amplified, the amplifier itself will
cause an additional noise effect.
5-4 Speckle Noise
Speckle Noise is visible in all Coherent Imaging Systems; these are systems generating
their own source of light like Synthetic Aperture Radar, Laser Imaging Systems, Imaging
Sonar Systems and Medical Ultrasound Systems. Speckle is randomly distributed over
the image and looks like a pattern of salt and pepper. Speckle is "surface dependent"
which means that a rough surface compared to the wavelength of illumination will cause
Speckle Noise and it is associated with the finite power of sensors.

30

Digital Photogrammetry

Ch.3

Dr. Ghadi Zakarneh

Ch03
Digital Image
Acquisition

31

Digital Photogrammetry

Ch.3

Dr. Ghadi Zakarneh

Digital image acquisition


1- Introduction
Currently the most process in photogrammetry trend to the use of the digital images.
First it was proposed to digitize the images acquired by aerial photogrammetry in the
tradition films, this was time consuming and costly not effective, so it was a temporary
solution.
1980s at DLR in Germany and then in France started the explorations to get digital
images direct by the airplane, so the studies moved to the CCD cameras (charged
coupled devices).
three kind of CCD cameras; first is the optical mechanical system that takes the image
two dimensional directions, second the linear CCD cameras(Push-Broom Systems )that
scan in one direction of the image, and third is the matrix CCD camera (Digital Frame
Systems)that take the image at one moment.

Fig(1): the three types of CCD cameras.


2- Types of digital photogrammetric cameras:
2-1 optical mechanical system:
the Optical - mechanical systems are structured basically by a rotating mirror and
a detector , while the aircraft moves the mirror reflects the image (electromagnetic
radiation) to the sensor (detector), the mirror rotates perpendicular to flight directions
complete a single line , while the second dimension of the image is achieved by the
movement of the aircraft.

32

Digital Photogrammetry

Ch.3

Dr. Ghadi Zakarneh

2-2 CCD sensors in line


The principle is:
A linear CCDs set in installed in a high quality optics.
Thousands of CCDs per line (ADS 40: 12000- 24000 CCDs).
CCDs can be fixed to get images to the vertical of the plane or in a fixed angle
to the front or back of the plane, so a point is imaged by different angles to
achieve stereoscopic vision.

I C:CO a. (1 pllll wtJI)

1~\
I \~~

+
r.xtir o'i ~w

forw:.rd 'JiF!W

b~hrt~rd Vl ("\'1

Different angels linear CCD Camera

Some instruments produce panchromatic images or true colored images (RGB


images), or multibband images for remote sensing applications. Where in the
panchromatic images it is easy to interpolate the image for sub pixel

33

Digital Photogrammetry

Ch.3

Dr. Ghadi Zakarneh

resolution (e.g. in ADS 40: interpolation from 12000 pixels/line to 24000


pixels/line).

Image bands in the linear CCD camers

Linear CCD cameras have a good geometric quality images with minor
distortions.
Because the trajectory of the plane is mostly uncertain it is important to have a
high precision real position of the sensors ( this problem is neglected in the
satellite images). To solve the problem an inertial navigation system is
attached (accelerometers to measure the accelerations of the plane, and
gyroscopes to measure the rotation angles) in addition to precise GPS
receivers. Otherwise the sensed data are unusable. So called Kalman filter
algorithm is applied to get the final image pixels.
The residual errors in the Linear CCD cameras are 0.1pixels as in the matrix
CCD cameras.

2-3 Matrix CCD cameras


They depend in the principle of traditional conical image geometry. The matrix
CCD cameras have the following properties:
The effect of the plane forward movement is eliminated due compared to
the traditional photogrammetric cameras, while no mechanical movement
influence the resulting image, but electronic processing is applied. This
allows to longer exposure duration, good results can be achieved in weak
lighting, and good signal/noise ratio can be achieved.
The CCD matrix cameras are sensitive in addition to long duration
exposure, it is difficult to achieve the dynamics can reach considerable
value. Normally they can achieve 6bit images, and 12bit images are hardly

34

Digital Photogrammetry

Ch.3

Dr. Ghadi Zakarneh

sufficient. This causes problems in atmospheric processing, shades, image


matching problems due to differences in radiometry.
In the year 2000 the largest image size was 7000x9000, so it is used in the
middle scale applications. A digitized traditional image is equivalent to a
digital image with half pixel size (8000x8000 digitized image =
4000x4000 digital image) but it has better radiometry in matrix CCD
cameras images.
Some matrix CCD cameras have various subsets of matrix CCDs, with
optics directed to divergent axes, in addition to different color filters. This
would give an accuracy equivalent to 0.1pixel.

DMC camera with 4 subsets of matrix CCDs.

Matrix CCD cameras have two ways for color restitution :


-on a matrix a set of filters are provided.
-Each matrix is equipped separately with it filter(s)
Geometrically the matrix CCD cameras are excellent, while the have the
same capture geometry of the traditional cameras, but the reason of
distortions daring the film processing, printing, film movement , and dust
on the film etc. are neglected. The cameras still need calibration as the
traditional cameras.

35

Digital Photogrammetry

Ch.3

Dr. Ghadi Zakarneh

3- Differences between digital and traditional cameras:

The flight height and the size of pixel are independent.


The maximum angle of field is selected according to the size of area needs
to be covered, using B/H (base height ratio).
Size of pixel is selected according to ground object size need to be
recognized. Where generally point precision is 0.3 pixel or less , and an
object need to have at least 3x3pixels size to be recognized.
The effects of the atmospheric and metrological conditions can easily be
eliminated by using digital cameras.

4- Photogrammetric scanners
Scanners depend on the principle of CCD, arranged in matrix form, or in linear form
using TDI technology (Time Delay integration).
4-1 Types of Scanners
There are basically four different types of scanners: film, hand-held, flatbed, and drum.

Film Scanners / Slide Scanners: Film scanners are small desktop scanners used
to scan 35mm film and slides. Some of film/slide scanners include an APS
(Advanced Photo System) film adapter for use with the APS film format.
Slides usually are higher quality than prints and produce a higher quality scan.
Slides are brighter than prints and have a higher dynamic range. Many slide
scanners have resolutions in the 5,000-6,000 ppi range and can be very expensive
to purchase.

Hand-held scanners: Hand-held scanners are small instruments that you slide
across the image by hand. They can only scan 2"-5" at a time so are only useful
for small photos. They are sometimes called half-page scanners and are the least
expensive type of scanners.

Flatbed scanners: Also called desktop scanners, flatbed scanners range from
inexpensive low-end scanners for hobby use to very high quality, expensive units
used by professionals. They generally are not as high quality as the drum
scanners.
Images are placed on a glass bed either with or without a holder. The scan area
varies in size from 8-1/2" x 11" to 13" x 18". Either the bed is stationary and the
scanning head moves or if the bed moves, the scanning head is stationary. They
are either a single-pass or three-pass scanner. Single-pass captures all the RGB
colors by moving the light source over the image once. Three-pass scanners use
three passes, one pass each for red, green and blue. The single-pass scanners are
faster but the three-pass scanners are generally more accurate.

36

Digital Photogrammetry

Ch.3

Dr. Ghadi Zakarneh

Flatbed scanners can scan originals of varying thicknesses, and some are capable
of scanning three-dimensional objects. You can add adapters for automatic page
feeders. There are also templates you can use to hold pieces such as
transparencies
or
slides.
In traditional flatbed scanners, the scanning head moves in one direction only.
There is a new technology called XY scanning which positions its scanning head
along an XY axis. The scanner head slides both horizontally and vertically
beneath the bed. The XY scanning technology assures high resolution and
uniform sharpness of the entire scanning area. It also makes it possible to enlarge
an image to a much higher percentage than the traditional flatbed.
The highest resolution you can achieve without interpolation is about 5,000 dpi.
With interpolation, the resolution may increase to about 11,000 dpi.

Drum scanners: Also known as a rotary scanner, the drum scanner scans images
that are mounted on a rotating drum. The drum spins rapidly in front of a
stationary reading head on either a horizontal or vertical unit. The vertical ones
are
beneficial
since
they
save
on
space.
Drum scanners are generally higher quality but are also very expensive. Some
have the capabilities to scan at a resolution of 12,000 dpi without interpolation.
Drum scanners cost from $25,000 to several hundred thousand dollars and require
trained
operators
to
achieve
the
best
results.
Generally, drum scanners have a larger scanning area than the other types. Some
offer scanning drums that are 20" x 24" or larger. The larger scanning area makes
it possible to scan large items or a combination of several smaller items.
The disadvantage of drum scanners is that the original image must be thin and
flexible enough to be wrapped around the drum.

37

Digital Photogrammetry

Ch.3

Dr. Ghadi Zakarneh

4-2 criteria for the quality analysis of scanners


The most important criteria for the quality analysis of scanners can be summarized as
follows :

Geometry:
With current aerial photographs, a level of precision of the order of +/- 2 um can
be reached in aerial triangulation. This precision is also usually obtained with
analytical plotters. Consequently, it is useful to also require such precision for
photographic scanners.

Image resolution:
This parameter is decisively determined by the quality of the film and by the
aerial camera. As will be shown later on, it seems appropriate to require a pixel
size of 10x10 um for black-and-white images whereas a pixel size of 15-20 um

Scanned at 300 dpi at 100%


They look the same

Scanned at 72 dpi at 100%


Looks like the 300 dpi photo

300 dpi enlarged

72 dpi enlarged to show pixelating

Dynamic range:
This should correspond to the contrast of aerial photographs which might range
from 0.1 to 2.0 D for black-and-white pictures and from 0.2 to 3.5 D for color
photographs.

38

Digital Photogrammetry

Ch.3

Dr. Ghadi Zakarneh

Image density is measured from image brightness with optical densiometers, and ranges
from 0 to 4, where 0 is pure white and 4 is very black. More density is less brightness.
The minimum and maximum values of density capable of being captured by a specific
scanner are called DMin and DMax. If the scanner's DMin were 0.2 and DMax were 3.1,
its Dynamic Range would be 2.9. DMax implies unique image tone values are
distinguishable, and not hidden by electronic noise. Greater dynamic range can detect
greater image detail in dark shadow areas of the photographic image, because the range is
extended at the black end.
An interesting mathematical curiosity is the absolute theoretical maximum density range
shown in the chart below for the various numbers of bits. Log 10 of the largest number
can be computed as the theoretical dynamic range. 8 bits can store a numerical value 0 to
255. And then for example, the Log base 10 of 255 is 2.4. Log 10 of 1 is 0 (log is only
defined >0). The difference is 2.4.
Number
of bits

Maximum values possible


in this number of bits

Log 10 of the
largest number

2 to the power of 4 = 16

Log 10 of 15 = 1.2

2 to the power of 5 = 32

Log 10 of 31 = 1.5

256

2.4

10

1024

3.0

12

4096

3.6

14

16384

4.2

16

65536

4.8

Image noise:
The noise of photographic film is mainly defined by its granularity. If considering
the values given by the producers, the sensor noise should not exceed +/- 0.03 D
for a pixel size of 10 x 10 um and an image noise of only 0.02 D could even be
reached with the Kodak Panatomic-X film. This presumes that the modulation
transfer function of the scanners also allows a resolution corresponding to the
pixel size.

39

Digital Photogrammetry

Ch.3

Dr. Ghadi Zakarneh

Color reproduction:
With the increasing use of color photographs, it is important to be able to also
scan color photographs.

Data compression :
The great mass of data produced when digitizing images can be effectively
reduced by data compression techniques.

Instruments handling:
The handling of the instruments as well as the management of the considerable
amount of data are important criteria; however, this aspect is not going to be
discussed in more detail here.

40

Digital Photogrammetry

Ch.3

Dr. Ghadi Zakarneh

4-3 Examples for photogrammetric scanners


Ultra scan5000
Geometry

Accuracy at 2 m using "on-line calibration" and simultaneous "stitching"


Sixteen (16) native geometric resolutions: these are obtained by "binning"
of raw CCD-readouts leading to native "superpixels"
Optical input resolutions: 5,080 dpi (5 m) and 882 dpi (28.8 m)

Radiometry
Density range of 0 to 3.5D, optionally shifted to achieve a maximum of

4.0D

Uniformity up to 0.3DN at 1.0D, using 16 bit internal representation at


maximum radiometric quality setting and an 8 bit output
Source Material

Color or black & white image


Transparent or opaque
Positive or negative
Continuous tone or line art
Computer Environment

Windows NT4.0 / 2000 / XP


Intuitive GUI
SCSI-II connection to PC
Output Formats

Output resolutions: Freely selectable resolutions between 10 dpi (2,500


m) and 10,160 dpi (2.5 m)
Data format: TIFF, Tiled TIFF, JPEG, RAW, EPS, DCS
8 and 16 bits per seperate color

41

Digital Photogrammetry

Ch.3

Dr. Ghadi Zakarneh

DSW700 Digital Scanning Workstation

The DSW700 is a high performance photogrammetric


film scanner for both cut film and roll film. It uses
state-of-the-art technology to produce output that is
both geometrically and radiometrically accurate while
maximizing performance, increasing reliability and
reducing costs.
This
scanner
is
especially
appealing
to
photogrammetric power users who need the very
highest throughput, including both unattended
scanning of roll film and easy change of pixel size from
one job to the next.
Features:

Fast, precise XY stage generates top quality image without resampling


Scan black and white and color aerial photographs 25-50% faster than
previous models (e.g. 12.5 m black and white in 1.5 minutes, 12.5 m RGB
in 3.5 minutes)
Optional film transport for rolls up to 500 feet (152m) long; autonomous
operation allows operator freedom for other tasks
Pixel size physically changeable in range 4.5-22 m without resampling a
secondary lens is available for pixel sizes from 3-4.5 m.
High intensity three-color LED light source enables very dense media to be
scanned quickly and with good results
High geometric precision of stage and sensor
High slew speeds, fast host computer, refined mechanics and sophisticated
software facilitate rapid scanning
Superb radiometric performance: 12 bit output, full fill factor CCD cells, over
3.0 OD with exposure time control
New optical technology virtually eliminates Newton rings
Backlight to inspect imagery and read exposure numbers
Popular image formats compatible with popular image processing, digital
photogrammetry, desktop publishing, CAD and GIS packages, including
JPEG2000

42

Digital Photogrammetry

Ch.4

Dr. Ghadi Zakarneh

Ch04
Compression
Of
Digital Images

43

Digital Photogrammetry

Ch.4

Dr. Ghadi Zakarneh

Compression of Digital Images


1- Introduction
The digitization of pictures offers a large number of advantages:
Possible processing by powerful software;
Reliability of the storage (on CD-ROM, hard drives).
Errorless transmission (thanks to the error-correcting codes).

Spot satellite in panchromatic mode represents a volume of: 6,000 lines times
6,000 columns at 8 bits/pixels = 288 Mbits. A classical digitized aerial image,
scanned with a 14 pm pixel size, provides 2,048 Mbits.
Considering limitations that apply in most systems on capacities of storage and/or
transmission, it is necessary first to reduce to the minimum quantity of necessary
bits per pixel to represent the picture. Preserving in the picture the necessary
information.
The efficiency of the compression will be measured by the rate of compression
that is the ratio between the numbers of bits of the picture source to the number of
bits of the picture compressed.
Data pictures present a natural redundancy that doesnt contribute to information
and that it is possible to eliminate before storage and transmission. One can
compress pictures efficiently therefore without any loss of information (so-called
reversible compression).
the end user of pictures is interested in only part of the information carried by the
picture( relevant information). It will therefore be possible to compress pictures
more efficiently again while removing non-relevant information (so called
compression with losses).

2- Criteria of choice of a compression algorithm


The type of images: pictures of photographic type including a large number of
levels of gray or colour (8 to 24 bits by pixel), or artificial pictures including only
a few levels of gray (e.g. binary pictures of type fax). the JPEG standard for the
photographic pictures, the JBIG standard for the artificial pictures.

The level of quality required by the user: reversible compression (case of certain
applications in medical imagery). very low quality level (case of certain
transmission applications of pictures on the Internet).

The type of algorithm: normalized or proprietary.

The type of transmission or type of access to the decompressed picture:


Sequential(the picture is transmitted in block to maximal resolution) or
progressive(first transmits a low-resolution version (therefore very compact) that
permits the user to select a full resolution version).

44

Digital Photogrammetry

Ch.4

Dr. Ghadi Zakarneh

3- Theoretical elements for image compression:


Notion of entropy: The entropy is a measure of the quantity of information
contained in a set of data. It is defined in the following way:
consider a coded picture on k bits/pixel, in which every pixel can
take 2 values between 0 and 2 k 1 ;
the entropy of order 0 of the picture (denoted H0(S)) is given by
the formula:
2 k 1
1
H 0 ( S ) Pi log 2
i 0
Pi
Where P is the probability that a pixel of the picture takes the i value.
The mean minimal number of bits per pixel with which it is possible to code
the picture without losing information (the maximal compression rate) that it
will be possible to reach in reversible compression is given by:
size of original image
CRmax
size of compressed image
CRmax

k
H 0 (S )

Example-1: a uniform picture where all pixels have all the same value, H0(S)
this picture contains no information;
Example-2: a binary black and white picture of the type of those processed by
fax machines:

In practice, black << wliite therefore H(S) << 1, which explains that the
reversible compression algorithms used in fax machines have mean rates of
compression greater than 100;
Example-3: the picture of Spot satellite on Genoa on 8 bits in H0(S)= 6.97;
Example-4: a picture (8 bits) of saturated white noise in which all values are
equi-probable (flat histogram), H0(S) = 8. It is not therefore possible to
compress this picture in a reversible way.

Reversible compression: The reversible compression is limited by the


compression rate CRmax = k/H0 (S).

Compression with losses: When one searches for some compression rates
higher than CRmax, which is the most current case, one is obliged to
introduce losses of information in the chain of compression.

45

Digital Photogrammetry

Ch.4

Dr. Ghadi Zakarneh

For a given picture and algorithm of compression, there is a relation between


the achieved rate of compression and the errors introduced in the picture by
the compression/decompression. This curve, called distortion/rate has the
typical shape given in Figure below.

The distortion is often measured quantitatively by the standard deviation of


the compression error, given by the formula:

N lines, M columns and a null mean error of compression


p(i, j) being the value of the pixel rebuilt after
compression/decompression.
4- General architecture of image compression algorithm:
Any compression system can be analyzed in three distinct modules:
1. The decorrelator allows the redundancy of data to be reduced.
2. The quantizer is the essential organ of the compression system. Where the
quantity of information transmitted is in fact going to decrease, while eliminating
all the information not relevant included in the data coming from the decorrelator.
3. The assignment of codes (or more simply coding) has the role of producing a
binary stream, representative of the quantized values which will be transmitted
effectively or stored for later transmission. The rate of compression really reached
by the system can be valued in a realistic way only at the end of this module.

46

Digital Photogrammetry

Ch.4

Dr. Ghadi Zakarneh

Example-1: if an image with size of 2.547 MB , if JEPG compression with CRmax 1.65
, what is the compressed image size without loss.
size of original image
CRmax
size of compressed image
size of original image
size of compressed image
1.544 MB
CRmax
Example-2:
For the following 3-bit 4X4 image:
0 3 5 1

7 7 5 5
3 1 4 3
3 1 0 3

k 3
For 3-bit image, color range:
Range 0 7
7
1
H 0 ( S ) Pi log 2
i 0
Pi

Pi
2
16
3
P1
16
P2 0
P0

5
16
4
P4
16
3
P5
16
P6 0
P3

2
16
1
P7

Pi . log 2

1
Pi

0.375
0.452
0
0.524
0.5
0.452
0
0.375

2.178

H 0 (S ) 2.178
3
CRmax
1.377
2.178

47

Digital Photogrammetry

Ch.4

Dr. Ghadi Zakarneh

5- Examples of compression algorithms


5-1 Reversible algorithms
The most widely used is the LempelZiv algorithm (LZ, LZ77, LZW) used
in the utilitarian zips, gzip, and pkzip and in formats of picture tif, gif and png.
Its principle consists in marking sequences of symbols (characters of a text,
values of pixel) that repeat in the file. These sequences are then stored in a
dictionary that is brought dynamically up to date.

JPEG-LS norm: The value of the current pixel x is predicted from a linear
combination of pixels a, b, c previously encoded.

5-2 Algorithms with loses:


Differential algorithms , cosine transforms , wavelet
transforms(multiresolution)
6- Image formats
6-1 EPS
The EPS (Encapsulated PostScript) format is widely accepted by the graphic arts industry for saving images that
will be placed into programs such as Adobe Illustrator and QuarkXPress. It is used on both the Mac and PCs.
It was originally created as an output format for printing images. The EPS format is usually used for vector files but
can also be used for raster files. One reason to use EPS in an image editing program would be to save duotones,
as they can only be saved as EPS. If you are using bitmap mode, the EPS format allows you to save the white
areas of your image as transparent areas. The EPS format is also used if you are saving an image with a clipping
path.

Save vector images as EPS

Save raster images with clipping paths as EPS

48

Digital Photogrammetry

Ch.4

Dr. Ghadi Zakarneh

6-2 GIF

GIF (Graphics Interchange Format) is an image format developed by CompuServe and is the most common type
of image format used on the Web. It was developed as a way to store images in small files that can be quickly
exchanged and easily downloaded. GIF files have a color depth of 8 bits per pixel, so the image must be in Index
color mode in order to be saved as a GIF. GIF files can be accurately displayed on a greater number of systems,
as most systems can display at least 256 colors. GIF files are also saved as low-resolution, usually 72 ppi. The
GIF format should never be used for images that will be professionally printed. If you have an image you would like
to put on the web and also printed, you will need to save two separate files, one as a GIF and one as a TIFF or
EPS. GIF compression is known as a "lossless compression" method, in which the image is analyzed and
compressed without the loss of the original picture data.
The compression technique used with GIF is called LZW compression, which stands for Lempel, Ziv, and Welch.
Lempel, Ziv, and Welch are the mathematicians who were the inventors of this technology. The computer maker
Unisys holds the patent on LZW file compression technique which means that anyone creating GIF files
should owe Unisys a licensing fee for the use of the LZW compression technology. Most software programs like
Adobe Photoshop and Macromedia Fireworks, that are used to create GIF files, are already licensed by Unisys,
so most people should not have to worry about it.
A technique called "run length encoding" is used in GIF compression. The "run length encoding" technique records
the color changes of each horizontal line of pixels, from left to right. If a complete row of pixels is of one color, then
there is less data to record. When there are fewer color changes per row of pixels, the result will be a smaller GIF
file and a faster loading time. If the file size and the loading time are of a major concern, then large amounts of
extra vertical detail should be avoided. In the example shown below, a border of stripes was added to each
identical GIF image. The image with the vertical stripes on the left, will cause the file size to be larger because
there are more color changes to record on each horizontal row of pixels. The horizontal stripes on the image on
the right, create a smaller file because there are fewer color changes running horizontally along the image.

49

Digital Photogrammetry

Ch.4

Dr. Ghadi Zakarneh

6-3 JPEG

The JPEG (Joint Photographic Experts Group) format/compression technique was developed specifically for
photographs. JPEG is utilized to gain high compression levels for photographic images without sacrificing the
image quality. It is used exclusively for the compression of 24-bit images and it will not work for images less than
24-bit. It also does not work very well for non-photographic images such as illustrations, cartoons, flat color areas,
or images with defined edges. JPEG is much more suitable for images that contain irregularities and soft edges
rather than images with many straight lines and hard edges. The irregularities cause the pixels to be less well
defined, which decreases the size of the file. The more irregular the image is, the better suited it is for JPEG.
Note: The JPEG format is used mostly for the web and for PhotoCDs. Images that will
be used in a page layout program and printed on a press should NOT be saved as
JPEGs.

24-bit JPEG images look great on 24-bit monitors, but may not look so good on 8-bit or 16-bit systems. The colors
in the 24-bit image that are not contained in the 8-bit or 16-bit palette of the computer system, will be dithered.
Even if flat areas of color in the JPEG image are among the colors in the 8-bit or 16-bit color palette, there could
still be problems with the JPEG image when viewed on a lower bit depth system. The JPEG compression process
introduces elements into the solid color areas that make the images look muddy or blurry.
JPEG compression is known as "lossy compression", which means that non-essential data is lost during the
compression. JPEG images may be compressed at several levels. The way the compression works is that the
image data is separated into levels of importance. The more the image is compressed, the more levels of
information are thrown out, which creates a smaller file, and along with it, the loss of image detail. The loss of this
data is permanent and it cannot be restored. If the image is not compressed by too great a factor, the overall
quality does not suffer that much. With JPEG, you have the choice of compressing an image without sacrificing too
much in the way of image quality, or you can have the advantage of having a greatly reduced file size, but a
resulting image of much poorer quality.
100% quality = 78.81k

25% quality = 6.73k

Even though the image on the right has been compressed to 25% of the quality of the original image on the left,
the quality of the right image is still tolerable and the file size has been reduced to less than one-tenth of the
original.

50

Digital Photogrammetry

Ch.4

Dr. Ghadi Zakarneh

6-4 PDF
Adobe Systems developed the PDF (Portable Document Format) as a file format which allows a document to be
viewed on any computer, and it will look the same on all of them, regardless of how it was created or on which
operating system it is viewed on. The PDF format stores all of the fonts, colors, and graphics in such a way that
these components will look exactly as they were intended to look. Also, regardless of the printing device that is
used, a PDF file will print correctly on all of them.
Converting files to PDF is one of the best options when transferring files via email or the Web. It ensures that the
files will be readable on other computers. PDF removes the problems of files not opening properly on different
computer systems or not opening at all.
PDF files are much smaller than the files they originate from and download faster for display on the Web. They can
be attachments for e-mail and can be integrated with Web sites or CD-ROM applications. PDF files can be
augmented with video, sound, Web links, and security alternatives for more enjoyable viewing.
Once a document has been saved as a PDF file, you are very limited with your ability to edit the document.
Because of the editing limitations, the document should also be saved in its original format so that if it is necessary
to make changes to the document, the editing can be accomplished easily using the original program in which it
was designed. The edited document can then be resaved as a PDF file.
In order for a PDF file to be viewed on any computer, the computer must have Adobe Acrobat Reader installed
on it. The software is free and can be downloaded from the Internet from the Adobe site at www.adobe.com.
The illustration below shows a PDF document displayed on Adobe Acrobat.

51

Digital Photogrammetry

Ch.4

Dr. Ghadi Zakarneh

6-5 TIFF
TIF or TIFF format (Tagged Image File Format) is the most common format for saving bitmapped images that will
be printed or imported into a page layout program such as QuarkXPress. It can be used on both the Mac and the
PC. It was originally created by the Aldus Corp. for saving scanned images. A TIFF file can be CMYK, RGB,
grayscale, index, or bitmap.

52

Digital Photogrammetry

Ch.5

Dr.Ghadi Zakarneh

Ch05
Image Enhancement

53

Digital Photogrammetry

Ch.5

Dr.Ghadi Zakarneh

IMAGE ENHANCEMENT TECHNIQUES


1-Introduction
Any process which increases the image definition by improving contrast and/or
definition or reducing noise. When accomplished by computer programmers, it is
referred to as digital image processing.

Image histogram, plots number of pixels of each grey level. The normalised
histogram gives the fraction of pixels within an image with each value.

Image enhancement techniques: point operators, histogram modelization


techniques, and spatial operators.

2- Point operators
They modify each pixel on the image as a function of its intensity value,
independently of the rest of the image. The application is based on transformation
functions, and in practice is carried out using LUT's (Look Up Tables) , where to the
input grey level of each pixel is assigned a fixed output value. The LUT's allow the
storage of a transformation just by saving a simple table, it not being necessary to store

the complete resulting image.


We will name f(x,y) the input image, and g(x,y) the output image after applying
the transformation:
T
f

Example: The negative image transformation is


g(x,y) = ( L - 1 ) f(x,y)
where L represents the grey levels range of the image. (See images in figure .1).

6bit : L = 2 6 = 64
8bit : L = 28 = 256

54

Digital Photogrammetry

Ch.5

Dr.Ghadi Zakarneh

Figure 1.- Transformation that produces the negative of an image.

Linear transformations: They are defined by a linear function. Here are som

examples:
a) Modification of gain and offset:
g(x,y) = a f(x,y) + b
where a controls the contrast and b controls the overall brightness of an image. It can
be applied to correct the two calibration parameters of a sensor.
b) Radiometric normalization based on mean and standard deviation:
The mean () and standard deviation ( ) of the input and output (reference) im age
g(x,y) needed. Thus, parameters a and b are expressed as a function of them:
a = g / f

b = g - a f

55

Digital Photogrammetry

Ch.5

Dr.Ghadi Zakarneh

This transformation is used:


-

To correct erroneous detectors of a sensor (striping).

To adjust the different images composing a mosaic (figure .2).

To normalize images acquired on different dates before applying an analysis


method for change detection.

Figure .2- Example of radiometric normalization to create a m osaic of im ages. The


histogram of an image (left) has been adjusted (center) taki ng the other image (right) as a
reference.

c) Contrast enhancement:
The histogram of a digital image is the graphic representation of the frequencies
of the different intensity values on the image.
The linear transform ation methods to enhance the contrast are based on
histogram stretching. Two intensity values are selected on the X-axis of the histogram
and then, a linear transform ation is defined to stretch or amplify the contrast inside this
interval. The effect shown in figure .3,

where the transform ation linear stretching

function is drawn on the histogram.

56

Digital Photogrammetry

Ch.5

Dr.Ghadi Zakarneh

Figure .3.- Linear histogram stretching to enhance the contrast

d) Linear piecewise transformations:


The input intensity range is divided in several sections, and a different
transformation function is applied on each of them (figure .4). For example:

=
g

0 <= f <= a

(f - a) + ga

a < f <= b

(f - b) + gb

b < f <= L

Values of , , > 1 have the effect of increasing the contrast, while values of , , <
1 reduce the contrast.

57

Digital Photogrammetry

Ch.5

Dr.Ghadi Zakarneh

Figure .4.- Linear piecewise transformation. Contrast is increased in


intermediate grey levels, and decreased in the extremes.

e) Thresholding and density slicing: The simplest expression is the binarization, where
a threshold is defined and the values unde r it are recoded to zero, while values over
the threshold are given the maximum value (figure .5).

Figura .5.- Binarization of an image using a threshold equal to 50.

58

Digital Photogrammetry

Ch.5

Dr.Ghadi Zakarneh

Variations of this m ethod are m ultiple thresholding, or density slicing (figure


.6)

Figure .6.- Simple thresholding (left) and density slicing transformation (right)

f) Intensity level autoscaling : Conversion from an intensity dynamic range to another


by a linear transformation.
If fmn and fmx are the m inimum and maximum possible input values, gmn and gmx
the same for the output im age, and fi and gi two generic values of both im ages, the
compute of gi in the output image is obtained as
fi fmin
gi gmin
=
fmax fmin gmax gmin
operating
gi = gmin +

f fmin
( gmax gmin)
fmax fmin
gi

gmin

gmax

fmin

fi

fmax

59

Example:
Transform the following image from 6bit to 8bit?

6bit:
8bit:

F min = 0
g min = 0
gi = 0 +

F max = 63
g max = 255

Fi
255
63

The resultant image:

The pixel values are always integers, the final image is:

60

Digital Photogrammetry

Ch.5

Dr.Ghadi Zakarneh

Non linear transformations:


a) Logarithmic: Used to compress the dynamic range:
g(x,y) = k log(1 + |f(x,y)|)

k = scale constant

This transformation also stretches the low values and reduces the contrast in
high intensity values (figure 7.7).
b) Exponential: It has the opposite effect, increasing the contrast in the higher values
and reducing the contrast in the lower values (figure .7):
g(x,y) = k (e|f(x,y)-1)

Figure .7.- Logarithmic (a) and exponential (b) transformations (Richards, 1993)

2.- Histogram modelization techniques


a.- Equalization
With the purpose of obtaining a histogram flat as possible, the intensity values of
the image are homogeneously distributed on the intensity range (figure .8).

61

Digital Photogrammetry

Ch.5

Dr.Ghadi Zakarneh

Figura .8.- Histogram equalization

b.- Histogram specification


This method, also named histogram matching, is analogous to the equalization
but here, instead of having a flat histogram as a reference, another reference histogram
is chosen. The aim is to obtain a histogram as close as possible to other. This technique
can be applied, like the radiom

etric normalization based on m ean and standard

deviation of the histogram s, when im ages of the sam e area that have been taken on
different dates or by differe nt sensors are being com pared. This is com mon when
analyzing changes or evolutions.

62

Digital Photogrammetry

Ch.5

Dr.Ghadi Zakarneh

3.- Spatial operators


The noise of a digital im age is that part of the inf ormation from the intensity
values that does not come from the object or natural scene, but it has been introduced by
external factors (atmosphere, sensor system).
The spatial frequency of an image is proportional to the num ber and magnitude
of changes in the intensity level per distance unit.
The spatial operators modify the value of each pixel depending on the values of
pixels in its neighbourhood. They are applied by m

asks or filters, and the spatial

operation is called convolution:


g( x, y) =

where g(x,y) is the value of a pixel

( i , j )W

ij

( x , y ). h(i , j )

(x,y) , W is the neighbourhood, and h(i,j) is the

function of weights or filter.


Applying a generic 3x3 filter over a generic pixel (x,y) , its resulting vaule on the
filtered image is given by the expression
g(x,y) = w1 f(x-1,y-1) + w2 f(x,y-1) + w3 f(x+1,y-1) +
+ w4 f(x-1,y) + w5 f(x,y) + w6 f(x+1,y) +
+ w7 f(x-1,y+1) + w8 f(x,y+1) + w9 f(x+1,y+1)
The complete filtered image is obtained by moving the filter along the image. Figure .9
shows a diagram of the process.

63

Digital Photogrammetry

Ch.5

Dr.Ghadi Zakarneh

Figure .9- Application of a 3x3 filter over a pixel.

Classification of the spatial operators


- Smoothing filters (low-pass)
- High frequency enhancement filters (high-pass)
- Edge detection filters

a) Smoothing filters
They are used to reduce noise on images. The most common are:

Mean filter: Each pixel value is substituted by the m ean value of the neighbouring
pixels:

g( x, y) =

1
NW

( i , j )W

ij

( x, y)

1
9
1

9
1
9

1
9
1
9
1
9

1
9
1

9
1
9

64

Digital Photogrammetry

Ch.5

Dr.Ghadi Zakarneh

Median filter: Each pixel value is substituted by the median value of the
neighbouring pixels. It is efficient in eliminating binary (salt and pepper) noise.

Mode filter: Each pixel value is substituted by the most repeated value of the

neighbourhood. Useful in filtering classified (thematic) images.

1 2 1
1
2 4 2
16
1 2 1
Figure 7.10 shows some examples of smoothing filters.

Gaussian filter :

Original noisy image

Median (5x5)

Mean (5x5)

Mean (11x11)

Figure .10.- Image with gaussian noise and the result of application of 3
low-pass filters.

65

Digital Photogrammetry

Ch.5

Dr.Ghadi Zakarneh

Example: What would be the result of applying a (3x3 )mean filter over the 9 central
pixels of the 5x5 image shown below? And the result of applying a (3x3) median filter?
What is the difference between both results?
1
1

1
1

1 1 1 1
1 1 1 1
1 10 1 1

1 1 1 1
1 1 1 1

Mean: In the 9 pixels, the results will be: [(8 x 1) + 10]/9 = 2


Median: In the 9 pixels, the median value of the series 1,1,1,1,1,1,1,1,10 is 1
2 2 2
Media : 2 2 2
2 2 2

1 1 1
Mediana : 1 1 1
1 1 1

The mean reduces the noise effect of the central pixel, but the median eliminates its
effect. This is a typical case of the suitability of median filtering to eliminate binary
noise.

b) High frequency enhancement filters


They have an opposite effect from the smoothing filters: they enhance the high
frequency values on im ages, which are related to spatial details, but also to noise. The
high-pass coefficients for a 3x3 mask are:
1 1 1
1 8 1

1 1 1

After the application of a high-pass filter, usually a scaling of the intensity range
is needed for visualization purposes. Image .11 shows an example of the application.

66

Digital Photogrammetry

Ch.5

Dr.Ghadi Zakarneh

Other high frequency filters:

5 5 high pass filter:


1
1

1
1

1
1
1
1
1

1
1
49
1
1

1
1
1
1
1

1
1
1

1
1

Laplacian:

1 1 1
1 8 1

1 1 1

Ford high pass filter:

0.3
0.3

0.3

0.3
0.3

0.3
0.3
0.3
0.3
0.3

0.3
0.3
9.7
0.3
0.3

0.3
0.3
0.3
0.3
0.3

0.3
0.3
0.3

0.3
0.3

67

Example:
Transform the following 6bit image apply : mean filter?

Mean filter 3x3:


The resultant image

the final image (pixel values rounded)

Median filter 3x3:


The resultant image

the final image (pixel values rounded)

Laplacian filter 3x3:


The resultant image

the final image (max is 63 and min is 0)

68

Digital Photogrammetry

Original image

Ch.5

Dr.Ghadi Zakarneh

High-pass (3x3)

Sobel (3x3)

Figure .11.- Application of a high-pass filter (center) and a Sobel filter (right).

A generalization of these filters are known as

High-boost filters, which are

defined by multiplying the original image by an amplification factor (A):


High-Boost = A x Original Lowpass =
= (A - 1) original + original - Lowpass =
= (A - 1) original + Highpass.
Thus, the original im age is partially added to its high-pass version, obtaining an effect
of high frequency (detail) enhancement of the original image (figure .12).

Figure .12.- Example of application of a High boost filter. There is a subtle increase of spatial detail
(high frequencies) in the filtered image (right).

69

Digital Photogrammetry

Ch.5

Dr.Ghadi Zakarneh

c) Edge detection filters


The most common edge detection filter is based on the gradient operator, that is
based on the first derivative of the im age function f(x,y). The gradient vector is defined
by:
f
G X x
f = =
GY f
y
and its magnitude:
2
f f
f = (G + G = +
x y
2
X

2
Y

a practical approximation is:

f G X + GY
The direction of the gradient vector at the point (x,y) is given by the angle :

GY

GX

= arctg
measured with respect to the X axis.

In digital im ages, differences are us ed to obtain derivatives, so the first


derivatives on directions X and Y in a generic point are:

f x = f ( x , y ) f ( x 1, y )
f y = f ( x , y ) f ( x , y 1)
and their associated masks:
0 0
x =

1 1

0 1
y =

0 1

70

Digital Photogrammetry

Ch.5

Dr.Ghadi Zakarneh

Other gradient operators are:

Roberts: 2x2 cross operator, examines diagonal directions

The final pixel value is :

Prewitt: 3x3 operator:

The final pixel value is :

f = X + y

f = X + y

Kirsch directional operators: represented by the masks (on the four principal
directions):
1

The final value for the pixel is selected to the maximum of the 4 resulting
Values and a threshold value can be applied to define the edges.

Sobel: (Figure .11). It is defined by. It can be also extended to 8 dimensional

0 1 2
2 1 0
1 2 1
1 0 1

2 0 2 ; 0
0
0 ; 1 0 1 ; 1 0 1

2 1
0
1
1 0 1
2
1
1 2
0
The final value for the pixel is selected to the maximum of the 4 resulting
Values and a threshold value can be applied to define the edges.

71

Example:
the following 6bit image apply : Kirsch filter , and apply for the final image the threshold
rule: if the value => 30 then 1 , else 0?

1st filter:

The resultant image

2nd filter:

The resultant image

the final image rounded (max is 63 and min is 0)

the final image rounded (max is 63 and min is 0)

3rd filter:

The resultant image

the final image rounded (max is 63 and min is 0)

72

4th filter:

The resultant image

the final image rounded (max is 63 and min is 0)

Maximum of the final images:

Threshold of images:

73

Digital Photogrammetry

Ch.5

The Laplacian of a bidim ensional function

Dr.Ghadi Zakarneh

f(x,y) is obtained from

the second

derivatives::

2f 2f
f =
+ 2
x 2
y
2

In a digital image, and for a 3x3 region:


2 f = 4 f ( x , y ) [ f ( x , y 1) + f ( x 1, y ) + f ( x + 1, y ) + f ( x , y + 1)]
If the first derivative on the direction X is:
f x = f ( x , y ) f ( x 1, y )

the second derivative in the sam e direction is obtained by derivation of the previous
expression:
f xx = f xq [ f ( x , y ) f ( x 1, y )] =

[ f ( x, y) f ( x 1, y)] [ f ( x 1, y) f ( x 2, y] =
f ( x , y ) 2 f ( x 1, y ) + f ( x 2, y )

This is equivalent to a linear m ask (1 -2 1). Changing signs and extending the m ask to
two directions
0 1 0
f = 1 4 1
0 1 0
2

7.4.- Filtering in the frequency domain

The convolution operations over an im age can be applied in the frequency


domain, using the concept of the Fourier transform.

74

Digital Photogrammetry

Ch.5

Dr.Ghadi Zakarneh

FOURIER TRANSFORM (equations)


TRANSFORM

INVERSE TRANSFORM

F (u ) = f ( x) e j 2ux dx

COMPONENTS

F (u ) = R 2 (u ) + I 2 (u )

f ( x) = F (u ) e j 2ux du

CONTINUOUS
FUNCTION
1-D

F(u) = R(u) + j I(u)

F (u ) = F (u ) e j (u )

I (u )

R(u )

(u ) = arctg

e j 2ux = cos 2ux + j sen 2ux


CONTINUOUS
FUNCTION
2-D

DISCRETE
FUNCTION
2-D

F (u , v) =

f ( x, y ) e

j 2 ( ux + vy )

dxdy

1
F (u, v) =
M N

M 1 N 1

f ( x, y) e
x =0 y =0

f ( x, y ) =

F (u, v) e

j 2 ( ux + vy )

dudv

ux vy
j 2 +
M N

f ( x, y ) =

M 1 N 1

F (u, v) e

ux vy
j 2 +
M N

u =0 v =0

75

Digital Photogrammetry

Ch.5

Dr.Ghadi Zakarneh

The convolution theorem

The convolution of a digital im age f(x,y) by a f iltering function h(x,y), on a


neighbourhood W is given by the expression
f ( x, y ) h ( x, y ) = g ( x, y ) =

i , jW

ij

( x, y ) h(i, j )

If F(u,v) is the Fourier transform of f(x,y), and H(u,v) is the Fourier transform of
h(x,y), then the Fourier transform of f(x,y)*h(x,y) is F(u,v).H(u,v). That is,

f ( x, y ) h( x, y ) F (u, v) H (u , v)

And also the inverse is valid:

f ( x, y ) h( x, y ) F (u, v) H (u , v)

The practical importance of this theorem is that any convolution of an image can
be obtained as a product of two im ages in the frequency dom ain. The advantages are
that large masks on the spatial domain can be easily performed in the frequency domain,
and that is easier to filter the periodic noise in this domain.

Steps of filtering

Original
imagel
f(x,y)

FT

Filter
h(x,y)

FT

Image
spectrum

F(u,v)
G(u,v)
Transfer
function
H(u,v)

(TF)-1

Filtered
image
g(x,y)

76

Digital Photogrammetry

Ch.5

Dr.Ghadi Zakarneh

Examples

Figure .12.- Three images (left) and their respective Fourier transforms (right).

7-19

77

Digital Photogrammetry

Ch.5

Dr.Ghadi Zakarneh

Low-pass filtering

(a)

(b)

PB (r=15)

PB (r=30)

PB (r= 50)

Figure .13.- Low-pass filtering in the frequency domain

Figure .14.- Transfer functions (left) defined by two gaussian functions, =0,2 (above) and =0,8
(below). Semi-profiles of the transfer functions (center). Filtered images(right).
7-20

78

Digital Photogrammetry

Ch.5

Dr.Ghadi Zakarneh

High-pass filtering

(a)
(b)
(c)
Figure .15.- Examples of three images filtered in the frequency domain using: (a) High-pass
circular filter (radius=15); (b) Band-pass circular filter (ring between 10 and 40); and (c) the same
with extremes frequencies.

Periodic noise filtering

Some descriptive relationships between the spatial and spatial frequency


domains (Schowengerdt, 1997):
Spatial domain.
Periodic patterns.

Spatial frequency domain.


High amplitude spikes, localized at the
frequencies of the patterns.

Linear, quasi-periodic features.

High amplitude line through the origin,


oriented orthogonal to the spatial patterns.

Non-linear, non-periodic features.

High amplitude cloud, prim arily at lower


frequencies.

79

Digital Photogrammetry

Ch.5

(a)

(b)

(c)

(d)

Dr.Ghadi Zakarneh

Figure .16.- Periodic noise elimination: (a) Original image; (b) Fourier spectrum; (c) specific binary
filter (transfer function); (d) image result of filtering.

80

Digital Photogrammetry

Ch.6

Dr. Ghadi Zakarneh

Ch06
Digital
Photogrammetric
Workstations

81

Digital Photogrammetry

Ch.6

Dr. Ghadi Zakarneh

Photogrammetric Workstations
1-

Introduction:

Nowadays, most of the photogrammetric workstations are digital or analytical systems.


The traditional analogue systems with high precision mechanics and optics are obsolete
and no more in practical use. Therefore we will concentrate on a brief
discussion/comparison of Digital Photogrammetric Workstations as well as Analytical
Plotters.

82

Digital Photogrammetry

Ch.6

Dr. Ghadi Zakarneh

The basic functions of the Photogrammetric workstations are shown in the graph below:

equipment

Freedom from the high-precision optic and mechanical components, which


kept the acquisition and maintenance costs of systems at a very high level.
The size of the machines was considerably reduced .
Systems of digital photogrammetry are based on workstations or, on PCs. The
recent computers include almost the whole of the necessary means for
photogrammetric restitution.
the manipulated data images generally have sizes of several hundreds of
megabytes, sometimes tens, or even hundreds of images are needed. The
capacity of storage, and access times, should therefore be especially selected.

83

Digital Photogrammetry

Ch.6

Dr. Ghadi Zakarneh

2-1 data input:


The system must possess the coordinate input , it should be able to address
three independent axes, X Y and Z.
Solutions are numerous, from arrows on the keyboard, to the cranks and
pedal of traditional photogrammetric devices, or controllers of immersion
of virtual-reality stations, joysticks, or the specialized mouse.
that the movement of cursors or input devices must be as continuous as
possible, and that the control in position is far preferable to speed
commands (joysticks).
supplementary buttons may be attached, allowing one to simplify the use
of the most frequent commands. Like selecting the point and registering
its coordinates.
2-2 stereoscopic visualization
The system must also allow stereoscopic vision. several solutions exist, and some
are under normalization. It is about presenting to each eye the image he has to
observe. In order of increasing comfort, one can mention:
the display of the two images in two separated windows, which the
operator will observe with an adequate optic system of stereoscopic type,
placed before the screen;
the simultaneous display of the two images, one in green, the other in red,
the operator benefiting from the structural complementarities of such
glasses (anaglyphs) whose cost is extremely low;
The alternative display of the two images, a device using liquid crystals
letting the image pass toward the eye to which it is destined. In the
professional systems, only this last solution is used. The frequency of the
screen conditions the quality of the stereoscopic visualization, because the
alternative display divides by two the frequency really discerned by the
user (a minimal frequency of 120 Hz is necessary to avoid operator
fatigue). The liquid crystals may be placed directly before the eye, a low-

84

Digital Photogrammetry

Ch.6

Dr. Ghadi Zakarneh

cost solution, synchronized by a wire or by infrared link. Or they may be


placed on the screen, the operator then using a couple of passive polarized
glasses (which allows him or her to look indifferently.
2-3 photogrammetric algorithms
the equations are the same as those on the analytic photogrammetry
systems (equations of collinearity or coplanarity).
they can not only process aerial images, but also different geometry
images, for example the images from scanning sensors or from radar.
the possibilities of the automation of photogrammetry.
3-

display of images and vector data:


3-1
image display
Image can have size larger than the display this can be up to 100 time larger than
the screen. To displace the display (screen) window within the image there are
two possibilities:
the image is fixed: The fixed image/mobile cursor configuration is easiest
to implement. when the cursor reaches the side of the screen, the system
must reload another zone of images.
The cursor is fixed: the mobile image/central cursor demands more
calculation capacities, image-holders move in a continuous way in front
of a fixed mark. The system sometimes proposes a global view for the fast
displacements in the model.
3-2

3-3

zoom and subpixel displacements


Zooms by bilinear interpolation, or to the nearest neighbor, serve to
enlarge all or part of the current screen.
Zoom allows to point with a better precision than the real pixel of the
image.
zoom decreases the field of observation
Zooms are generated in advance under the shape of a pyramid of physical
images of decreasing resolution. In the case of image pyramids.
image processing

85

Digital Photogrammetry
3-4

Ch.6

Dr. Ghadi Zakarneh

Epipolar resampling
The visualization of a stereoscopic model can be tedious for operators,
because the two images have too different scales and orientations.
Performances of usual image-matching techniques are degraded also by
this type of images.

In this case, it is desirable to make an epipolar resampling: one calculates


the homographic plane that allows one to pass from the initial image to the
one that would have been obtained if optical axes of photos had been
parallel between them and perpendicular to the basis (normal case).

86

Digital Photogrammetry

3-5
4-

Ch.6

Dr. Ghadi Zakarneh

After this process, two points of a line of the left image will have their
counterparts in one line of the right image, and the transverse parallax is
constant.
Epipolar lines are the intersections of the bundle of planes containing the
basis and of the two image planes. In the resampled images, these lines are
parallel, whereas they were converging in the initial images.
This resampling requires at least the calculation of the relative orientation
to generate the new images.
Epipolar resampling improves the operators comfort, accelerates the work
of correlators, since the zone of research of the homologous points is
reduced to a one-dimensional space (instead of a two- dimensional space
for a systematic correlation of images).
Some systems of digital photogrammetry require working with images in
epipolar geometry for the extraction of the DTM; others do this
resampling continuously.
vector display

functionalities of the digital photogrammetric workstations:


The management of manipulated images; scanned or digital photos, nd the
ability to deal with different image formats and grey levels.
The management of photogrammetric database: Directory of model
images, Operator parameters, Parameters of the internal orientation for
each image, Position of the camera for each image, etc.
INTERNAL ORIENTATION: manual or automatic by the system using
the camera calibration sheet.
EXTERNAL ORIENTATION using collinearity equations.
Measures and acquisition from stereoscopic models of points, lines and
polygons.
Aerotriangulation (bundle adjustment).
Automatic and manual DTM collection.
Orthophotos production.

87

Digital Photogrammetry

Ch.7

Dr. Ghadi Zakarneh

Ch07
Photogrammetric
DSM & DTM

88

Digital Photogrammetry

Ch.7

Dr. Ghadi Zakarneh

Photogrammetric DSM and DTM


1- Digital elevation model
A Digital Elevation Model (DEM) represents the height of a patch of terrain.
Accuracies of DEMs vary depending upon the requirements of
different applications. DEMs have been applied to a wide range of civil engineering
and military planning task
Besides the conventional methods of creating DEM such as Photogrammetry and
manual field survey, airborne laser scanning and radar interferometer are new
technologies capable of creating high quality DEMs in a cost-effective manner.

Figure .1:DEM represented by contours.

The term digital elevation model (DEM) is used generically to mean the
digital cartographic representation of the elevation of the earth surface in any form.

89

Digital Photogrammetry

Ch.7

Dr. Ghadi Zakarneh

2- Digital terrain models


A term which is commonly used interchangeably with DEM. Strictly
speaking a DTM refers to a model of reality which includes information relating to
factors such as surface texture as well as elevations and the method of transferring
elevation data into a contoured surface or a three-dimensional display.
The digital terrain models have the following purposes:

Digital terrain modeling is a powerful tool in GIS analysis and visualization.

A digital terrain model is a digital representation of part of the earth's surface.

This may be stored in a GIS in several ways:


o

a set of contour vectors Figure .2A.

a regular grid of spot heights Figure .2B.

an irregularly spaced set of points connected as triangles Figure .2C,


normally called TIN (Triangular irregular networks ).

The digital terrain models have the following applications:

Resource Management

Earth and Environmental Sciences

Civil and Military Engineering

Surveying and Photogrammetry

90

Digital Photogrammetry

Ch.7

Dr. Ghadi Zakarneh

Figure .2: Ways to stored the digital terrain model in GIS

3- Digital terrain models in civil engineering


Digital Terrain Models are useful tools in both the design and the execution or
construction of an engineering project. The surface model derived from
photogrammetric data can be used in both phases; design and construction.
Examples of possible manipulations include:
a-

Horizontal, vertical or 3D roadway alignment design.

b- The creation of design surfaces overlaying the original.


c- The calculation of optimum earthwork cut-and-fill volumes.
d- Storm drainage and watershed analysis.

91

Digital Photogrammetry

Ch.7

Dr. Ghadi Zakarneh

e- Dam and reservoir sitting (including monitoring once built).


f- Landscape planning and visual impact analysis.
These various operations are supported by a number of Intergraph application
software packages which are designed specifically for use by civil engineers.

4- Digital surface models


A digital elevation model (DEM) is a digital and mathematical representation of
an existing or virtual object and its environment, e.g. terrain undulations within a
selected area. DEM is a generic concept that may refer to elevation of ground but
also to any layer above the ground such as canopy or buildings.
When the information is limited to ground elevation, the DEM is called a digital
terrain model DTM and provides information about the elevation of any point on the
ground or water surface. When the information contains the highest elevating of each
point, coming from ground or above ground areas, the DEM is called the digital
surface model or DSM.

Figure .3 Digital surface model example.

92

Digital Photogrammetry

Ch.7

Dr. Ghadi Zakarneh

5- DEM representation
A very large number of program have been devised and written for terrain
modelling applications in surveying and civil engineering. And they basically follow
one of two main approaches:
1- They are based on, or make use of height data which has been collected or
arranged in the form of regular interval .
2- They are based on, a triangular network.
5.1- Grid Representation
Gird models represent the terrain by interpolating from the input data on to
affixed grid. this technique has limitations, but it is an easy method to implement and
store on microcomputer. The main disadvantages are that the grid size must be fixed
and must be small to accurately represent irregular surfaces, which naturally leads
to excess data in smooth areas, figure .4 shows principle of grid representation.

Figure .4: grid representation of DTM.

93

Digital Photogrammetry

Ch.7

Dr. Ghadi Zakarneh

5.2- TIN Representation

The generation of the DTM corresponds to setting up a spatial triangular


irregular network together with information on the surface normal at each node and
on connections to neighboring triangle points.
To form the triangles; first all line segments (break lines round, break lines
sharp, structure lines, fault lines or holes) are stored as edges of triangles. Then mass
points (points known in XYZ) are introduced in the triangulation. the vertices of the
triangles are the measured points these points are used for the construction of the
triangular net. In this procedure a triangle is formed if the circle passing through the
three points contains no other point. Figure .5 shows TIN representation .

Figure .5: TIN representation of DTM.

94

Digital Photogrammetry

Ch.7

Dr. Ghadi Zakarneh

5.3- Contour representation


With the information of the DTM of 3D data, either as a grid model or a
triangular model, contours can be interpolated through the area. These contours can
be directly interpolated in a GIS software or CAD software using the grid or TIN
prepared in the photogrammetric workstations, each contour line has only one
elevation, and distance between any two contour lines in constant, it is named the
contour interval.

Figure .6: contour representation of DTM.

95

Digital Photogrammetry

Ch.7

Dr. Ghadi Zakarneh

6- Photogrammetric DTM
Production in digital Photogrammetry DTM can be produced either manually
or automatic.
6.1- Automatic DTM production (Image Matching)

Image matching is a technique, in order to determine identical points in one


or several images, to determine an objects position in an image or to reconstruct an
object.
Techniques of image matching:

Area Based matching: We are dealing with gray values, respectively


colors, it is simple and easy.

Feature based matching: We are dealing with features (points, lines,


polygons),complex.

For the image matching we have the following workflow as shon in figure .7:

Define the window A around the pixel in the first image e.g. 3X3.

Define the search area in the second image.

Find the correlation coefficient between the pixel and its window in
the first image and with a window B with same size around each pixel
in the search area in the second image.

From all calculated correlation coefficients select the pixel with the
best correlation coefficient. This pixel is the pixel we need to find.

96

Digital Photogrammetry

Ch.7

Dr. Ghadi Zakarneh

Figure .7: image matching between two images.

For Area based matching we have the following methods:


1- linear cross correlation :

A
m

c11

i 1 j 1

ij

A Bij B

m n
m n
2
2

A
A
ij
Bij B
i 1 j 1
i 1 j 1

A: the window around the pixel in the first image.


B: the window around the pixel in the second image.

97

Digital Photogrammetry

If

Ch.7

Dr. Ghadi Zakarneh

c:
= 1 then the windows in A and B are identical
= 0 then the windows in A and B are uncorrelated
= -1 then the windows in A and B are inverse (negative image)
> 0.7 the points have good correlation

2- Least squares differences:


The two windows A and B form two vectors V1 and V2 respectively.
v2 i2 , j 2
v i , j
c1 vi1 , j1 , vi2 , j 2
1 1 1
v2 i2 , j 2
v1 i1 , j1

C=0 , the two vectors are identical.


The pixels with minimum correlation is the matching pixel.

98

Digital Photogrammetry

Ch.7

Dr. Ghadi Zakarneh

3- Centered least squares:

c1 i1 , j1 , i2 , j 2

v 2 i2 , j 2 1

v1 i1 , j1 2

C=0 , the two vectors are identical.


The pixels with minimum correlation is the matching pixel.

4- Scalar product:
This defines the cosine of the angle between the two vectors , if the cosine is 1 , this
means the angle is 0 and the two vectors are identical.

v1 i1 , j1 v 2 i2 , j 2
c 2 i1 , j1 , i2 , j 2
v1 i1 , j1 v 2 i2 , j 2

C=1 , the two vectors are identical.


C=0, the vectors are are uncorrelated.
C >0.7 , they have good correlation.

99

Digital Photogrammetry

Ch.7

Dr. Ghadi Zakarneh

Example:
The candidate array A is an ideal template for a fiducial cross, and the following
search array S is a portion of a digital image containing a fiducial cross. Compute the
position of the fiducial within the search array by correlation. Use a 5 X 5 search
window size.

Extract subarray B from the search array at position 1, 1.

Compute the average digital number for subarrays A and B.

Compute the summation terms for the correlation coefficient.

100

Digital Photogrammetry

Ch.7

Dr. Ghadi Zakarneh

Compute the correlation coefficient.

Compute the remaining coefficients in the same manner.

Select the maximum correlation coefficient. The maximum value, 0.94, occurs at row
3, column 3 of the C array. The position in the second image is row 5 and column 5.
Feature Based matching
Features such as edges are extracted from the images, These are then compared to
find the best match.
Advantages:
Fast, since only a small subset of pixels are used.
Accurate, since features can be located with sub-pixel precision.
Are more robust with respect to radiometric and perspective distortion.
Disadvantage
Sparse depth maps, matching only takes place where features occur.
Intermediate matches must be interpolated.
Matching primitives:
Zero crossing locations
direction of sign change, contour orientation.
Edges
end point coordinates, length, orientation, edge strength(contrast with
respect to background),difference between grey levels on either side.
Regions
shape, size, relative geometry.
Suitable for smooth objects delineated by edges.

101

Digital Photogrammetry

Ch.7

Dr. Ghadi Zakarneh

Definition of the search area


1. Image space: Defining the search area on one of the two images depending
the epipolar line where image coordinates in the left photo x1 , y1 are fixed.
While the right image coordinates are changes along the eppipolar line
slowly, and each time find the ground X,Y,Z AND the

correlation

coefficient. The point along the eppipolar line with best correlation
coefficient value in the matching point x2 , y2 . the X,Y,Z coordinates of
point in the left photo x1, y1 and the right photo x2 , y2 .
The estimated error in the elevation is:

z
Where:

H
* r * match
B

H: flying height
B: air base

r0 : The ground pixel size in meters.

102

Digital Photogrammetry

Ch.7

Dr. Ghadi Zakarneh

Figure .8:definition of search area using image space method.

The sub pixel position on the epipolar line:

This value is the position of the best matching value as shown in the figure below.

The precision of the elevation (altitude) measurement is calculated by


:
Or
Where:

H: flying height
B: air base
r0 : The ground pixel size in meters.

103

Digital Photogrammetry

2.

Ch.7

Dr. Ghadi Zakarneh

Object space: The search is done by moving the 3D object coordinates. In


this method the XY ground coordinates of the point are fixed, z value change
by small increment d z .
dz

Where:

H
* r
4B

H: flying height
B: air base

r0 : The ground pixel size in meters.


As the (z) changes we get using collinearity equation the values of the
point coordinates in the left and right photo, x1 , y1 , x2 , y2 also the correlation
coefficient is determined , (z) is still changing starting from the minimum to the
maximum z-value. The point with the best correlation coefficient is the matching
point.

Figure ..9: definition of search area using object space method.

104

Digital Photogrammetry

Ch.7

Dr. Ghadi Zakarneh

6.2- Manual DTM production


You can manually collect and edit DTM elevation points from a pair of
overlapping digital aerial images that are displayed in stereo.
To collect DTM elevation points means to measure or to edit the Z value of a
pont by clicking data ( on the input device ) where a specified point meets the
ground. The software uses known X and Y values and established algorithms to
calculate the Z value. See figure .10 .

Figure .10: Manual DTM.

105

Digital Photogrammetry

Ch.8

Dr. Ghadi Zakarneh

Ch08
Resampling

106

Digital Photogrammetry

Ch.8

Dr. Ghadi Zakarneh

Resampling
Resampling is a technique for calculating image gray values by interpolation, after a
geometrical transformation of an image. This becomes necessary after geo-referencing,
rectification, magnification etc.

Figure 1.8: Image rectification

The image resampling has the following steps:

107

Digital Photogrammetry

Ch.8

Dr. Ghadi Zakarneh

Figure 1.9: Resampling Theory [University Salzburg, 2004]

Other simple example for image resampling is through win zooming an image, so if you
zoom an image 4 times, then you will get an image filled each 4th pixel while the rest are
empty and have to be resampled.

108

Digital Photogrammetry

Ch.8

Dr. Ghadi Zakarneh

Generally there are three interpolation methods which again leads to different results, as
shown for the example below:
The resulting image after image registration is:

1. Nearest neighborhood:
It is a very fast solution, the range is one pixel. The pixel values are directly
copied from one image to the other, there is no interpolation involved. In the
example above:
A pixel is superimposed at a fractional location (R 619.71, C 493.39).
Rounding these values to the nearest integer yields 620 and 493 for the
row and column indices, respectively. Thus, the resampled value is 56.

109

Digital Photogrammetry

Ch.8

Dr. Ghadi Zakarneh

Nearest
Neighbor
Resampling

3x3 blocks
d ist ributed CVer

7x7 bloc Ks

Nearest
Neighhm
Resampling

7/3 resize

.. ,,.

'.
... ,.,.. ...
'". .. . .. .
" ... .. ... ...
". '.' ...
.,,
" "'
., ,,. "..
'" .
'"
'" ' " " ...
...
...
'"
..,, ...
......"'..... .........."''.' ....." ......... " ....
..
'"

-.1: J

~ .. 4

J#

,..~~

-.1 J

'

'"

'"

""

.. ..~ .. -.1 ~ ..

..."' "' '"

"'

Embty p,ixe.ls f i lied


with color from ULH
non-empt y pixel

110

Digital Photogrammetry

Ch.8

Dr. Ghadi Zakarneh

2. Bilinear:
It is a linear interpolation in rows and columns, the interpolation range is the
four surrounding 4 pixels. So it is the weighted mean of the closest 4 pixels.
3.

For the example above:


linearly interpolated values DN1 and DN2 are computed along rows
619 and 620, respectively.

a linear interpolation is performed in the column direction, yielding the


result (DN).

Finally, since DNs are generally integers, the value is rounded to 59.

111

Digital Photogrammetry

Ch.8

Dr. Ghadi Zakarneh

The picture below shows the zooming of 4 times using linear interpolation.

Hill near
Interpolation

,
,,

Th.ct.r f ill in evtt.ry 4th


pixel ir. evtt.ry 4th rcw
''(ith t~.e or i911"1ol w.lueG

Hi linear
Interpolation

'

.,

'

'

R.z~ t.d t with origi 11~)

pix.! morUed:

C..1pare t< the next Iide


11hich c:.nto.in.s o 1x pixcl
7i'lom \'.11 pi;,c,::l r P.f' .mtinn.

112

'

Digital Photogrammetry

Ch.8

Dr. Ghadi Zakarneh

4. Bicubic:
It is based on the fitting of two third degree polynomials to the region
surrounding the point. The 16 nearest pixel values in the input image are used
to estimate the value (r, c) on the output image. The bicubic follows a sinc
function as shown below.

This function can be approximated to cubic functions as follows.

Where:
The constant a= free number define the weighting function at x=1, best
results when a=-0.5.
The value of x=the absolute difference between the interpolated
fractional pixel position and the column or row number.

The value of the weighting function for the rows is called r.

The value of the weighting function for the columns is called c :

113

Digital Photogrammetry

Ch.8

Dr. Ghadi Zakarneh

The surrounding 4X4 pixels an array called D:

From the above example D is

The matrices C and R are defined, where C is:

And R is :

The digital number DN:


DN R.D.C

The final pixel value is found by rounding DN, in the example the final result: 61.

114

Digital Photogrammetry

Ch.9

Dr.Ghadi Zakarneh

Ch09
Orthophotography

115

Digital Photogrammetry

Ch.9

Dr.Ghadi Zakarneh

Orthophoto and Mosaic production


1- Orthophotography
The orthophotography is a picture (generally aerial) that has been geometrically rectified
to make it possible to be used in any place on a map. This includes the removal of image
orientation problems and the relief problems.
2- Orthorectification
The topographical variations in the surface of the earth and the tilt of the camera affect
the distance with which features on the aerial image are display. The more
topographically diverse the landscape, the more distortion inherent in the photograph.
Thus an aerial photograph taken over a field in Nebraska would contain little or no
distortion, while an image of the Cascades would contain a high amount of distortion. As
a result, real world distances are not represented uniformly on the photograph. For
example, an inch measured in a steep area would relate to a much longer distance than an
inch measured over a flat surface such as a plain. Orthorectification is the name of the
process used to remove these sources of distortion to equilibrate photo units with real life
distances. Once an aerial photo has been orthorectified, it is commonly referred to as an
orthophoto. An interesting side note is while orthorectification removes horizontal
distortion, vertical relief displacement is still maintained. For example, the sides of a
building would still contain distortion.

3- Orthorectification Process
In a case like the Nebraska example, a simple rectification process like removing the
effects of the tilt of the camera may be all that is necessary. This is very rare and in most
cases a more involved process is required. After removing the effect of the camera tilt,
removing the effects of relief must be accomplished by knowing the elevation of the
terrain above (or below) the mapping plane must be known.
4-Methods
There are two methods by which rectification of an aerial photograph can occur. In the
first case, Ground Control Points (GCP) are determined either conventional ground
surveys, from published maps, by Global Positioning System (GPS) surveys, or by
aerotriangulation. These points are taken at visible physical features on the landscape. On
the corresponding image, the x, y photo coordinates are then determined for each
corresponding GCP. Depending on the type of algorithmic correction to be used, a

116

Digital Photogrammetry

Ch.9

Dr.Ghadi Zakarneh

minimum of 3 to 5 GCP must be established. The relationship of the x, y photo


coordinates to the real world GCP is then used to determine the algorithm for resampling
the image.
The second method of orthorectification is to use DEMs. These elevations are collected
from stereoscopic models by photogrammetric methods to form a digital elevation model
(DEM). As with using GCPs, the mathematical relationship between the real world
coordinates and the scanned aerial photograph is determined and the digital image is
resampled to create the rectified image.
For both cases, the resampling of the digital image involves warping the image so that
distance and area are uniform in relationship to real world measurements. This means that
with the resampled photo, an inch on the image now measures the same distance on steep
terrain as it does in a field.
Depending the on the needs of the aerial imagery in the GIS system, there are advantages
and disadvantages to using either method. GCP orthorectification is a faster process and
can be accomplished using existing paper maps to establish the GCPs. Using DEMs for
orthorectification is a more accurate process by which to geocode digital imagery but
require an existing DEM or DTM for processing.
Once an image has been orthorectified it can be used with vector and raster data of the
same coordinate system. This image can now have road outlines and street names
overlayed onto it. As mentioned before, spatial data can also now be accurately measured
in terms of distances and area, allowing for more complex spatial analysis.
4- Levels of rectification

Level 1: raw image.


Level 2: rectified image with the exclusive use of image acquisition parameters,
but without information on the relief. Such a product will be accessible when
one obtains the digital images with their orientation and localization parameters.
Level 3: image rectified by using image acquisition parameters and a DTM. The
result will be therefore an orthophotography.

117

Digital Photogrammetry

Ch.9

Dr.Ghadi Zakarneh

5- Steps of orthophotography

Images acquisition
Geometry of images is done by calculating the image orientation parameters:
omega, phi, kappa, XL, YL, and ZL.
Collecting DTM direct by the photogrammetry , or the use of existing DTMs.
Orthophoto computation: this can be done using the DTM and the image
orientation parameters. From the DTM the X Y and Z coordinates are measured
and using the collinearity equations the xy-image coordinates are calculated to get
the color (grey values). The calculated values of xy-image are in sub-pixels .
resampling methods have to be used to interpolate the grey level values.

Mosaic: the integration of a group of images (orthoimages) in on image. This


requires two steps
- Defining the line of join up, this defines a path that joins the two images in
common zone. This line must not be visible as possible. This can be

118

Digital Photogrammetry

Ch.9

Dr.Ghadi Zakarneh

automatically done by defining the path as a line with minimum


differences between the pixels grey values in the line.
Radiometric balancing, both images have different grey levels for each
pixels; this means that the resulting image will have different color
distribution. This problem can be solved by image enhancement
techniques like point operators and spatial filters.

119

Photogrametric project
In the project care the following steps and requirements:
1- Image scanning for both photos. use 20 micron resolution
2- Collection of ground control points. 5 points minimum.
3- Model orientation. To produce detailed map (e.g. buildings , streets and roads, tree,
power poles, telephone poles , walls etc)
4- Digitizing of ground objects.
5- DTM automatic creation.
6- Collection of ground check points to determine map accuracy and contour interval. At
least 20 check points. To use accuracy standards for testing: refer to photogrammetry 2
lecture notes appendix.
- 25 horizontal check points on well recognized objects.
- 25 vertical check points on open lands (not recognized objects: points on the
terrain), checked by overlaying the points over the DTM on ArcGIS, (spatial or
3d analyst extension has to be used).
7- Production of the final map using ArcGIS direct printing, or export to image with at
least 300dpi.
8- Production of orthophoto for the model area. Use bicubic image resampling.
- what is its accuracy and spatial resolution
- 5 or 2.5 contour interval has to be overlaid
- Coordinates grid with proper interval
9- Create mosaic for the whole area covered by both photos. Hebron contour map or
Westbank contour map can be used to create the DTM (DEM) to be used for
orthorectification of both photos. Bilinear image resampling.
The final products are:
Printed Details map for the model area.
Printed Orthomap for the model area.
Printed Mosaic for the orthorectified images.
CD-ROM of all project data, including ground control and check points as GISshapefiles.
Marks:
The marks of the project are 30% of both theoretical and the practical course:
10 marks: student work and efforts
10 marks: cartography
10 marks: accuracy testing analysis report and its discussion
NOTE: The student must have all data available for the final exam, and he maybe asked to
show some details on the PC.
Deadline: 10-12-2013.

120

Finished

Best of Luck
Sincerely Yours,
Dr.Eng. Ghadi Younis - Zakarneh
---------------------------------------------------------Lecturer in Palestine Polytechnic University
----------------------------------------------------------Palestine Polytechnic University
College of Engineering & Technology
Civil & Architectural Eng. Dept.
(B+) Building - Room (B+307)
Wadi Alhareya
Hebron
Palestine
P.O. Box :198
Tel: 00972-2-2233050
---------------------------------------------------------ghadi@engineer.com
email:
ghadi@gmx.net
web:
www.ghadi.de.tf
Facebook: fb.com/ghadi.zakarneh
-----------------------------------------------------------

121

Você também pode gostar