for lego mindstorms, if you use Ev3Dev, it may be much easier..
- you can use pixy -cam for orange ball... - see mindsensors.com
- You may also check out the Mindsensors Cam (not sure about the viewing distance though. My expericence of it (way back about 6 years ago), was less than 2 feet. Not sure about now.
- for better ones - you will need to get ev3 talk to a PI via Serial pins or ethernet connection. The former will need more electronic knowledge. The later one will need them to learn about socket programming. - ev3dev is opensource.
There is no out of the box solution that I know of, or even just a 3rd party sensor can offer a somewhat reliable sensing.