Skip to content

About

OpenCV and ROS computer vision class materials, practice code, and setup notes.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Open-CV Class

OpenCV and ROS computer-vision class materials, including image-processing examples, lane-detection scripts, Gazebo-related examples, sample images, and a reference PDF.

Repository Status

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/

Setup

Python examples generally require:

pip install opencv-python numpy

ROS Noetic / Gazebo-related examples may require:

sudo apt-get install ros-noetic-effort-controllers
sudo apt-get install ros-noetic-ros-controllers

Examples

OpenCV basics (Open_CV/OpenCV example source code/)

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).

ROS / Gazebo lane following (Open_CV/Gazebo simulation source code/)

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.py

Suggested Validation

Run 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.

Reference

Open_CV/OpenCV.pdf contains the lecture slides used in class.

About

OpenCV and ROS computer vision class materials, practice code, and setup notes.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages