This homework will help you learn how to process images (cropping and filtering) in ROS. Our goal in Lab 3 is to create our own lane detector. The first step is to start processing images in ROS using OpenCV. To complete this homework, create a ROS node that:
Additionally, create a ROS launch file that:
Finally, update your launcher script for HW7. Running the launcher script should start your node and display the results as all five images are cycled as inputs.
An example has been included in your repo: the flip_image node in the image_processing_hw package. This example takes an input image on the ROS topic “image” and flips it horizontally. You can use it as a reference when designing your solution for this assignment.
Also uploaded is a helper node, image_pub, in the same package. This node takes in the filename of an image on the command line and publishes it to the “image” topic. On the robot, images will be published by other code, but you can use this to test your code for now. You can see your output using rqt_image_view.
$ rosrun image_processing_hw image_pub.py /code/catkin_ws/src/<REPO>/eece5560/packages/image_processing_hw/sample_images/image0.png
NOTE: file path extends onto border of site on some screens. Select the whole line to copy.
Five sample images have been included in the sample_images folder in the image_processing_hw package. Use them to test your code for this homework.
A launch file has been provided that allows you to start the image_pub node and supply an argument to select which image to show. For example, use this command:
$ roslaunch image_processing_hw image_pub.launch index:=2
To start the node to display the second image (image2.png). This will work for index 0-4.
For your final submission, use the image_pub_all.py node in your launch file as this will publish ALL test images.
Complete the survey with this information:
10 points: Submission details (tag, instructions, launcher, etc)
10 points: Correct math/algorithm for image processing
20 points: Correct output images