Start with ROS tutorials:
https://wiki.ros.org/ROS/Tutorials
Then take a look at OpenCV tutorials:
- https://opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_tutorials.html
- https://docs.opencv.org/3.4.0/d9/df8/tutorial_root.html
General guidelines:
- Get the image from the camera and display it in RViz
- Set up a package that uses OpenCV to process the image
- Find the right processing for OpenCV that will allow you to detect the line
- Find a way to transform the output of your OpenCV algorithm into robot movements
- Make the robot move given the output of the OpenCV processing