Professional Documents
Culture Documents
1. Introduction
In today’s world where digital image processing has emerged as a new technology
which has opened in new horizon for this competition world. So if we can perform the
object identification using digital image processing then we can give a new scope in
various field of technology.
This object identification technique can be used in identifying objects over the
earth by using the image captured by a satellite. This will help the meteorological
department to implement various development plans. Similarly we can implement this
booming technique in biomedical instrument and in military equipment and so on.
Here we are using a web cam captured an image. The image capture through
webcam will be continuously compared to the part of image (i.e. object) which is already
stored in data base. For identifying the object in the image, we are using an algorithm.
The next technique that we have employed for this project is the Edge Detection. Every
object has got an different shape. This technique helps in identification process where the
object is can be differentiated from other objects.
After the identification of object there is need that object should be shown
differently with others. For this purpose, there is one technique employed, named
Masking. Masking is the process in which a Region of Interest is enhanced.
Figure 2.1.1 shows the basic components comprising a typical general purpose
system used for digital image processing. The function of each component is discussed
starting with image sensing.
Specialized Crystal
Image
Processing
hardware
Not Matched
Image
sensors
Problem
Domain
1) Sensing:
With reference to sensing, two elements are required to acquire digital images.
The first is a physical device that is sensitive to the energy radiated by the object image.
The second, called a digitizer is a device for converting the output of the physical sensing
device into digital form. For instance, in a digital video camera. The digitizer converts
these outputs to digital data.
3) Computer:
4) Microcontroller AT89C51:
The designing of pick and place robot includes 2 stepper motor, a DC series motor,
power supply and microcontroller as used earlier. All the motors will be interfaced with
microcontroller which will be programmed to perform the desired actions.
The present invention relates generally to the field of computer video image
manipulation, and more particularly to an improved means and method for identifying
objects of concern within a video image such that identification of the objects can be
maintained even as the objects move within the image.
Manipulation of digitized video images, both still pictures and moving video
presentations, is an important aspect of the present trend toward the introduction of
"multimedia" into many aspects of our lives, as well as in modern aspects of more
traditional endeavors such as, the creation of motion pictures.
This present application is directed to a method and means for automating the
identification of such objects and maintaining such identification through time. Although
the present inventive method is intended to be used in conjunction with the production of
interactive computer interface systems, it is not restricted to such applications.
It is yet another object of the present invention to provide a method for identifying
objects within a digitized moving video image which does not require a great deal of
computer power to implement. The present invention is to provide a method for
identifying objects within a digitized moving video image which identifies the objects in
such a manner that a computer can store the identifying criteria using a minimum amount
of data storage resources.
It is yet another object of the present invention to provide a method for identifying
objects within a digitized moving video image which will allow a computer to easily
follow the object as it moves through the image, without overburdening the computer's
resources.
3. Processing In Matlab
We have used Matlab 7.6 for the implementation of the algorithms as this
allows solving many technical computing problems, those with matrix and vector
formulations, in a fraction of time, it would take to write a program in a scalar no
interactive language such as C or FORTRAN.
3.1.1.2 Interpolation:
This topic describes the mechanism used to determine output pixel values in
all transformation operations. Interpolation is the process by which we estimate an
image value at a location in between image pixels. For example, if we resize an image so
it contains more pixels than it did originally, the software obtains values for the additional
pixels through interpolation.
Image resizing accepts two primary arguments: (1) The image to be resized
and (2) The magnification factor. To enlarge an image, specify a magnification
factor greater than 1. To reduce an image, specify a magnification factor between 0
and 1. By default, image resizing uses nearest neighbor interpolation but, by
specifying a third argument, we can also use either bilinear or bicubic interpolation.
Image rotating accepts two primary arguments :(1) The image to be rotated and
(2) The rotation angle. By specifying the rotation angle in positive or negative degrees,
we can rotate the image either in clockwise direction or in counterclockwise
direction, if we specify degree as positive then image will be rotated in clockwise
direction and if degree is negative then image will be rotated in counterclockwise
direction.
Dilation and erosion are two fundamental morphological operations. Dilation adds
pixels to the boundaries of objects in an image, while erosion removes pixels on
object boundaries. The number of pixels added or removed from the objects in an
image depends on the size and shape of the structuring element used to process the
image. Some of the morphological image processing operations are based on
combinations of dilation and erosion.
They are rectangular partitions that divide a matrix into m-by-n sections.
Distinct blocks overlay the image matrix starting in the upper-left corner, with no
overlap. If the blocks don't fit exactly over the image, then it is added zero padding so that
they do.
• Obtaining pixel values and statistics, which are numerical summaries of data in an
image: The Image Processing provides several functions that return information
about the data values that make up an image. These functions return information
about image data in various forms.
• Analyzing images to extract information about their essential structure: This topic
describes functions that can use for following image analysis techniques:
• Edge Detection We can use edge detection function to detect edges, which are
those places in an image that correspond to object boundaries. To find edges, this
function looks for places in the image where the intensity changes rapidly. The
most powerful edge-detection methods that edge provides are the canny and sobel
methods. The Canny method differs from the other edge-detection methods in that
it uses two different thresholds (to detect strong and weak edges), and includes the
weak edges in the output only if they are connected to strong edges.
• Enhancing images to make certain features easier to see or to reduce noise: This
topic describes specific operations within each category, and shows how to
implement each kind of operation using different functions some what like,
intensity adjustment and noise removal.
This topic describes operations that one can perform on a selected region of an
image. It discusses these topics:
We can use the different operations to fill a region of interest, interpolating from
the borders of the region. This function is useful for image editing, including removal of
extraneous details or artifacts.
• BMP
• HDF
• JPEG
• PCX
• TIFF
• XWB
Most images we find on the Internet are JPEG-images which are the name for one
of the most widely used compression standards for images. If we have stored an image we
can usually see from the suffix what format it is stored in. For example, an image named
myimage.jpg is stored in the JPEG format and we will see later on that we can load an
image of this format into Matlab.
This is the equivalent to a "gray scale image" and this is the image we will mostly
work with in this course. It represents an image as a matrix where every element has a
value corresponding to how bright/dark the pixel at the corresponding position should be
colored. There are two ways to represent the number that represents the brightness of the
pixel: The double class (or data type). This assigns a floating number ("a number with
decimals") between 0 and 1 to each pixel. The value 0 corresponds to black and the value
1 corresponds to white. The other class is called uint8 which assigns an integer between 0
and 255 to represent the brightness of a pixel. The value 0 corresponds to black and 255
to white. The class uint8 only requires roughly 1/8 of the storage compared to the class
double. On the other hand, many mathematical functions can only be applied to the
double class. We will see later how to convert between double and uint8.
This image format also stores an image as a matrix but can only color a pixel
black or white (and nothing in between). It assigns a 0 for black and a 1 for white.
This is a practical way of representing color images. (In this course we will mostly
work with gray scale images but once we have learned how to work with a gray scale
image we will also know the principle how to work with color images.) An indexed
image stores an image as two matrices. The first matrix has the same size as the image
and one number for each pixel. The second matrix is called the color map and its size may
be different from the image. The numbers in the first matrix is an instruction of what
number to use in the color map matrix.
This is another format for color images. It represents an image with three matrices
of sizes matching the image format. Each matrix corresponds to one of the colors red,
green or blue and gives an instruction of how much of each of these colors a certain pixel
should use.
The steps that are very useful in Digital Image Processing are given below:
In Fig.3.1, (a) is energy source, and (b) is an element of scene, the energy from an
illumination source being reflected from a scene element, but the energy also could be
transmitted through the scene elements.
The first function performed by the imaging system shown in Fig. 3.1(c) is to
collect the incoming energy and focus it into an image plane. If the illumination is light,
the front end of the imaging system is a lens, which projects the viewed scene onto
the lens focal plane, as Fig.3.1(d) shows. The sensor array, which is coincident with
the focal plane, produces outputs proportional to the integral of the light received at each
sensor. Digital and analog circuitry sweeps these outputs and converts them to a video
signal, which is then digitized by another section of the imaging system. The output is a
digital image, as shown diagrammatically in Fig. 3.1(e).
We can denote images by two-dimensional functions of the form f (x, y). The
value or amplitude of f at spatial coordinates (x, y) is a positive scalar quantity whose
physical meaning is determined by the source of the image. When an image is generated
from a physical process, its values are proportional to energy radiated by a physical
source. As a consequence, f (x, y) must be nonzero and finite; that is,
The function f(x, y) may be characterized by two components :(1) the amount of source
illumination incident on the scene being viewed, and (2) the amount of illumination
reflected by the objects in the scene. Appropriately, these are called the illumination and
reflection components and are denoted by i (x, y) and r (x, y), respectively. The two
functions combine as a product to form f(x,y):
f (x, y) = i (x,y) · r (x,y), (Where, 0 < i (x,y) < ∞ and 0 < r (x,y) <1)
We use two principal ways to represent digital images. Assume that an image f (x,
y) is sampled so that the resulting digital image has M rows and N columns. The values of
the coordinates (x, y) now become discrete quantities. For notational clarity and
convenience, we shall use integer values for these discrete coordinates. Thus, the values
of the coordinates at the origin are (x, y) = (0,0). The next coordinate values along the
first row of the image are represented as (x, y) = (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.
4. Implementation
Our project is divided into two as identifying image using DIP and then
picking up the object and placing at its required place.
4.1.1PowerSupply: :
A transformer of 12-0-12V is used to supply voltage to the circuit. Four diodes are
connected in bridge configuration. A regulator IC7805 is used to provide 5V output
supply whereas a IC7812 is used to provide a 12V supply.
The DC motor works for arm movement and lifting the object and placing it at
the destinations. A power supply of 5V is provided to driver IC which boost the
current ratings for motor. The boosted current can therefore be used in driving
the motor. The microcontroller 8051 controls the motion of motor and thereby
clockwise and counterclockwise motion of motor is possible. A optoisolator ICQ74
is used to provide isolation and thereby creating an extra protection
circuit.L293D is a motor driving IC which is used to drive two motors
simultaneously.
L293D
Features
b.2) ILD74
Pin Diagram
Features of ILD74:-
Peak reverse voltage- 3.0V
Microcontroller AT89c51
Pin Diagram of 8051
Features:-
Features:
1. Compatible with MCS-51™ Products
2. 4K Bytes of In-System Reprogrammable Flash Memory
4.2 Alogrithms:
clc;
clear all;
close all;
g1= rgb2gray(r);
edge1=edge(g1,'prewitt');
g2= rgb2gray(r1);
edge2=edge(g2,'prewitt');
%image acquisation%
vid = videoinput('winvideo',1);
preview(vid);
I = getsnapshot(vid);
delete(vid);
clear vid;
g3= rgb2gray(r3);
edge3=edge(g3,'prewitt');
figure,imshow (I1);
figure,imshow (I2);
figure,imshow (I3);
if I1==I3
disp 'detected';
end;
s= serial('com3');
fopen(s)
if I1==I3
fwrite(s,1,'uint8');
elseif fwrite(s,0,'uint8');
A=fread(s,1,'uint8');
if A==0
fclose(s);
delete(s);
clear(s);
end;
end;
fclose(s);
delete(s);
clear(s);
org 00h
mov P0,#00h
mov P1,#00h
mov tmod,#20h
mov th1,#-6h
mov scon,#50h
setb tr1
here:
jnb RI,here
mov a,sbuf
mov P1,a
clr RI
jnb P1.0,here
//motor1 clockwise
setb p0.3
mov R5,#05h
acall delay
cpl P0.3
//motor2 clockwise
setb P0.5
mov R5,#10h
acall delay
cpl P0.5
//motor2 anticlockwise
setb P0.6
mov R5,#10h
acall delay
cpl P0.6
//motor1 clockwise
setb P0.4
mov R5,#05h
acall delay
cpl P0.4
sjmp here
delay:
h1:mov R2,#100
h2:mov R3,#255
h3:djnz R3,h3
djnz R2,h2
djnz R5,h1
RET
The above figure shows the image of first object.The shape of an object is a square and
we have used a black background to avoid distortion from lights.
We have taken the crop image of the object,so that only the specific area would be
selected.After croping the image a filter is used to remove the distortion and a new
cropped image is formed.The crop image is compared with the new image and the
reference object is selected.
A DC motor of 150 rpm and 12V rating is interfaced with microcontroller 8051.The
output of driver LM293D is used to drive the motor. Microcontroller controls the motor
rotation clockwise or anticlockwise.DC motor translates electrical pulses into mechanical
movement. It has positive and negative leads. DC motor moves continuously from
starting position. DC motor also has voltage and current ratings. The nominal voltage is 1
to 150v depending upon motor. As we increase voltage rpm goes up. With a fixed
Although 8051 family members come in different packages here dual in line package is
used, this have 40 pins that are dedicated to various functions. It must me provided that
20 pin version is reduced number of I/O ports for less demanding applications. A total of
32 pins are set aside for the four ports P0, P1, P2,P3 where each port take 8 pins. The rest
of pins are designated as Vcc, GND, XTAL1, XTAL2, RST, EA, and ALE.
6. Future Scope
One of the things to make the algorithm better would be to develop a more
optimal edge detection scheme that leaves thinner edges than the gradient detector used
but also would be more resistant to noise than a Laplacian edge detector. One possibility
would be to implement a multiscale edge detector to solve that problem. Another
improvement would be to find a better thresholding scheme than setting a range that the
number of `edge' pixels has to fall into.
Again, the multiscale edge detector might eliminate the need for much
thresholding. Also in the future, the edge detection results found with some region
growing results done independently in order to optimize the region determination process.
Finally, it would be nice to add a texture/color recognition feature to this algorithm so that
similar yet disjoint regions could be classified as `the same' and assigned the same gray-
level value.
The object identifying pick and place robot can be modified for several other
purposes like explosive detectors, mine detectors etc.
7. Conclusions
One of the major part of interfacing of motors with microcontroller and part of
Matlab programming to identify and compare the two images is completed. Using
compare module a much larger size images can be compared. For pick and place robot
there will be interfacing of two motors which would follow with slight modifications in
controller programming.
8. Reference
[1]. Rafael C. Gonzalez and Richard E. woods, “Digital image processing”, Addition
Wesley.
[2]. Anil K. Jain, “Fundamental of Digital Image Processing”, prentice hall of India.
[3]. Gose Earl, Johnson Baugh, R Jost Steve, “Pattern Recognition and Image analysis”,
Prentice Hall of India.
[4]. Mazidi Ali, Janice Mazidi Janice and Rolin .D. Mckinlay, “The 8051 microcontroller
and Embedded systems”.