vehicle-automatic-control-system-autonomous-vehicle-driven-by-image-processing-in-adruino-and-python-programming
vehicle-automatic-control-system-autonomous-vehicle-driven-by-image-processing-in-adruino-and-python-programming
1
Figure 1. The normal coordinate.
2
Figure 3. The structure of cv2.line[4]
2.4 Canny
Canny() Function in OpenCV is used to detect the edges in an image. From the image we
have, through Canny, the image will show the special lines and changes it more white.
3
Figure 5. The structure of cv2.Canny[5]
3. MODELING
3.1. Hardware
4
Figure 7. Arduino Vehicle Mainboard. [7]
The Arduino UNO's technical specs:
5
3.1.2 L-298N
We will utilize electric wires to link the model car's electrical components. Because these
components operate at low voltage, we just need to utilize wire with a tiny diameter.
7
Figure 10. the wires
3.1.5 Camera
8
Figure 12. Battery tray
9
Figure 14. Model
3.2 Software
3.2.1 Python codes
We define a function for bluring the image to easily detech the line and change the photo
to the canny form.
10
Figure 17. ROI codes
Then we choose a region of interest to increase the accuracy of the lane detecting process.
11
Figure 20. Declare to Arduino board
- Secondly, set all the motor control pins to outputs.
+ Turning right:
12
Figure 23. Setting for car turn right
+ Turning left:
13
4. CONCLUSION
We succeeded in programming a program that can process images to get lanes; however
the limitation of the project is that we cannot make the program be able to handle left or
right turning. Moreover, we need to be careful about which COM that PC is
communicating with Arduino Board.
On over the world, the level of autonomous vehicle is stopping at the level “2+”, in the
future, this programme will more and more grow up to reach the level “5”, which is
known as the highest level of this programme.
REFERENCE
What is Arduino? : https://www.arduino.cc/en/Guide/Introduction
What is Python? : Edpresso Team https://www.educative.io/edpresso/what-is-python
[3] Line detection in python with OpenCV | Houghline method:
https://www.geeksforgeeks.org/line-detection-python-opencv-houghline-method/?
ref=gcse
[4] Python OpenCV | cv2.line() method: https://www.geeksforgeeks.org/python-opencv-
cv2-line-method/?ref=lbp
[5] Python OpenCV – Canny() Function: https://www.geeksforgeeks.org/python-opencv-
canny
[6] LKRB100 BỘ XE ROBOT THÔNG MINH TRÁNH VẬT CẢN ARDUINO UNO –
SHIELD L298: http://robocon.vn/detail/lkrb100-bo-xe-robot-thong-minh-tranh-vat-can-
arduino-uno-shield-l298.html
[7], [8] Arduino UNO R3 là gì?: http://arduino.vn/bai-viet/42-arduino-uno-r3-la-gi
[9] Mạch Điều Khiển Động Cơ DC L298N : https://nshopvn.com/product/mach-dieu-
khien-dong-co-dc-l298n/
[10] L298N Motor Driver Module: https://components101.com/modules/l293n-motor-
driver-module
[11] Geared DC Motor with Wheels 3V 6V 9V:
https://www.lazada.com.ph/products/geared-dc-motor-with-wheels-3v-6v-9v-12v-dc-
plastic-gear-dynamo-130-dual-shaft-electric-dinamo-diy-arduino-electronic-smart-robot-
2wd-4wd-i216823519.html
14