Image Processing

You might also like

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 66

Forecasting of Sudden Pedestrian Crossing for Safe Driving during

Nights by High Intensity Night Vision Camera

Abstract: -
Sudden pedestrian crossing (SPC) is the major reason for pedestrian-vehicle crashes. In this paper, we
focus on detecting SPCs at night for supporting an advanced driver assistance system using a far-
infrared (FIR) camera mounted on the front-roof of a vehicle. Although the thermal temperature of the
road is similar or higher than that of the pedestrians during summer nights, many previous researches
have focused on pedestrian detection during the winter, spring, or autumn seasons. However, our
research concentrates on SPC during the hot summer season because the number of collisions between
pedestrians and vehicles in Korea is higher at that time than during the other seasons. For real-time
processing, we first decide the optimal levels of the image scaling and search area. We then use our
proposed method for detecting virtual reference lines that are associated with road segmentation without
using color information, and change these lines according to the turning direction of the vehicle.
Pedestrian detection is conducted using a cascade random forest with low-dimensional Haar-like
features and oriented center symmetric-local binary patterns. The SPC prediction is assessed based on
the likelihood and the spatiotemporal features of the pedestrians, such as their overlapping ratio with
virtual reference lines, as well as the direction and magnitude of each pedestrian’s movement. The
proposed algorithm was successfully applied to various pedestrian dataset captured by an FIR camera,
and the results show that its SPC detection performance is better than those of other methods.
TABLE OF CONTENTS

CHAPTER NO. TITLE PAGE NO.

ABSTRACT

CHAPTER 1 : INTRODUCTION
1.1 GENERAL
1.2 GENERAL
1.2 OVERVIEW ABOUT DIGITAL IMAGE PROCESSING
1.2.1 PREPROCESSING
1.
1.2.2 IMAGE ENHANCEMENT

1.2.3 IMAGE RESTORATION:

1.2.4 IMAGE COMPRESSION

1.2.5 SEGMENTATION

1.2.6 IMAGE RESTORATION

1.2.7 FUNDAMENTAL STEPS


1.3 A SIMPLE IMAGE MODEL
1.4 IMAGE FILE FORMATS
1.5 TYPE OF IMAGES
1.5.1 BINARY IMAGES
1.5.2 GRAY SCALE IMAGE
1.5.3. COLOR IMAGE
1.5.4 INDEXED IMAGE
2. CHAPTER 2 :LITERATURE SURVEY

CHAPTER 3 : SOFTWARE SPECIFICATION

3.1 GENERAL
3.2 SOFTWARE REQUIREMENTS
3.3 INTRODUCTION
3.4 FEATURES OF MATLAB
3. 3.4.1 INTERFACING WITH OTHER LANGUAGES
3.5 THE MATLAB SYSTEM
3.5.1 DESKTOP TOOLS
3.5.2 ANALYZING AND ACCESSING DATA
3.5.3 PERFORMING NUMERIC COMPUTATION

CHAPTER 4 : IMPLEMENTATION
4. 4.1 GENERAL
4.2 CODING IMPLEMENTATION
4.3 SNAPSHOTS

5. CHAPTER 5 : APPLICATION

6. CHAPTER 6 : RESULTS AND DISCUSSION


6.1 CONCLUSION
6.2 REFERENCES

CHAPTER 1

INTRODUCTION
1.1GENERAL

Digital image processing is the use of computer algorithms to perform image processing
on digital images. The 2D continuous image is divided into N rows and M columns. The
intersection of a row and a column is called a pixel. The image can also be a function other
variables including depth, color, and time. An image given in the form of a transparency, slide,
photograph or an X-ray is first digitized and stored as a matrix of binary digits in computer
memory. This digitized image can then be processed and/or displayed on a high-resolution
television monitor. For display, the image is stored in a rapid-access buffer memory, which
refreshes the monitor at a rate of 25 frames per second to produce a visually continuous display.

1.2 OVERVIEW ABOUT DIGITAL IMAGE PROCESSING

The field of “Digital Image Processing” refers to processing the digital images by means of a
digital computer. In a broader sense, it can be considered as a processing of any two dimensional data,
where any image (optical information) is represented as an array of real or complex numbers
represented by a definite number of bits. An image is represented as a two dimensional function f(x,y),
where ‘x’ and ‘y’ are spatial (plane) coordinates and the amplitude of f at any pair of coordinates (x,y)
represents the intensity or gray level of the image at that point.

A digital image is one for which both the co-ordinates and the amplitude values of f are all finite,
discrete quantities. Hence, a digital image is composed of a finite number of elements, each of which has
a particular location value. These elements are called “pixels”. A digital image is discrete in both spatial
coordinates and brightness and it can be considered as a matrix whose rows and column indices identify
a point on the image and the corresponding matrix element value identifies the gray level at that point.

One of the first applications of digital images was in the newspaper industry, when pictures were
first sent by submarine cable between London and New York. Introduction of the Bartlane cable picture
transmission system in the early 1920s reduced the time required to transport a picture across the
Atlantic from more than a week to less than three hours.
Fig 1.1: FUNDAMENTAL BLOCKS OF DIGITAL IMAGE PROCESSING

1.2.1 PREPROCESSING

In imaging science, image processing is any form of signal processing for which the input is an
image, such as a photograph or video frame; the output of image processing may be either an image or a
set of characteristics or parameters related to the image. Most image-processing techniques involve
treating the image as a two-dimensional signal and applying standard signal-processing techniques to it.
Image processing usually refers to digital image processing, but optical and analog image
processing also are possible. This article is about general techniques that apply to all of them.
The acquisition of images (producing the input image in the first place) is referred to as imaging.

Image processing refers to processing of a 2D picture by a computer. Basic definitions:

An image defined in the “real world” is considered to be a function of two real variables, for
example, a(x,y) with a as the amplitude (e.g. brightness) of the image at the real coordinate position
(x,y). Modern digital technology has made it possible to manipulate multi-dimensional signals with
systems that range from simple digital circuits to advanced parallel computers. The goal of this
manipulation can be divided into three categories:
Image processing (image in -> image out)

Image Analysis (image in -> measurements out)

Image Understanding (image in -> high-level description out)

An image may be considered to contain sub-images sometimes referred to as regions-of-interest, ROIs,


or simply regions. This concept reflects the fact that images frequently contain collections of objects
each of which can be the basis for a region. In a sophisticated image processing system it should be
possible to apply specific image processing operations to selected regions. Thus one part of an image
(region) might be processed to suppress motion blur while another part might be processed to improve
colour rendition.

Most usually, image processing systems require that the images be available in digitized form, that is,
arrays of finite length binary words. For digitization, the given Image is sampled on a discrete grid and
each sample or pixel is quantized using a finite number of bits. The digitized image is processed by a
computer. To display a digital image, it is first converted into analog signal, which is scanned onto a
display. Closely related to image processing are computer graphics and computer vision. In computer
graphics, images are manually made from physical models of objects, environments, and lighting,
instead of being acquired (via imaging devices such as cameras) from natural scenes, as in most
animated movies. Computer vision, on the other hand, is often considered high-level image processing
out of which a machine/computer/software intends to decipher the physical contents of an image or a
sequence of images (e.g., videos or 3D full-body magnetic resonance scans).

In modern sciences and technologies, images also gain much broader scopes due to the ever growing
importance of scientific visualization (of often large-scale complex scientific/experimental data).
Examples include microarray data in genetic research, or real-time multi-asset portfolio trading in
finance. Before going to processing an image, it is converted into a digital form. Digitization includes
sampling of image and quantization of sampled values. After converting the image into bit information,
processing is performed. This processing technique may be Image enhancement, Image restoration, and
Image compression.
1.2.2 IMAGE ENHANCEMENT:

It refers to accentuation, or sharpening, of image features such as boundaries, or contrast to make


a graphic display more useful for display & analysis. This process does not increase the inherent
information content in data. It includes gray level & contrast manipulation, noise reduction, edge
crispening and sharpening, filtering, interpolation and magnification, pseudo coloring, and so on.

1.2.3 IMAGE RESTORATION:

It is concerned with filtering the observed image to minimize the effect of degradations. Effectiveness of
image restoration depends on the extent and accuracy of the knowledge of degradation process as well
as on filter design. Image restoration differs from image enhancement in that the latter is concerned with
more extraction or accentuation of image features.

1.2.4 IMAGE COMPRESSION:

It is concerned with minimizing the number of bits required to represent an image. Application of
compression are in broadcast TV, remote sensing via satellite, military communication via aircraft, radar,
teleconferencing, facsimile transmission, for educational & business documents, medical images that
arise in Computer tomography, magnetic resonance imaging and digital radiology, motion, pictures,
satellite images, weather maps, geological surveys and so on.

 Text compression – CCITT GROUP3 & GROUP4


 Still image compression – JPEG
 Video image compression – MPEG

1.2.5 SEGMENTATION

In computer vision, image segmentation is the process of partitioning a digital image into
multiple segments (sets of pixels, also known as super pixels). The goal of segmentation is to simplify
and/or change the representation of an image into something that is more meaningful and easier to
analyze. Image segmentation is typically used to locate objects and boundaries (lines, curves, etc.) in
images. More precisely, image segmentation is the process of assigning a label to every pixel in an
image such that pixels with the same label share certain visual characteristics.

The result of image segmentation is a set of segments that collectively cover the entire image, or
a set of contours extracted from the image (see edge detection). Each of the pixels in a region are similar
with respect to some characteristic or computed property, such as colour, intensity, or texture. Adjacent
regions are significantly different with respect to the same characteristic(s). When applied to a stack of
images, typical in medical imaging, the resulting contours after image segmentation can be used to
create 3D reconstructions with the help of interpolation algorithms like marching cubes.

1.2.6 IMAGE RESTORATION


Image restoration like enhancement improves the qualities of image but all the operations are
mainly based on known, measured, or degradations of the original image. Image restorations are used to
restore images with problems such as geometric distortion, improper focus, repetitive noise, and camera
motion. It is used to correct images for known degradations.
1.2.7 FUNDAMENTAL STEPS
 Image acquisition: to acquire a digital image
 Image preprocessing: to improve the image in ways that increases the chances for success of the
other processes.
 Image segmentation: to partitions an input image into its constituent parts or objects.
 Image representation: to convert the input data to a form suitable for computer processing.
 Image description: to extract features that result in some quantitative information of interest or
features that are basic for differentiating one class of objects from another.
 Image recognition: to assign a label to an object based on the information provided by its
descriptors.
 Image interpretation: to assign meaning to an ensemble of recognized objects.
 Knowledge about a problem domain is coded into an image processing system in the form of a
Knowledge database.

1.3 A SIMPLE IMAGE MODEL


 To be suitable for computer processing, an image f(x,y) must be digitalized both spatially and in
amplitude.
 Digitization of the spatial coordinates (x,y) is called image sampling.
 Amplitude digitization is called gray-level quantization.
 The storage and processing requirements increase rapidly with the spatial resolution and the
number of gray levels.
 Example: A 256 gray-level image of size 256x256 occupies 64K bytes of memory.
 Images of very low spatial resolution produce a checkerboard effect.
 The use of insufficient number of gray levels in smooth areas of a digital image results in false
contouring.

1.4 IMAGE FILE FORMATS


There are two general groups of ‘images’: vector graphics (or line art) and bitmaps (pixel-based or
‘images’). Some of the most common file formats are:

 GIF — Graphical interchange Format. An 8-bit (256 colour), non-destructively compressed


bitmap format. Mostly used for web. Has several sub-standards one of which is the animated
GIF.
 JPEG — Joint Photographic Experts Group. a very efficient (i.e. much information per byte)
destructively compressed 24 bit (16 million colours) bitmap format. Widely used, especially for
web and Internet (bandwidth-limited).
 TIFF — Tagged Image File Format. The standard 24 bit publication bitmap format. Compresses
non-destructively with, for instance, Lempel-Ziv-Welch (LZW) compression.
 PS — Postscript, a standard vector format. Has numerous sub-standards and can be difficult to
transport across platforms and operating systems.
 PSD – Adobe PhotoShop Document, a dedicated Photoshop format that keeps all the information
in an image including all the layers.
 BMP- bit map file format.

1.5 TYPE OF IMAGES


Images are 4 types
1. Binary image.
2. Gray scale image.
3. Color image.
4. Indexed image.
1.5.1 BINARY IMAGES
A binary image is a digital image that has only two possible values for each pixel. Typically the two
colors used for a binary image are black and white though any two colors can be used. Binary
images are also called bi-level or two-level. This means that each pixel is stored as a single bit—
i.e., a 0 or 1. The names black-and-white, B&W

1.5.2 GRAY SCALE IMAGE


In a (8-bit) grayscale image each picture element has an assigned intensity that ranges from 0 to 255. A
grey scale image is what people normally call a black and white image, but the name emphasizes that
such an image will also include many shades of grey.
Fig: gray scalee image

1.5.3. COLOR IMAGE

The RGB colour model relates very closely to the way we perceive colour with the r, g and b receptors
in our retinas. RGB uses additive colour mixing and is the basic colour model used in television or any
other medium that projects colour with light. It is the basic colour model used in computers and for web
graphics, but it cannot be used for print production.
The secondary colours of RGB – cyan, magenta, and yellow – are formed by mixing two of the primary
colours (red, green or blue) and excluding the third colour. Red and green combine to make yellow,
green and blue to make cyan, and blue and red form magenta. The combination of red, green, and blue in
full intensity makes white.

In Photoshop using the “screen” mode for the different layers in an image will make the intensities mix
together according to the additive colour mixing model. This is analogous to stacking slide images on
top of each other and shining light through them.
Figure : The additive model of RGB. Red, green, and blue are the primary stimuli for human colour
perception and are the primary additive colours.

CMYK The 4-colour CMYK model used in printing lays down overlapping layers of varying
percentages of transparent cyan (C), magenta (M) and yellow (Y) inks. In addition a layer of black (K)
ink can be added. The CMYK model uses the subtractive colour model.

Figure: The colours created by the subtractive model of CMYK don't look exactly like the colours
created in the additive model of RGB Most importantly, CMYK cannot reproduce the brightness of
RGB colours.

1.5.4 INDEXED IMAGE


An indexed image consists of an array and a color map matrix. The pixel values in the array are
direct indices into a color map. By convention, this documentation uses the variable name X to refer to
the array and map to refer to the color map. In computing, indexed color is a technique to manage digital
images' colors in a limited fashion, in order to save computer memory and file storage, while speeding
up display refresh and file transfers. It is a form of vector quantization compression.

When an image is encoded in this way, color information is not directly carried by the image pixel data,
but is stored in a separate piece of data called a palette: an array of color elements, in which every
element, a color, is indexed by its position within the array. The image pixels do not contain the full
specification of its color, but only its index in the palette. This technique is sometimes referred as
pseudocolor or indirect color, as colors are addressed indirectly.

Perhaps the first device that supported palette colors was a random-access frame buffer, described in
1975 by Kajiya, Sutherland and Cheadle. This supported a palette of 256 36-bit RGB colors.

1.6 Applications of image processing


 Interest in digital image processing methods stems from 2 principal application areas:
1) Improvement of pictorial information for human interpretation.
2) Processing of scene data for autonomous machine perception.
 In the second application area, interest focuses on procedures for extracting from an image
 Information in a form suitable for computer processing.
 Examples include automatic character recognition, industrial machine vision for product
assembly and inspection, military recognizance, automatic processing of fingerprints etc.

What is DIP?

An image may be defined as a two-dimensional function f(x, y), where x & y are spatial
coordinates, & the amplitude of f at any pair of coordinates (x, y) is called the intensity or gray level of
the image at that point. When x, y & the amplitude values of f are all finite discrete quantities, we call
the image a digital image. The field of DIP refers to processing digital image by means of digital
computer. Digital image is composed of a finite number of elements, each of which has a particular
location & value. The elements are called pixels.

Vision is the most advanced of our sensor, so it is not surprising that image play the single most
important role in human perception. However, unlike humans, who are limited to the visual band of the
EM spectrum imaging machines cover almost the entire EM spectrum, ranging from gamma to radio
waves. They can operate also on images generated by sources that humans are not accustomed to
associating with image.

There is no general agreement among authors regarding where image processing stops & other
related areas such as image analysis& computer vision start. Sometimes a distinction is made by
defining image processing as a discipline in which both the input & output at a process are images. This
is limiting & somewhat artificial boundary. The area of image analysis (image understanding) is in
between image processing & computer vision.

There are no clear-cut boundaries in the continuum from image processing at one end to complete
vision at the other. However, one useful paradigm is to consider three types of computerized processes in
this continuum: low-, mid-, & high-level processes. Low-level process involves primitive operations
such as image processing to reduce noise, contrast enhancement & image sharpening. A low- level
process is characterized by the fact that both its inputs & outputs are images. Mid-level process on
images involves tasks such as segmentation, description of that object to reduce them to a form suitable
for computer processing & classification of individual objects. A mid-level process is characterized by
the fact that its inputs generally are images but its outputs are attributes extracted from those images.
Finally higher- level processing involves “Making sense” of an ensemble of recognized objects, as in
image analysis & at the far end of the continuum performing the cognitive functions normally associated
with human vision.

Digital image processing, as already defined is used successfully in a broad range of areas of
exceptional social & economic value.

What is an image?

An image is represented as a two dimensional function f(x, y) where x and y are spatial co-
ordinates and the amplitude of ‘f’ at any pair of coordinates (x, y) is called the intensity of the image at
that point.
Gray scale image:

A grayscale image is a function I (xylem) of the two spatial coordinates of the image plane.

I(x, y) is the intensity of the image at the point (x, y) on the image plane.

I (xylem) takes non-negative values assume the image is bounded by a rectangle [0, a] [0, b]I: [0, a] 
[0, b]  [0, info)

Color image:

It can be represented by three functions, R (xylem) for red, G (xylem) for green and B
(xylem) for blue.

An image may be continuous with respect to the x and y coordinates and also in
amplitude. Converting such an image to digital form requires that the coordinates as well as the
amplitude to be digitized. Digitizing the coordinate’s values is called sampling. Digitizing the amplitude
values is called quantization.

Coordinate convention:

The result of sampling and quantization is a matrix of real numbers. We use two principal ways to
represent digital images. Assume that an image f(x, y) is sampled so that the resulting image has M rows
and N columns. We say that the image is of size M X N. The values of the coordinates (xylem) are
discrete quantities. For notational clarity and convenience, we use integer values for these discrete
coordinates. In many image processing books, the image origin is defined to be at (xylem)=(0,0).The
next coordinate values along the first row of the image are (xylem)=(0,1).It is important to keep in mind
that the notation (0,1) is used to signify the second sample along the first row. It does not mean that
these are the actual values of physical coordinates when the image was sampled. Following figure shows
the coordinate convention. Note that x ranges from 0 to M-1 and y from 0 to N-1 in integer increments.

The coordinate convention used in the toolbox to denote arrays is different from the preceding
paragraph in two minor ways. First, instead of using (xylem) the toolbox uses the notation (race) to
indicate rows and columns. Note, however, that the order of coordinates is the same as the order
discussed in the previous paragraph, in the sense that the first element of a coordinate topples, (alb),
refers to a row and the second to a column. The other difference is that the origin of the coordinate
system is at (r, c) = (1, 1); thus, r ranges from 1 to M and c from 1 to N in integer increments. IPT
documentation refers to the coordinates. Less frequently the toolbox also employs another coordinate
convention called spatial coordinates which uses x to refer to columns and y to refers to rows. This is the
opposite of our use of variables x and y.

Image as Matrices

The preceding discussion leads to the following representation for a digitized image function:

f (0, 0) f (0, 1) ……….. f (0, N-1)

f (1, 0) f (1, 1) ………… f (1, N-1)

f (xylem) = . . .

. . .

f (M-1, 0) f (M-1, 1) ………… f (M-1, N-1)

The right side of this equation is a digital image by definition. Each element of this array is
called an image element, picture element, pixel or pel. The terms image and pixel are used throughout
the rest of our discussions to denote a digital image and its elements.

A digital image can be represented naturally as a MATLAB matrix:

f (1, 1) f (1, 2) ……. f (1, N)

f (2, 1) f (2, 2) …….. f (2, N)

. . .

f= . . .

f (M, 1) f (M, 2) …….f (M, N)

Where f (1, 1) = f (0, 0) (note the use of a monoscope font to denote MATLAB quantities).
Clearly the two representations are identical, except for the shift in origin. The notation f (p, q) denotes
the element located in row p and the column q. For example f (6, 2) is the element in the sixth row and
second column of the matrix f. typically we use the letters M and N respectively to denote the number of
rows and columns in a matrix. A 1xN matrix is called a row vector whereas an Mx1 matrix is called a
column vector. A 1x1 matrix is a scalar.

Matrices in MATLAB are stored in variables with names such as A, a, RGB, real array and so on.
Variables must begin with a letter and contain only letters, numerals and underscores. As noted in the
previous paragraph, all MATLAB quantities are written using monoscope characters. We use
conventional Roman, italic notation such as f(x, y), for mathematical expressions

Reading Images

Images are read into the MATLAB environment using function imread whose syntax is

imread(‘filename’)

Format name Description recognized extension

TIFF Tagged Image File Format .tif, .tiff

JPEG Joint Photograph Experts Group .jpg, .jpeg

GIF Graphics Interchange Format .gif

BMP Windows Bitmap .bmp

PNG Portable Network Graphics .png

XWD X Window Dump .xwd

Here filename is a spring containing the complete of the image file(including any applicable
extension).For example the command line

>> f = imread (‘8. jpg’);

reads the JPEG (above table) image chestxray into image array f. Note the use of single quotes (‘) to
delimit the string filename. The semicolon at the end of a command line is used by MATLAB for
suppressing output. If a semicolon is not included. MATLAB displays the results of the operation(s)
specified in that line. The prompt symbol(>>) designates the beginning of a command line, as it appears
in the MATLAB command window.

When as in the preceding command line no path is included in filename, imread reads the file from
the current directory and if that fails it tries to find the file in the MATLAB search path. The simplest
way to read an image from a specified directory is to include a full or relative path to that directory in
filename.

For example,

>> f = imread ( ‘D:\myimages\chestxray.jpg’);

reads the image from a folder called my images on the D: drive, whereas

>> f = imread(‘ . \ myimages\chestxray .jpg’);

reads the image from the my images subdirectory of the current of the current working directory.
The current directory window on the MATLAB desktop toolbar displays MATLAB’s current working
directory and provides a simple, manual way to change it. Above table lists some of the most of the
popular image/graphics formats supported by imread and imwrite.

Function size gives the row and column dimensions of an image:

>> size (f)

ans = 1024 * 1024

This function is particularly useful in programming when used in the following form to determine
automatically the size of an image:

>>[M,N]=size(f);

This syntax returns the number of rows(M) and columns(N) in the image.

The whole function displays additional information about an array. For instance ,the statement
>> whos f

gives

Name size Bytes Class

F 1024*1024 1048576 unit8 array

Grand total is 1048576 elements using 1048576 bytes

The unit8 entry shown refers to one of several MATLAB data classes. A semicolon at the end of a
whose line has no effect ,so normally one is not used.

Displaying Images:

Images are displayed on the MATLAB desktop using function imshow, which has the basic syntax:

imshow(f,g)

Where f is an image array, and g is the number of intensity levels used to display it. If g is
omitted ,it defaults to 256 levels .using the syntax

Imshow (f, {low high})

Displays as black all values less than or equal to low and as white all values greater than or
equal to high. The values in between are displayed as intermediate intensity values using the default
number of levels .Finally the syntax

Imshow(f,[ ])

Sets variable low to the minimum value of array f and high to its maximum value. This
form of imshow is useful for displaying images that have a low dynamic range or that have positive and
negative values.

Function pixval is used frequently to display the intensity values of individual pixels interactively.
This function displays a cursor overlaid on an image. As the cursor is moved over the image with the
mouse the coordinates of the cursor position and the corresponding intensity values are shown on a
display that appears below the figure window .When working with color images, the coordinates as well
as the red, green and blue components are displayed. If the left button on the mouse is clicked and then
held pressed, pixval displays the Euclidean distance between the initial and current cursor locations.

The syntax form of interest here is Pixval which shows the cursor on the last image displayed.
Clicking the X button on the cursor window turns it off.

The following statements read from disk an image called rose_512.tif extract basic information
about the image and display it using imshow :

>>f=imread(‘rose_512.tif’);

>>whos f

Name Size Bytes Class

F 512*512 262144 unit8 array

Grand total is 262144 elements using 262144 bytes

>>imshow(f)

A semicolon at the end of an imshow line has no effect, so normally one is not used. If
another image,g, is displayed using imshow, MATLAB replaces the image in the screen with the new
image. To keep the first image and output a second image, we use function figure as follows:

>>figure ,imshow(g)

Using the statement

>>imshow(f),figure ,imshow(g) displays both images.

Note that more than one command can be written on a line ,as long as different commands are
properly delimited by commas or semicolons. As mentioned earlier, a semicolon is used whenever it is
desired to suppress screen outputs from a command line.
Suppose that we have just read an image h and find that using imshow produces the image. It is
clear that this image has a low dynamic range, which can be remedied for display purposes by using the
statement.

>>imshow(h,[ ])

WRITING IMAGES:

Images are written to disk using function imwrite, which has the following basic syntax:

Imwrite (f,’filename’)

With this syntax, the string contained in filename must include a recognized file format extension
.Alternatively, the desired format can be specified explicitly with a third input argument.
>>imwrite(f,’patient10_run1’,’tif’)

Or alternatively

For example the following command writes f to a TIFF file named patient10_run1:

>>imwrite(f,’patient10_run1.tif’)

If filename contains no path information, then imwrite saves the file in the current working
directory.

The imwrite function can have other parameters depending on e file format selected. Most of the
work in the following deals either with JPEG or TIFF images ,so we focus attention here on these two
formats.

More general imwrite syntax applicable only to JPEG images is

imwrite(f,’filename.jpg,,’quality’,q)

where q is an integer between 0 and 100(the lower number the higher the degradation due to JPEG
compression).

For example, for q=25 the applicable syntax is


>> imwrite(f,’bubbles25.jpg’,’quality’,25)

The image for q=15 has false contouring that is barely visible, but this effect becomes quite
pronounced for q=5 and q=0.Thus, an expectable solution with some margin for error is to compress the
images with q=25.In order to get an idea of the compression achieved and to obtain other image file
details, we can use function imfinfo which has syntax.

Imfinfo filename

Here filename is the complete file name of the image stored in disk.

For example,

>> imfinfo bubbles25.jpg

outputs the following information(note that some fields contain no information in this case):

Filename: ‘bubbles25.jpg’

FileModDate: ’04-jan-2003 12:31:26’

FileSize: 13849

Format: ‘jpg’

Format Version: ‘‘

Width: 714

Height: 682

Bit Depth: 8

Color Depth: ‘grayscale’

Format Signature: ‘‘

Comment: {}
Where file size is in bytes. The number of bytes in the original image is corrupted simply by
multiplying width by height by bit depth and dividing the result by 8. The result is 486948.Dividing this
file size gives the compression ratio:(486948/13849)=35.16.This compression ratio was achieved. While
maintaining image quality consistent with the requirements of the appearance. In addition to the obvious
advantages in storage space, this reduction allows the transmission of approximately 35 times the
amount of un compressed data per unit time.

The information fields displayed by imfinfo can be captured in to a so called structure variable that
can be for subsequent computations. Using the receding an example and assigning the name K to the
structure variable.

We use the syntax >>K=imfinfo(‘bubbles25.jpg’);

To store in to variable K all the information generated by command imfinfo, the information
generated by imfinfo is appended to the structure variable by means of fields, separated from K by a
dot. For example, the image height and width are now stored in structure fields K. Height and K. width.

As an illustration, consider the following use of structure variable K to commute the compression ratio
for bubbles25.jpg:

>> K=imfinfo(‘bubbles25.jpg’);

>> image_ bytes =K.Width* K.Height* K.Bit Depth /8;

>> Compressed_ bytes = K.FilesSize;

>> Compression_ ratio=35.162

Note that iminfo was used in two different ways. The first was t type imfinfo bubbles25.jpg at the
prompt, which resulted in the information being displayed on the screen. The second was to type
K=imfinfo (‘bubbles25.jpg’),which resulted in the information generated by imfinfo being stored in K.
These two different ways of calling imfinfo are an example of command_ function duality, an important
concept that is explained in more detail in the MATLAB online documentation.

More general imwrite syntax applicable only to tif images has the form
Imwrite(g,’filename.tif’,’compression’,’parameter’,….’resloution’,[colres rowers] )

Where ‘parameter’ can have one of the following principal values: ‘none’ indicates no
compression, ‘pack bits’ indicates pack bits compression (the default for non ‘binary images’) and ‘ccitt’
indicates ccitt compression. (the default for binary images).The 1*2 array [colres rowers]

Contains two integers that give the column resolution and row resolution in dot per_ unit (the default
values). For example, if the image dimensions are in inches, colres is in the number of dots(pixels)per
inch (dpi) in the vertical direction and similarly for rowers in the horizontal direction. Specifying the
resolution by single scalar, res is equivalent to writing [res res].

>>imwrite(f,’sf.tif’,’compression’,’none’,’resolution’,……………..[300 300])

the values of the vector[colures rows] were determined by multiplying 200 dpi by the ratio 2.25/1.5,
which gives 30 dpi. Rather than do the computation manually, we could write

>> res=round(200*2.25/1.5);

>>imwrite(f,’sf.tif’,’compression’,’none’,’resolution’,res)

where its argument to the nearest integer.It function round rounds is important to note that the
number of pixels was not changed by these commands. Only the scale of the image changed. The
original 450*450 image at 200 dpi is of size 2.25*2.25 inches. The new 300_dpi image is identical,
except that is 450*450 pixels are distributed over a 1.5*1.5_inch area. Processes such as this are useful
for controlling the size of an image in a printed document with out sacrificing resolution.

Often it is necessary to export images to disk the way they appear on the MATLAB desktop. This
is especially true with plots .The contents of a figure window can be exported to disk in two ways. The
first is to use the file pull-down menu is in the figure window and then choose export. With this option
the user can select a location, filename, and format. More control over export parameters is obtained by
using print command:

Print-fno-dfileformat-rresno filename
Where no refers to the figure number in the figure window interest, file format refers one of the
file formats in table above. ‘resno’ is the resolution in dpi, and filename is the name we wish to assign
the file.

If we simply type print at the prompt, MATLAB prints (to the default printer) the contents of the
last figure window displayed. It is possible also to specify other options with print, such as specific
printing device.

CHAPTER 2

LITERATURE SURVEY

A. Pedestrian Detection using Visible Light Images


The video camera technology used in capturing visible light images is mature and cost effective, and
many researchers are therefore using visible light images for pedestrian detection under ideal lighting
conditions. Recent studies on pedestrian detection using visible light images are as follows.

Dollár et aldemonstrated that integral channel features that are multiple registered image channels
not only outperform other features, including histogram of oriented gradient (HOG), but also have few
parameters and are insensitive to exact parameter settings. They showed experimentally that the
proposed features allow for more accurate spatial localization during detection and result in fast
detection when coupled with cascade classifiers.

Felzenszwalb et al. proposed a system for pedestrian detection based on mixtures of multiscale
deformable part models and a latent support vector machine (SVM). Deformable part models are defined
by a coarse root filter that approximately covers an entire object and higher resolution part filters that
cover smaller parts of the object.

Vinicius and Borges proposed using the cues of a cyclic behavior in the blob trajectory and an in-
phase relationship between the change in blob size and position for detecting pedestrians. To achieve
performance improvement, they combined these features using the Bayes classifier.

Marin et al.’s method combined multiple local experts by means of a Random Forest ensemble based
on rich block-based representations.Because the same features are reused by the multiple local experts,
this method does not require additional computational cost as compared to a holistic method.

In studies that used visible light images, pedestrian detection was also analyzed in a different
perspective:

Anwer et al. introduced the notion that the opponent colors (OPP) space gives a better pedestrian
detection performance. They fed the OPP space into the baseline framework of Dollár et al. based on
RGB color space, HOG features, and a linear SVM classifier. In they also trained and tested the part-
based human classifier based on the HOG on top of OPP and demonstrated that an OPP-based method
outperforms general RGB-based methods.

Zhang et al. proposed using average contrast maps to address the challenge of pedestrian detection in
street scenes. In this study, they designed a local statistical multichannel descriptor to incorporate both
color and gradient information and introduced a method for selecting the most discriminative features
for classifying pedestrians.
Although pedestrian detection methods based on visible light images have already shown a reliable
performance using color information when the illumination is constant and the target image quality is
good pedestrian detection in color images is ineffective in environments with poor illumination, such as
at night, in darkened tunnels, or on rainy days. In addition, the separation of pedestrians from a cluttered
background and the camera movement remain difficult problems.

Pedestrian Detection using Infrared Camera

To resolve this limitation of visible light images, infrared (IR) camera based pedestrian
detection has been receiving attention in recent years. Representative IR cameras include
NIR and FIR cameras. NIR cameras are accompanied by an illuminator for nighttime use,
and are less expensive than FIR cameras. NIR cameras produce images that resemble
monochrome visible-light images, and thus standard image processing techniques can be
easily modified for an NIR image analysis As a representative pedestrian detection
system using an NIR camera.

Broggi et al. used an NIR camera on a moving vehicle for pedestrian detection. As the
first step, this method enhances the bright areas in the images and surrounds them with a
rectangular perimeter to reduce their size. The candidate areas are then passed to a second
phase evaluation and the content of such bounding box is estimated by combining two
weighted matching methods.

Ge et al. proposed a tree-structured detector using the images captured by a monocular


NIR camera. This method trains separate classifiers on disjoint subsets of different sizes,
and arranges the classifiers in a coarse-to-fine manner based on the Haar-like and HOG
features. However, when a pedestrian is standing under or in front of a backlight, the
pedestrian may be indistinguishable from the background, which is a similar case of a
visible light camera. In contrast, FIR cameras, especially for long-wavelength infrared,
are sensitive to the radiation emitted by the human body, and are hence very effective for
pedestrian detection, especially at night [regardless of the lighting conditions and body
postures. FIR cameras are relatively more expensive than video and NIR cameras.
However, FIR cameras have become much cheaper, with prices reaching as low as $1,000
USD in recent years, and luxury cars have already been offering systems to increase the
range of sight within the vehicle by displaying FIR images.

Many researchers have shown interest in FIR cameras for automatic pedestrian detection
because they provide important human body features, such as hotspots for candidate
selection.

Xu et al.proposed a pedestrian detection system based on the assumption that the human
body appears brighter than the background. To search for hotspot regions, several
detection phases are conducted using a SVM with size-normalized pedestrian candidates.
Inspired by Xu et al.’s idea, Ko et al. also detect pedestrians by analyzing hotspot
regions, including the face and shoulder areas, and verify the candidate hot spot regions
using a random forest classifier. Although hotspot-based pedestrian detection provides
reasonable results on the front of the face or for images taken during the winter, it
produces large missing areas when the pedestrians are wearing well-insulated clothing,
during a hot summer, or when the pedestrians are walking away (only the back of their
head is visible).

Bertozzi et al. proposed a pedestrian detection technique that combines two FIR cameras
into a single stereo system. This system exploits three different detection approaches,
i.e., warm area detection, edge-based detection, and disparity computations. A candidate
region is validated using the morphological and thermal characteristics of the
pedestrian’s head.

O’Malley et al. detect potential pedestrians using vertically biased morphological


closing for compensating clothing-based distortions. The potential pedestrians are then
segmented using feature-based region-growth with high intensity seeds. A SVM
classifier with HOG features is used for verification.
In spite of the deterministic advantages of FIR cameras, they still have the following
limitations: i) background objects, such as buildings, cars, animals, and light-poles, often
have thermal energies similar to those of humans, and ii) pedestrians cannot be
distinguishable from the road during a hot summer night.
CHAPTER 3

SOFTWARE SPECIFICATION

MATLAB (matrix laboratory) is a numerical computing environment and fourth-generation programming


language. Developed by Math Works, MATLAB allows matrix manipulations, plotting of functions and
data, implementation of algorithms, creation of user interfaces, and interfacing with programs written in
other languages, including C, C++, Java, and Fortran.

Although MATLAB is intended primarily for numerical computing, an optional toolbox uses
the MuPADsymbolic engine, allowing access to symbolic computing capabilities. An additional
package, Simulink, adds graphical multi-domain simulation and Model-Based
Design for dynamic and embedded systems.

In 2004, MATLAB had around one million users across industry and academia. MATLAB
users come from various backgrounds of engineering, science, and economics. MATLAB is widely used in
academic and research institutions as well as industrial enterprises.

MATLAB was first adopted by researchers and practitioners in control engineering, Little's
specialty, but quickly spread to many other domains. It is now also used in education, in particular the
teaching of linear algebra and numerical analysis, and is popular amongst scientists involved in image
processing. The MATLAB application is built around the MATLAB language. The simplest way to
execute MATLAB code is to type it in the Command Window, which is one of the elements of the
MATLAB Desktop. When code is entered in the Command Window, MATLAB can be used as an
interactive mathematical shell. Sequences of commands can be saved in a text file, typically using the
MATLAB Editor, as a script or encapsulated into a function, extending the commands available.

MATLAB provides a number of features for documenting and sharing your work. You can
integrate your MATLAB code with other languages and applications, and distribute your MATLAB
algorithms and applications.

3.2 FEATURES OF MATLAB

 High-level language for technical computing.


 Development environment for managing code, files, and data.
 Interactive tools for iterative exploration, design, and problem solving.
 Mathematical functions for linear algebra, statistics, Fourier analysis,
filtering, optimization, and numerical integration.
 2-D and 3-D graphics functions for visualizing data.
 Tools for building custom graphical user interfaces.
 Functions for integrating MATLAB based algorithms with external applications and
languages, such as C, C++, FORTRAN, Java™, COM, and Microsoft Excel.
MATLAB is used in vast area, including signal and image processing, communications, control
design, test and measurement, financial modeling and analysis, and computational. Add-on toolboxes
(collections of special-purpose MATLAB functions) extend the MATLAB environment to solve
particular classes of problems in these application areas.

MATLAB can be used on personal computers and powerful server systems, including
the Cheaha compute cluster. With the addition of the Parallel Computing Toolbox, the language can be
extended with parallel implementations for common computational functions, including for-loop
unrolling. Additionally this toolbox supports offloading computationally intensive workloads
to Cheaha the campus compute cluster. MATLAB is one of a few languages in which each variable is a
matrix (broadly construed) and "knows" how big it is. Moreover, the fundamental operators (e.g.
addition, multiplication) are programmed to deal with matrices when required. And the MATLAB
environment handles much of the bothersome housekeeping that makes all this possible. Since so many
of the procedures required for Macro-Investment Analysis involves matrices, MATLAB proves to be an
extremely efficient language for both communication and implementation.

3.2.1 INTERFACING WITH OTHER LANGUAGES

MATLAB can call functions and subroutines written in the C programming


language or FORTRAN. A wrapper function is created allowing MATLAB data types to be passed and
returned. The dynamically loadable object files created by compiling such functions are termed "MEX-
files" (for MATLAB executable).

Libraries written in Java, ActiveX or .NET can be directly called from MATLAB and many
MATLAB libraries (for example XML or SQL support) are implemented as wrappers around Java or
ActiveX libraries. Calling MATLAB from Java is more complicated, but can be done with MATLAB
extension, which is sold separately by Math Works, or using an undocumented mechanism called JMI
(Java-to-Mat lab Interface), which should not be confused with the unrelated Java that is also called JMI.

As alternatives to the MuPAD based Symbolic Math Toolbox available from Math Works,
MATLAB can be connected to Maple or Mathematical.

Libraries also exist to import and export MathML.

Development Environment
 Startup Accelerator for faster MATLAB startup on Windows, especially on Windows XP,
and for network installations.
 Spreadsheet Import Tool that provides more options for selecting and loading mixed textual
and numeric data.
 Readability and navigation improvements to warning and error messages in the MATLAB
command window.
 Automatic variable and function renaming in the MATLAB Editor.
Developing Algorithms and Applications

MATLAB provides a high-level language and development tools that let you quickly
develop and analyze your algorithms and applications.

The MATLAB Language

The MATLAB language supports the vector and matrix operations that are fundamental to
engineering and scientific problems. It enables fast development and execution. With the MATLAB
language, you can program and develop algorithms faster than with traditional languages because you do
not need to perform low-level administrative tasks, such as declaring variables, specifying data types,
and allocating memory. In many cases, MATLAB eliminates the need for ‘for’ loops. As a result, one
line of MATLAB code can often replace several lines of C or C++ code.

At the same time, MATLAB provides all the features of a traditional programming language,
including arithmetic operators, flow control, data structures, data types, object-oriented
programming (OOP), and debugging features.

MATLAB lets you execute commands or groups of commands one at a time, without compiling
and linking, enabling you to quickly iterate to the optimal solution. For fast execution of heavy matrix
and vector computations, MATLAB uses processor-optimized libraries. For general-purpose scalar
computations, MATLAB generates machine-code instructions using its JIT (Just-In-Time) compilation
technology.

This technology, which is available on most platforms, provides execution speeds that rival
those of traditional programming languages.

Development Tools

MATLAB includes development tools that help you implement your algorithm efficiently.
These include the following:

MATLAB Editor

Provides standard editing and debugging features, such as setting breakpoints and single stepping
Code Analyzer

Checks your code for problems and recommends modifications to maximize performance and
maintainability

MATLAB Profiler

Records the time spent executing each line of code

Directory Reports

Scan all the files in a directory and report on code efficiency, file differences, file
dependencies, and code coverage

Designing Graphical User Interfaces

By using the interactive tool GUIDE (Graphical User Interface Development Environment) to
layout, design, and edit user interfaces. GUIDE lets you include list boxes, pull-down menus, push
buttons, radio buttons, and sliders, as well as MATLAB plots and Microsoft ActiveX ® controls.
Alternatively, you can create GUIs programmatically using MATLAB functions.

3.2.2 ANALYZING AND ACCESSING DATA

MATLAB supports the entire data analysis process, from acquiring data from external devices
and databases, through preprocessing, visualization, and numerical analysis, to producing presentation-
quality output.

Data Analysis

MATLAB provides interactive tools and command-line functions for data analysis operations, including:

 Interpolating and decimating


 Extracting sections of data, scaling, and averaging
 Thresholding and smoothing
 Correlation, Fourier analysis, and filtering
 1-D peak, valley, and zero finding
 Basic statistics and curve fitting
 Matrix analysis
Data Access

MATLAB is an efficient platform for accessing data from files, other applications,
databases, and external devices. You can read data from popular file formats, such as Microsoft Excel;
ASCII text or binary files; image, sound, and video files; and scientific files, such as HDF and HDF5.
Low-level binary file I/O functions let you work with data files in any format. Additional functions let
you read data from Web pages and XML.

Visualizing Data

All the graphics features that are required to visualize engineering and scientific data are
available in MATLAB. These include 2-D and 3-D plotting functions, 3-D volume visualization
functions, tools for interactively creating plots, and the ability to export results to all popular graphics
formats. You can customize plots by adding multiple axes; changing line colors and markers; adding
annotation, Latex equations, and legends; and drawing shapes.

2-D Plotting

Visualizing vectors of data with 2-D plotting functions that create:

 Line, area, bar, and pie charts.


 Direction and velocity plots.
 Histograms.
 Polygons and surfaces.
 Scatter/bubble plots.
 Animations.
3-D Plotting and Volume Visualization

MATLAB provides functions for visualizing 2-D matrices, 3-D scalar, and 3-D vector data.
You can use these functions to visualize and understand large, often complex, multidimensional data.
Specifying plot characteristics, such as camera viewing angle, perspective, lighting effect, light source
locations, and transparency.

3-D plotting functions include:

 Surface, contour, and mesh.


 Image plots.
 Cone, slice, stream, and iso surface.
3.2.3 PERFORMING NUMERIC COMPUTATION

MATLAB contains mathematical, statistical, and engineering functions to support all common
engineering and science operations. These functions, developed by experts in mathematics, are the
foundation of the MATLAB language. The core math functions use the LAPACK and BLAS linear
algebra subroutine libraries and the FFTW Discrete Fourier Transform library. Because these processor-
dependent libraries are optimized to the different platforms that MATLAB supports, they execute faster
than the equivalent C or C++ code. MATLAB provides the following types of functions for performing
mathematical operations and analyzing data:
 Matrix manipulation and linear algebra.
 Polynomials and interpolation.
 Fourier analysis and filtering.
 Data analysis and statistics.
 Optimization and numerical integration.
 Ordinary differential equations (ODEs).
 Partial differential equations (PDEs).
 Sparse matrix operations.
MATLAB can perform arithmetic on a wide range of data types, including doubles, singles,
and integers.

MATLAB is a high-performance language for technical computing. It integrates computation, visualization, and
programming in an easy-to-use environment where problems and solutions are expressed in familiar
mathematical notation. MATLAB stands for matrix laboratory, and was written originally to provide easy access to
matrix software developed by LINPACK (linear system package) and EISPACK (Eigen system package) projects.
MATLAB is therefore built on a foundation of sophisticated matrix software in which the basic element is array
that does not require pre dimensioning which to solve many technical computing problems, especially those with
matrix and vector formulations, in a fraction of time.

MATLAB features a family of applications specific solutions called toolboxes. Very important to
most users of MATLAB, toolboxes allow learning and applying specialized technology. These are
comprehensive collections of MATLAB functions (M-files) that extend the MATLAB environment to
solve particular classes of problems. Areas in which toolboxes are available include signal processing,
control system, neural networks, fuzzy logic, wavelets, simulation and many others.
Typical uses of MATLAB include: Math and computation, Algorithm development, Data
acquisition, Modeling, simulation, prototyping, Data analysis, exploration, visualization, Scientific and
engineering graphics, Application development, including graphical user interface building.

A.2 Basic Building Blocks of MATLAB

The basic building block of MATLAB is MATRIX. The fundamental data type is the array.
Vectors, scalars, real matrices and complex matrix are handled as specific class of this basic data type.
The built in functions are optimized for vector operations. No dimension statements are required for
vectors or arrays.

A.2.1 MATLAB Window

The MATLAB works based on five windows: Command window, Workspace window, Current
directory window, Command history window, Editor Window, Graphics window and Online-help
window.

A.2.1.1 Command Window


The command window is where the user types MATLAB commands and expressions at the
prompt (>>) and where the output of those commands is displayed. It is opened when the application
program is launched. All commands including user-written programs are typed in this window at
MATLAB prompt for execution.

A.2.1.2 Work Space Window

MATLAB defines the workspace as the set of variables that the user creates in a work session.
The workspace browser shows these variables and some information about them. Double clicking on a
variable in the workspace browser launches the Array Editor, which can be used to obtain information.

A.2.1.3 Current Directory Window

The current Directory tab shows the contents of the current directory, whose path is shown in the
current directory window. For example, in the windows operating system the path might be as follows:
C:\MATLAB\Work, indicating that directory “work” is a subdirectory of the main directory
“MATLAB”; which is installed in drive C. Clicking on the arrow in the current directory window shows
a list of recently used paths. MATLAB uses a search path to find M-files and other MATLAB related
files. Any file run in MATLAB must reside in the current directory or in a directory that is on search
path.

A.2.1.4 Command History Window

The Command History Window contains a record of the commands a user has entered in the
command window, including both current and previous MATLAB sessions. Previously entered
MATLAB commands can be selected and re-executed from the command history window by right
clicking on a command or sequence of commands. This is useful to select various options in addition to
executing the commands and is useful feature when experimenting with various commands in a work
session.

A.2.1.5 Editor Window

The MATLAB editor is both a text editor specialized for creating M-files and a graphical
MATLAB debugger. The editor can appear in a window by itself, or it can be a sub window in the
desktop. In this window one can write, edit, create and save programs in files called M-files.
MATLAB editor window has numerous pull-down menus for tasks such as saving, viewing, and
debugging files. Because it performs some simple checks and also uses color to differentiate between
various elements of code, this text editor is recommended as the tool of choice for writing and editing
M-functions.

A.2.1.6 Graphics or Figure Window

The output of all graphic commands typed in the command window is seen in this window.
A.2.1.7 Online Help Window

MATLAB provides online help for all it’s built in functions and programming language
constructs. The principal way to get help online is to use the MATLAB help browser, opened as a
separate window either by clicking on the question mark symbol (?) on the desktop toolbar, or by typing
help browser at the prompt in the command window. The help Browser is a web browser integrated into
the MATLAB desktop that displays a Hypertext Markup Language (HTML) documents. The Help
Browser consists of two panes, the help navigator pane, used to find information, and the display pane,
used to view the information. Self-explanatory tabs other than navigator pane are used to perform a
search.

A.3 MATLAB Files

MATLAB has three types of files for storing information. They are: M-files and MAT-files.

A.3.1 M-Files

These are standard ASCII text file with ‘m’ extension to the file name and creating own matrices
using M-files, which are text files containing MATLAB code. MATLAB editor or another text editor is
used to create a file containing the same statements which are typed at the MATLAB command line and
save the file under a name that ends in .m. There are two types of M-files:

1. Script Files

It is an M-file with a set of MATLAB commands in it and is executed by typing name of file on the
command line. These files work on global variables currently present in that environment.

2. Function Files

A function file is also an M-file except that the variables in a function file are all local. This type
of files begins with a function definition line.

A.3.2 MAT-Files

These are binary data files with .mat extension to the file that are created by MATLAB when the
data is saved. The data written in a special format that only MATLAB can read. These are located into
MATLAB with ‘load’ command.

A.4 the MATLAB System:

The MATLAB system consists of five main parts:


A.4.1 Development Environment:

This is the set of tools and facilities that help you use MATLAB functions and files. Many of
these tools are graphical user interfaces. It includes the MATLAB desktop and Command Window, a
command history, an editor and debugger, and browsers for viewing help, the workspace, files, and the
search path.

A.4.2 the MATLAB Mathematical Function:

This is a vast collection of computational algorithms ranging from elementary functions like sum,
sine, cosine, and complex arithmetic, to more sophisticated functions like matrix inverse, matrix Eigen
values, Bessel functions, and fast Fourier transforms.

A.4.3 the MATLAB Language:

This is a high-level matrix/array language with control flow statements, functions, data structures,
input/output, and object-oriented programming features. It allows both "programming in the small" to
rapidly create quick and dirty throw-away programs, and "programming in the large" to create complete
large and complex application programs.

A.4.4 Graphics:

MATLAB has extensive facilities for displaying vectors and matrices as graphs, as well as
annotating and printing these graphs. It includes high-level functions for two-dimensional and three-
dimensional data visualization, image processing, animation, and presentation graphics. It also includes
low-level functions that allow you to fully customize the appearance of graphics as well as to build
complete graphical user interfaces on your MATLAB applications.

A.4.5 the MATLAB Application Program Interface (API):

This is a library that allows you to write C and FORTRAN programs that interact with MATLAB.
It includes facilities for calling routines from MATLAB (dynamic linking), calling MATLAB as a
computational engine, and for reading and writing MAT-files.

A.5 SOME BASIC COMMANDS:

pwd prints working directory

Demo demonstrates what is possible in Mat lab


Who lists all of the variables in your Mat lab workspace?

Whose list the variables and describes their matrix size

clear erases variables and functions from memory

clear x erases the matrix 'x' from your workspace

close by itself, closes the current figure window

figure creates an empty figure window

hold on holds the current plot and all axis properties so that subsequent graphing

commands add to the existing graph

hold off sets the next plot property of the current axes to "replace"

find find indices of nonzero elements e.g.:

d = find(x>100) returns the indices of the vector x that are greater than 100

break terminate execution of m-file or WHILE or FOR loop

for repeat statements a specific number of times, the general form of a FOR

statement is:

FOR variable = expr, statement, ..., statement END

for n=1:cc/c;

magn(n,1)=NaNmean(a((n-1)*c+1:n*c,1));

end

diff difference and approximate derivative e.g.:

DIFF(X) for a vector X, is [X(2)-X(1) X(3)-X(2) ... X(n)-X(n-1)].

NaN the arithmetic representation for Not-a-Number, a NaN is obtained as a

result of mathematically undefined operations like 0.0/0.0

INF the arithmetic representation for positive infinity, a infinity is also produced

by operations like dividing by zero, e.g. 1.0/0.0, or from overflow, e.g. exp(1000).

save saves all the matrices defined in the current session into the file,
matlab.mat, located in the current working directory

load loads contents of matlab.mat into current workspace

save filename x y z saves the matrices x, y and z into the file titled filename.mat

save filename x y z /ascii save the matrices x, y and z into the file titled filename.dat

load filename loads the contents of filename into current workspace; the file can

be a binary (.mat) file

load filename.dat loads the contents of filename.dat into the variable filename

xlabel(‘ ’) : Allows you to label x-axis

ylabel(‘ ‘) : Allows you to label y-axis

title(‘ ‘) : Allows you to give title for

plot

subplot() : Allows you to create multiple

plots in the same window

A.6 SOME BASIC PLOT COMMANDS:

Kinds of plots:

plot(x,y) creates a Cartesian plot of the vectors x & y

plot(y) creates a plot of y vs. the numerical values of the elements in the y-vector

semilogx(x,y) plots log(x) vs y

semilogy(x,y) plots x vs log(y)

loglog(x,y) plots log(x) vs log(y)

polar(theta,r) creates a polar plot of the vectors r & theta where theta is in radians

bar(x) creates a bar graph of the vector x. (Note also the command stairs(x))

bar(x, y) creates a bar-graph of the elements of the vector y, locating the bars

according to the vector elements of 'x'

Plot description:
grid creates a grid on the graphics plot

title('text') places a title at top of graphics plot

xlabel('text') writes 'text' beneath the x-axis of a plot

ylabel('text') writes 'text' beside the y-axis of a plot

text(x,y,'text') writes 'text' at the location (x,y)

text(x,y,'text','sc') writes 'text' at point x,y assuming lower left corner is (0,0)

and upper right corner is (1,1)

axis([xmin xmax ymin ymax]) sets scaling for the x- and y-axes on the current plot

A.7 ALGEBRIC OPERATIONS IN MATLAB:

Scalar Calculations:

+ Addition

- Subtraction

* Multiplication

/ Right division (a/b means a ÷ b)

\ left division (a\b means b ÷ a)

^ Exponentiation

For example 3*4 executed in 'matlab' gives ans=12

4/5 gives ans=0.8

Array products: Recall that addition and subtraction of matrices involved addition or
subtraction of the individual elements of the matrices. Sometimes it is desired to simply multiply or
divide each element of an matrix by the corresponding element of another matrix 'array operations”.

Array or element-by-element operations are executed when the operator is preceded by a '.' (Period):

a .* b multiplies each element of a by the respective element of b

a ./ b divides each element of a by the respective element of b

a .\ b divides each element of b by the respective element of a


a .^ b raise each element of a by the respective b element

A.8 MATLAB WORKING ENVIRONMENT:

A.8.1 MATLAB DESKTOP

MATLAB Desktop is the main MATLAB application window. The desktop contains five sub
windows, the command window, the workspace browser, the current directory window, the command
history window, and one or more figure windows, which are shown only when the user displays a
graphic.

The command window is where the user types MATLAB commands and expressions at the
prompt (>>) and where the output of those commands is displayed. MATLAB defines the workspace as
the set of variables that the user creates in a work session.

The workspace browser shows these variables and some information about them. Double
clicking on a variable in the workspace browser launches the Array Editor, which can be used to obtain
information and income instances edit certain properties of the variable.

The current Directory tab above the workspace tab shows the contents of the current directory,
whose path is shown in the current directory window.

For example, in the windows operating system the path might be as follows:
C:\MATLAB\Work, indicating that directory “work” is a subdirectory of the main directory
“MATLAB”; WHICH IS INSTALLED IN DRIVE C. clicking on the arrow in the current directory
window shows a list of recently used paths. Clicking on the button to the right of the window allows the
user to change the current directory.

MATLAB uses a search path to find M-files and other MATLAB related files, which are organize
in directories in the computer file system. Any file run in MATLAB must reside in the current directory
or in a directory that is on search path. By default, the files supplied with MATLAB and math works
toolboxes are included in the search path. The easiest way to see which directories are soon the search
path, or to add or modify a search path, is to select set path from the File menu the desktop, and then use
the set path dialog box. It is good practice to add any commonly used directories to the search path to
avoid repeatedly having the change the current directory.

The Command History Window contains a record of the commands a user has entered in the
command window, including both current and previous MATLAB sessions. Previously entered
MATLAB commands can be selected and re-executed from the command history window by right
clicking on a command or sequence of commands.

This action launches a menu from which to select various options in addition to executing the
commands. This is useful to select various options in addition to executing the commands. This is a
useful feature when experimenting with various commands in a work session.

A.8.2 Using the MATLAB Editor to create M-Files:

The MATLAB editor is both a text editor specialized for creating M-files and a graphical
MATLAB debugger. The editor can appear in a window by itself, or it can be a sub window in the
desktop. M-files are denoted by the extension .m, as in pixelup.m.

The MATLAB editor window has numerous pull-down menus for tasks such as saving, viewing,
and debugging files. Because it performs some simple checks and also uses color to differentiate
between various elements of code, this text editor is recommended as the tool of choice for writing and
editing M-functions.

To open the editor , type edit at the prompt opens the M-file filename.m in an editor window,
ready for editing. As noted earlier, the file must be in the current directory, or in a directory in the search
path.

A.8.3 Getting Help:

The principal way to get help online is to use the MATLAB help browser, opened as a separate
window either by clicking on the question mark symbol (?) on the desktop toolbar, or by typing help
browser at the prompt in the command window. The help Browser is a web browser integrated into the
MATLAB desktop that displays a Hypertext Markup Language(HTML) documents. The Help Browser
consists of two panes, the help navigator pane, used to find information, and the display pane, used to

view the information. Self-explanatory tabs other than navigator pane are used to perform a search.
CHAPTER 5

PREPROCESSING FOR CANDIDATE PEDESTRIAN DETECTION

IN FIR IMAGES

A. Determining Optimal Level of Image Scaling with Search Area

In pedestrian detection, a multi-scale image pyramid and dense sliding windows per scale should be
applied to detect pedestrians of various sizes. However, a multi-scale image pyramid is prohibitive for
real-time processing. Therefore, prior knowledge regarding the size of a possible pedestrian is
important. To reduce the computational cost of the image scaling, we grouped the pedestrians of our
KMU dataset into six scales based on their height in pixels by changing the distance from the camera
from 5 m to 30 m at 5 m intervals, which was inspired by the work in [22], as shown in Fig. 2 (a). In this
research, we limit the maximum distance for detecting a pedestrian at 30 m because the boundary of the
pedestrian is severely blurred when located at farther than 30 m, as shown in Figs. 2 (a) and 3 (b).
However, the maximum distance during the winter can be longer than in the summer because this
boundary is clearer in the winter owing to the temperature contrast between the road and the pedestrian.

A detailed description of the KMU dataset is provided in Section VI. The major disadvantage of using
an FIR camera, when compared with a video or NIR camera, is its low range resolution [11]. Therefore,
our approach limits the maximum distance between the camera and the pedestrian to 30 m. We then
select the proper size of the bounding box when using a 640 480 pixel image size for reliable SPC
detection, as listed in Table I.
TABLE I
DISTANCE BETWEEN THE CAMERA AND A PEDESTRIAN AND ITS

CORRESPONDING BOUNDING BOX SIZE

Size of bounding
Distance (m) box

5 196 83
10 129 54
15 90 38
20 69 29
25 62 26
30 47 20

In addition, because the camera has a perspective view, we can decide the region-of-
interest (ROI) for real-time processing. It is necessary to define ROIs that have a high
prospect of containing a pedestrian before conducting the matching process [23].
Therefore, we predefined the size and location of ROI within the four sevenths area of
the image, bottom to top, by considering pedestrian’s largest size.
For the size of bounding box, we set the average height of an adult Korean pedestrian,
when considering both men (174 cm) and women (160 cm), as 167 cm. Therefore, the
largest bounding box is 196 83 when the distance is 5 m, and the smallest bounding box
is 47 20 when the distance is 30 m, for a 640 pixel 480 pixel image.

If we know the position and size of the pedestrian, we can set the search area and its
scaling ratio as shown in Fig. 2 (b). In this paper, the template size of the pedestrian
model is fixed at 90 38 by averaging the various bounding boxes included in the KMU
dataset. Therefore, we can estimate six image-scaling levels by reflecting the size of the
pedestrian model: up-scaling to detect a pedestrian smaller than the model at ratios of
1:1.9, 1:1.45, 1:1.3, 1:1.0; and down-scaling to detect a pedestrian larger than the model
at ratios of 1:0.7 and 1:0.46 . The scaling level and corresponding search area are
changeable according to the difference in height between the road and the roof of the
vehicle. Therefore, if the vehicle is of a normal type and the camera is mounted on its
roof, the same values of the three parameters (scaling level, search area, and ROI) as in
this study can be used. However, if the camera is installed on the front side (e.g., on the
bumper) of the vehicle or the vehicle is of the van or bus type, the three parameters
should be adjusted. This study was performed based on the assumption that the camera is
installed on the roof of a normal car.

One purpose of using different image-scaling levels according to the camera distance is
to estimate the approximate distance between the vehicle and pedestrian based on the
size of the detected bounding box and the position of the detected pedestrian. However,
that the image-scaling level is sparse for a large bounding box but dense for a small
bounding box may be one reason for the degradation in the detection accuracy of a
pedestrian near the camera. To compensate for the accuracy degradation caused by
different image-scaling levels within the ROI, we allow partially overlapping search
areas according to the size of the bounding box, as shown in Fig. 2 (b). The search area is
adjusted slightly up and down to detect a pedestrian taller and shorter than the average.
The purpose of overlapping search areas is to prevent pedestrians of different heights and
(a) (b)
Fig. 2. The size of a pedestrian based on the distance for determining the image scaling
level and search area: (a) the distance between the camera and the pedestrian, and its
bounding box, and (b) the search area according to the scaling level.

(a) (b)

Fig. 3. Segmentation results of a candidate pedestrian using an adaptive dual-threshold


method for images taken during the (a) spring and (b) summer. located within the search
area boundary being missed. For example, if a pedestrian stands near the camera, the
image is down and up sampled by the ratio of scaling levels and the overlapping search
areas are set to detect a large pedestrian. After performing pedestrian classification for all
scaling search areas based on template matching, the final position and size of the
bounding box is estimated using post processing.

Moreover, because the template based matching algorithm is capable of comparing


similarities among different object sizes despite a slight difference in size between the
object model and the candidate object region [24], our system can detect pedestrians who
are either taller or shorter than the average.

B. Preprocessing for Detecting Candidate Pedestrians

Real-time processing of pedestrian detection from six image scales is still difficult to
achieve. Therefore, we first segment the candidate pedestrian regions within the ROI
based on the assumption that pedestrians produce relatively higher thermal energy than
the background. However, background thermal energy during the summer is almost
similar to that of a pedestrian owing to the heat radiation of the road. Therefore, we use
Ge et al.’s [12] adaptive dual-threshold segmentation method to efficiently segment the
candidate region. We apply Ge et al.’s segmentation algorithm to every odd horizontal line
to reduce the computing time. As shown in Fig. 3, the whole body of a pedestrian is
segmented correctly in an image taken during the spring, but only the upper body of a
pedestrian is segmented in an image taken during the summer because of the hot
temperature of the background. Moreover, street lamps, buildings, curbs, and cars are also
detected as candidate regions. Therefore, an efficient post-processing is necessary to
verify a candidate as a real pedestrian rerion
Fi g. 4. Ten different types of Haar-like features for pe destrian detectio n.
CHAPTER 6

IMPLEMENTATION

4.1 GENERAL

Matlab is a program that was originally designed to simplify the implementation of numerical
linear algebra routines. It has since grown into something much bigger, and it is used to
implement numerical algorithms for a wide range of applications. The basic language used is
very similar to standard linear algebra notation, but there are a few extensions that will likely
cause you some problems at first.

MATLAB Desktop is the main MATLAB application window. The desktop contains five sub
windows, the command window, the workspace browser, the current directory window, the
command history window, and one or more figure windows, which are shown only when the
user displays a graphic.

The command window is where the user types MATLAB commands and expressions at
the prompt (>>) and where the output of those commands is displayed. MATLAB defines the
workspace as the set of variables that the user creates in a work session.

The workspace browser shows these variables and some information about them. Double
clicking on a variable in the workspace browser launches the Array Editor, which can be used to
obtain information and income instances edit certain properties of the variable.

The current Directory tab above the workspace tab shows the contents of the current
directory, whose path is shown in the current directory window.

For example, in the windows operating system the path might be as follows:
C:\MATLAB\Work, indicating that directory “work” is a subdirectory of the main directory
“MATLAB”; WHICH IS INSTALLED IN DRIVE C. clicking on the arrow in the current
directory window shows a list of recently used paths. Clicking on the button to the right of the
window allows the user to change the current directory.

50
Coding:

function varargout = MyCam(varargin)

% MYCAM M-file for MyCam.fig

% MYCAM, by itself, creates a new MYCAM or raises the existing

% singleton*.

% H = MYCAM returns the handle to a new MYCAM or the handle to

% the existing singleton*.

% MYCAM('CALLBACK',hObject,eventData,handles,...) calls the local

% function named CALLBACK in MYCAM.M with the given input arguments.

% MYCAM('Property','Value',...) creates a new MYCAM or raises the

% existing singleton*. Starting from the left, property value pairs are

% applied to the GUI before MyCam_OpeningFcn gets called. An

% unrecognized property name or invalid value makes property application

% stop. All inputs are passed to MyCam_OpeningFcn via varargin.

% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one

% instance to run (singleton)".

% See also: GUIDE, GUIDATA, GUIHANDLES

% Edit the above text to modify the response to help MyCam

% Last Modified by GUIDE v2.5 18-Jul-2011 23:46:13

% Begin initialization code - DO NOT EDIT

handles2= 2;

gui_Singleton = 1;

gui_State = struct('gui_Name', mfilename, ...

51
'gui_Singleton', gui_Singleton, ...

'gui_OpeningFcn', @MyCam_OpeningFcn, ...

'gui_OutputFcn', @MyCam_OutputFcn, ...

'gui_LayoutFcn', [] , ...

'gui_Callback', []);

if nargin && ischar(varargin{1})

gui_State.gui_Callback = str2func(varargin{1});

end

if nargout

[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});

else

gui_mainfcn(gui_State, varargin{:});

end

% End initialization code - DO NOT EDIT

% --- Executes just before MyCam is made visible.

function MyCam_OpeningFcn(hObject, eventdata, handles, varargin) %funcion que controla el


video

% This function has no output args, see OutputFcn.

% hObject handle to figure

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

% varargin command line arguments to My (see VARARGIN)

% Choose default command line output for MyCam

handles.output = hObject;

52
%---------------------------------------------------------------

% Create video object

% Putting the object into manual trigger mode and then

% starting the object will make GETSNAPSHOT return faster

% since the connection to the camera will already have

% been established.

handles.video = videoinput('winvideo',1); %, 'YUY2_160x120'

handles.video.ReturnedColorspace = 'rgb';

set(handles.video,'TimerPeriod', 0.05, ...

'TimerFcn',['if(~isempty(gco)),'...

'handles=guidata(gcf);'... % Update handles

'image(getsnapshot(handles.video));'... % get the image and place it in Axes

'set(handles.mycam,''ytick'',[],''xtick'',[]),'... % Remove tickmarks and labels that are inserted


when using IMAGE

'else '...

'delete(imaqfind);'... % Clean up - delete any image acquisition objects

'end']);

triggerconfig(handles.video,'manual');

configurationStep=0;

%----------------------------------------------------------------

% Update handles structure

guidata(hObject, handles);

53
% UIWAIT makes MyCam wait for user response (see UIRESUME)

uiwait(handles.cameraGUI);

% --- Outputs from this function are returned to the command line.

function varargout = MyCam_OutputFcn(hObject, eventdata, handles)

% varargout cell array for returning output args (see VARARGOUT);

% hObject handle to figure

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

% Get default command line output from handles structure

handles.output = hObject;

varargout{1} = handles.output;

% --- Executes on button press in startcam.

function startcam_Callback(hObject, eventdata, handles)

% hObject handle to startcam (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

% Inicio/Fin de Cámara

function Distance_obj_Callback(hObject, eventdata, handles)

% hObject handle to Distance_obj (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of Distance_obj as text

% str2double(get(hObject,'String')) returns contents of Distance_obj as a double

54
% --- Executes during object creation, after setting all properties.

function Distance_obj_CreateFcn(hObject, eventdata, handles)

% hObject handle to Distance_obj (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.

% See ISPC and COMPUTER.

if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))

set(hObject,'BackgroundColor','white');

end

% --- Executes on button press in Distance.

function Distance_Callback(hObject, eventdata, handles)

% hObject handle to Distance (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

t = timer;

set(t,'Tag', 'distanceLoop'); % this is opcional... its just a name for the timer

set(t,'Period',0.5); % this will make the timer run every 0.8 seconds

set(t, 'ExecutionMode', 'FixedDelay'); %this means it will run when the other one has started
counting time

set(t, 'TimerFcn', @(x,y)CalcDistance(handles.video,handles.dist)); % this tells the program what


to do when the time is up (call the funtion)

start(t); %start timer

55
function [ ] = CalcDistance(video,dist)

%-------------------------------- capture image

[w h minc minf] = GetWidthHeight(video);

%this draws the rectangle on the object and presents the distance

global factor;

if(w>0 & h>0)

rectangle('Position',[minc,minf,w,h]);

area = w*h;

distancia =( -10.73*log((area/factor)*21720)) + 127.38;

str=sprintf('%0.4f',distancia);

else

str= '0';

end

set(dist,'String',str);

function [ ] = DrawRect(video,dist)

%-------------------------------- draw rectangle

[w h minc minf] = GetWidthHeight(video);

if(w>0 & h>0)

rectangle('Position',[minc,minf,w,h]);

end

56
function [w h minc minf] = GetWidthHeight(video)

pause(.4); % Wait for the camera to adjust the AGC

I = getsnapshot(video); %get a snapshot to analice

%process to find the whittest object in the whole image (214 is the lowest number to start
recognizing it as white)

[f c] = find(I(:,:,1)>214);

mincr = min(c);

minfr = min(f);

maxcr = max(c);

maxfr = max(f);

[f c] = find(I(:,:,2)>214);

mincg = min(c);

minfg = min(f);

maxcg = max(c);

maxfg = max(f);

[f c] = find(I(:,:,3)>214);

mincb = min(c);

minfb = min(f);

maxcb = max(c);

maxfb = max(f);

w=0;

h=0;

maxc=0;

maxf=0;

57
minf=0;

minc=0;

%this frames the image that the cam is seeing

minf=0;

minc=0;

maxf=0;

maxc=0;

if(~isempty(minfb)&& ~isempty(minfg) && ~isempty(minfr))

minf= max([minfb,minfg,minfr]);

end

if(~isempty(mincb)&& ~isempty(mincg) && ~isempty(mincr))

minc= max([mincb,mincg,mincr]);

end

if(~isempty(maxfb)&& ~isempty(maxfg) && ~isempty(maxfr))

maxf= min([maxfb,maxfg,maxfr]);

end

if(~isempty(maxcb)&& ~isempty(maxcg) && ~isempty(maxcr))

maxc= min([maxcb,maxcg,maxcr]);

end

%this calculates height and width from the object

w=(maxc-minc);

h=(maxf-minf);

58
% --- Executes on button press in calibrateBtn.

function calibrateBtn_Callback(hObject, eventdata, handles)

global hiloCalibrate

global factor

%handles the string on the button that starts the program and cam

if strcmp(get(handles.calibrateBtn,'String'),'Start Cam')

set(handles.calibrateBtn,'String','Calibrate')

start(handles.video);

pause(.4); % Wait for the camera to adjust the AGC

hiloCalibrate = timer;

set(hiloCalibrate,'Tag', 'distanceLoop'); % this is opcional... its just a name for the timer

set(hiloCalibrate,'Period',0.5); % it will run every 0.8 seconds

set(hiloCalibrate, 'ExecutionMode', 'FixedDelay'); %this means it will run when the other one
has started counting time

set(hiloCalibrate, 'TimerFcn', @(x,y)DrawRect(handles.video,handles.dist)); % this tells the


program what to do when the time is up (call the funtion)

start(hiloCalibrate); %start timer

else

[w h minc minf] = GetWidthHeight(handles.video);

if(w>0 & h>0)

rectangle('Position',[minc,minf,w,h]);

stop(hiloCalibrate);

59
set(handles.calibrateBtn,'String','Done')

factor=w*h;

end

end

% hObject handle to calibrateBtn (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

% --- Executes when user attempts to close cameraGUI.

function cameraGUI_CloseRequestFcn(hObject, eventdata, handles)

stop(handles.video);

% hObject handle to cameraGUI (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

% Hint: delete(hObject) closes the figure

delete(hObject);

60
SNAPSHOTS.

61
APPLICATIONS

 Image security is a major challenge in storage and transmission applications.


 Video surveillance systems for homeland security purposes are used to monitor many
strategic places such as public transportation, commercial and financial centers.
 Medical images with a patient’s records may be shared among the doctors in different
branches of a health service organization over networks for different clinical purposes.
 Providing security for these images and videos becomes an important issue for
individuals, business and governments as well.
 Moreover, applications in the automobile, medical, construction and fashion industry
require designs, scanned data, and blue-prints to be protected against espionage.

CHAPTER 7

RESULTS AND DISCUSION

To evaluate the pedestrian detection performance and prove the robustness of the pedestrian
detection regardless of the season, we generated training images from the KMU SP dataset as

62
well as thermal images captured during other seasons using an FIR camera. The positive training
data consisted of 4,474 thermal images including pedestrians covering a wide variety of sizes
and poses. The negative data consisted of 3,405 thermal images including those randomly
cropped from the background. For the testing, we collected 5,045 thermal images for pedestrian
detection, including multiple (a minimum of three people) pedestrians together within an image,
from the KMU SPC dataset, and thermal images captured during other season by an FIR camera.
The pedestrian data included in this dataset contained multiple views: front, back, and left and
right side. This dataset also can be downloaded from the same website. All experiments were
conducted on an Intel Core 2 Quad processor PC with 16 GB of RAM running Windows 8.
For each test, we used the original image and six resampled images up-scaled at ratios of 1:1.9,
1:1.45, 1:1.3, and 1:1.0, and down-scaled at ratios of 1:0.7 and 1:0.46. We then applied non-
maximum suppression [25] to find the best detections in each region by selecting the strongest
responses within a neighborhood in an image and across scales.

63
64
Fig. 9. Performance comparison of precision versus recall using the same KMU dataset

.
Fig. 10. Performance comparison of precision versus recall using the same CVC-09 FIR dataset.

65
REFERENCES

[1] D. M. Gavrila and S. Munder, “Multi-cue pe destrian detection and tracking from a
moving camera,” Int. J. of Computer Vision, vol. 73, no. 1, pp. 41-59, Jun. 2007.
[2] N. Noboru, “A study of sensing for sudden pede strian movemen ts,” in Proc. ITS
World Congress, Oct. 2012, pp. 1–10.
[3] P. Dollár, Z. Tu, P. Perona, and S. Belongie, “Inte gral channel features,” in Proc.
British Machine Vision Conference, Sept. 2009, pp. 91.1-91.
[4] P. F. Felzenszw alb, R. B. Girs ick, D. McAlle ter, and D. Ram anan, “Object detectio
n with discrimin atively trained pa rt based models,” IEEE Trans. Patt. Anal. Mach.
Intelli., vol. 32, no. 9 pp. 1627-1645, Sept. 2010.
[5] P. Vinicius and K. Borges, “Ped estrian detection based on blob otion statistics,” IEEE
Trans. Circuits, Syst. Video Technol., vol. 23, no. 2, pp. 224-235, Feb. 2013
[6] J. Marin, D. Vazquez, A. M. opez, J. Amores, B. Leibe, “Ra ndom
forests of local xperts for pedestrian detection,” i n Proc. IEEE Int. Conf.

on Computer Vision, Dec. 2013, pp. 2592 – 2599.

[7] R. M. Anwer, D. Vázquez, and A. M. López, “Opponent colors for h uman detection,”
in Proc. Iberian C onf. Pattern R cognition and Image Analysis, June 2011, pp. 363–
37 .
[8] R. M. Anwer, D, Vázquez,and A. M. López, “Color contribut on to part-based perso n
detection in different types of scenarios,” in Proc. Int. Conf. Computer Analysis of I
mages and Patte rns, August 201 1, pp 463-470.
[9] S. Zhang, C. Bauckhage, D. A. Klein, and A. B . Cremers, “Exploring human vision
riven features for pedestrian detection,” IEEE Trans. Circuits, Syst. Video Technol., vo
l. 25, no. 10, pp. 1709-1720, Oct. 2015.
[10] B. C. Ko, J. Y. Kwak, J. Y. Nam, “Human track ing in thermal i mages
using adaptive particle filters wit online random fo rest learning,” O ptical
Engineering, v ol. 52, no. 11, pp. 1-14, Nov. 2013.

66

You might also like