While getting my masters I took an elective on image processing. That was well before OpenCV was put together. Image processing is a power tool for robots and the OpenCV library makes it easy to do.
OpenCV was put together by Intel around the early part of the 2000s. I combined all of the vision processing tools in one library. The maintainers of it have changed several times, but the core library still remains. If you are going to do image processing, the OpenCV library is the best one to use.
I started the image processing work on with finding a blob of color in an image. This can be used when there isn’t a reflective vision target. This could be used to find a ball, or the lower goal. For this example I use the red goal as the target. I will leave it up to you to find the blue goal and ball.