Академический Документы
Профессиональный Документы
Культура Документы
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
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.
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)
Step 3:
Parallel Port: To access parallel port here is a simple code parport=digitalio(parallel,'LP T1); .
ALGORITHM-
CIRCUIT ASSEMBLY:-
L293D
MCT2E USB webcam LPT1 R1,R2,R3,R4 R5, R6, R14, R16
2 1 1
1 1
C1
C2 C3
1
1 1
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
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
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.
13
14
15