Вы находитесь на странице: 1из 15

YEAR-2009-2010 POORNIMA COLLEGE OF ENGINEERING,JAIPUR

GUIDED BY:NEHA SINGH LECTURER,ECE DEPTT. PRESENTED BY:MATIUR RAHMAN(04) PANKAJ SINGH(10) PEEYUSH KR. DAHIYA(14) RAMSWAROOP BALAI(26) ARPIT S. SHAH(40) ECE-4TH YEAR SEC-B
1

INTRODUCTION: This robot uses MATLAB 7.14 Image processing

toolbox to follow a red ball. The image is taken by a USB webcam and given to PC & thus MATLAB through USB cable. MATLAB processes the image & send signals to L293D on the robot using LPT1 Parallel port through MCT2E opto-couplers. Depending on the signals received, the motors act.

Actions in image processing


Image Acquisition Image Processing Pre processing Feature extraction Data Communication

Step 1:
>> imaqhwinfo InstalledAdaptors: {winvideo} MATLABVersion: 7.0 (R14) ToolboxName: Image Acquisition Toolbox ToolboxVersion: 1.5 (R14)

Step 2:
We got two functions for that
imview(I') imshow(I')

To display two or more image using imshow then command syntax would be
figure, imshow(I2)

We can read an image already stored in computer with I=imread(imgname.ext);

Step 3:
Parallel Port: To access parallel port here is a simple code parport=digitalio(parallel,'LP T1); .

ALGORITHM-

CIRCUIT ASSEMBLY:-

COMPONENTS & SYSTEM REQUIREMENTS


Part Total Qty. 1 2 1 1 1 4 Parallel port 2K 1/4W Resistor 1K 1/4W Resistor Description Motor driver ic Opto couplers

L293D
MCT2E USB webcam LPT1 R1,R2,R3,R4 R5, R6, R14, R16

R8, R10 R9 R11


R12 R13

2 1 1
1 1

100K 1/4W Resistor 10K Linear Pot 150K 1/4W Resistor


360K 1/4W Resistor 82 Ohm 1/4W Resistor 330uF 25V Electrolytic Capacitor 0.1uF Ceramic Disc Capacitor 0.22uF 50V Polyester Capacitor

C1
C2 C3

1
1 1

Procedure for Detecting the Color Balls


Grab a frame of the live video Convert the video data from RGB color space to HSV color space
HSV color space is more close to human description to colors

Select all pixels in the image that matches with the color

of the ball

Assume there are no other objects in the video that have the

same color and similar shape

Remove the isolated pixels (optional)


Assume noise in the images may have similar color as the ball

but exists in the form of isolated pixels

Locate the center of the remaining pixels


Assume the remaining pixels all belong to the ball of interested
9

RGB Color Space


For the current digital displays, each pixel is made of a Red, a Green and a Blue sub-pixel Each sub-pixel is activated by a byte of data, i.e. a number between 0 and 255 With these three bytes, the computer can generate 256x256x256 = 16,777,216 combinations If R = x, G = y and B = z, we can plot an RGB cube as follows:

While we have a huge amount of possibilities, it is also tricky to define a precise color by adjusting the three components: If R=G=B=0, we have black If R=G=B=255, we have white If R=G=255 and B=0, we have yellow

10

HSV Color Space


HSV codification provides an

intuitive method for color selection. Closer to human perception: The blend of the three components is defined by a single parameter called "Hue" The "Saturation" parameters selects how grey or pure the color will be The "Value" parameter defines the brightness of the color The HSV Color Space can be visualized as a cone
11

Few more important concepts of image processing Image adjustment Image conversions Edge detection Image adjustment: imadjust is the command to be used for adjusting the values of the pixel to fixed range

Image conversions: RGB to Gray Scale This can be done by:Gray_img = rgb2gray(rgb_img) RGB to binary image BW = im2bw(I,level)

12

Edge Detection: It takes an intensity image I as its input, and returns a binary image of the same size as I, with 1s representing edges in I and 0s elsewhere.

APPLICATIONS Used at railway platforms in foreign countries .

13

REFERENCES 1. 2. 3. 4. 5. 6. 7. www.endurancerc.com www.roborealm.com www.chennairobotics.com www.google.com www.wikipedia.com www.matlab.com www-ccs.ucsd.edu/matlab/toolbox/images/imadjust.html

14

15

Вам также может понравиться