Vision Problems Under Regional Lights[GRIP]


We are having major problems figuring out how to calibrate our vision under the bright regional lights. We are using GRIP for the processing. My main question is what settings have you found to overcome the lights on the camera and in GRIP?

Here are the images of GRIP and the mjpg-streamer:

P.S. If you are at North Star Regional and know an answer, let me know.


What camera are you using?


Several teams put sunglasses (dark and/or colored filters) on the camera.

Logitech C270

Try reducing your acceptable Hues. Right now you’re pretty much saying “any color” unless you need any color.

We had this issue too. In the end we decided to forego the vision based targeting and changed our code to use absolute gyro values (0 being the direction perfectly perpendicular to the opponent alliance wall). With some tweaking we converged on a low goal autonomous routine that eventually worked almost all the time.

We noticed that the successful teams at our regional (1241 in particular) used a much brighter ring light than what we got through FIRST Choice.

Other things we would have tried if we had time include “sunglasses” in various colours including green tint, doubling up our ring lights, looking for the red or blue LED strength indicators, etc.

offset the led ring so one side is a close as possible to center without occluding vision. it will make a huge difference.

Are you able to throttle down the exposure level on that camera? In our experience, if you can’t do that then you won’t be able to get good green/blue/whatever color values off the reflective tape from your LED ring (assuming you use one). Without exposure control the tape blooms out to a near-white value, making it very difficult to isolate that separate from the field lights.

We use a Logitech C920 on a RPi2, and had to dig up an old command-line program that supports fiddling with the exposure settings. The consumer-grade utility Logitech ships these days (the Windows one with the GUI) only works for that session, and only on Windows of course.

Once we had exposure under control it was pretty easy to get reliable target isolation using GRIP. The sunglasses tip is interesting, hadn’t thought of that. :slight_smile:

I’ll second vScourge: setting the exposure manually is key. There is a lot of variability when using the auto exposure mode, which makes it difficult to isolate the appropriate HSV ranges. We set our exposure to some very small value, like 5, and started seeing very reliable results.

We use a Logitech C615 and the NI Vision libraries since we weren’t able to set the exposure using opencv.

I want to contain those values, but without the full range, the contour I want doesn’t show up.

See comments about manual exposure.

Another option would be to, on the rio, check the aspect ratios of the contours. But that’ll screw up if you are not straight on. Really the exposure and proper hsv bands are the best way to eliminate gunk.

That means you are either using a white light or your image is overexposed. Turning down the exposure or using a filter/sunglasses should help if you are using a colored light. Then you can dial in the hue to knock out the venue lighting.

We found the FIRST Choice led ring to be a little dim for our liking, we made a custom led ring with 24 high brightness 5mm leds on a vero board, because of the brightness we are powering it off a spike so we can turn it on and off to ensure it doesn’t interfere with/annoy the drivers/operators on the opposing alliance as it is quite bright.

Can’t drive if got no eyes:)

Though we ended up not using GRIP, when testing with it we had good results using an RGB filter and a hsv filter with no hue limits put into a bitwise_and, partly because it was easier to adjust than the RGB than the hue. We were also able to lower the maximum red value and cut out almost all light except for the goal.

We used a C930e, which supports exposure control directly via NI IMAQdx. We didn’t need any external tools.

If arena lights are a problem, then you definitely need a lower exposure setting. The target should clearly be the color of your LED ring.
From your picture, I can’t exactly tell what color your LED ring is, or whether your exposure setting is appropriate.

This is what we ended up doing… They kept changing the lighting on us. When they turned the spotlights on, it was too bright.

I mentioned this problem to someone with a differential signalling background and his first suggestion is one I hadn’t thought of. He said, why don’t you look at the target with the ring light on and then off, and then subtract out the noise?

I can’t promise it would work, but it’s an intriguing idea…

We also use GRIP to process the image produced by our Axis M1011 camera. In order to filter out the bright lights, we use a negative photographic film (covering the camera lense completely). Depending on how developed the film is, you may have to add multiple layers of negative film.

If you are looking for high goal calibration or auto, consider using infrared - it works really well with GRIP. (Initially I tried using a Microsoft Lifecam HD-3000 with IR, but it did not produce promising results on GRIP. After further research, I found out that the Webcam itself had an infrared filter, thus leading to our team using an Axis camera instead).