OpenCV and ROS computer-vision class materials, including image-processing examples, lane-detection scripts, Gazebo-related examples, sample images, and a reference PDF.
This repository is currently best understood as class/practice material. It is not yet a polished autonomous-driving or robotics benchmark project.
Current contents:
Open_CV/
OpenCV.pdf
images/
OpenCV example source code/
Gazebo simulation source code/
Python examples generally require:
pip install opencv-python numpyROS Noetic / Gazebo-related examples may require:
sudo apt-get install ros-noetic-effort-controllers
sudo apt-get install ros-noetic-ros-controllers| Script | What it shows |
|---|---|
show_image.py |
Load and display an image |
show_gray_scale_image.py |
Grayscale conversion |
show_blurred_image.py |
Blurring / smoothing filters |
show_edge_image.py |
Edge detection (Canny) |
show_contour_image.py |
Contour extraction |
show_turn_resize_affine_image.py |
Rotation, resizing, affine transform |
show_face_detection_image.py |
Haar-cascade face detection |
hsv_lane_detection.py |
Lane masking with HSV color thresholds |
hough_lane_detection.py |
Lane lines with the Hough transform |
hough_hsv_lane_detection.py |
HSV masking + Hough transform combined |
Sample inputs are in Open_CV/images/ (road1.jpg, road2.jpg, road_straight.png, road_curve.png, Lena.png).
All nodes subscribe to the camera topic /camera/rgb/image_raw (ROS Noetic, rospy).
| Script | What it does |
|---|---|
lane_detection.py |
Lane detection on the simulated camera stream |
bev_lane_detection.py |
Bird's-eye-view (perspective) transform + lane detection |
bev_lane_detection_and_tracking.py |
BEV lane detection + lane tracking, publishes /cmd_vel |
bev_lane_detection_and_tracking2.py |
Improved tracking controller variant, publishes /cmd_vel |
Run inside a Gazebo world with a camera-equipped robot (e.g. TurtleBot3 Waffle) publishing /camera/rgb/image_raw:
rosrun <your_package> bev_lane_detection_and_tracking.pyRun individual examples from their folder, for example:
python "Open_CV/OpenCV example source code/show_image.py"
python "Open_CV/OpenCV example source code/hough_lane_detection.py"Gazebo/ROS examples require a ROS Noetic environment and compatible simulation setup.
Open_CV/OpenCV.pdf contains the lecture slides used in class.