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:
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
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.
When you submit your code, please include a launch file that starts ONLY your node, not the image_pub or rqt_image_view nodes. You may create other launch files if you wish, just be sure you specify this one in your submission.
Turn in to blackboard one PDF containing:
2 points: Submission details (tag, instructions, etc)
18 points: Correct math/algorithm for image processing
20 points: Correct output images (submitted to Blackboard and from running code)