Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Vision Problems Under Regional Lights[GRIP] (http://www.chiefdelphi.com/forums/showthread.php?t=146799)

team-4480 04-07-2016 01:01 PM

Vision Problems Under Regional Lights[GRIP]
 
Hi,

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: http://imgur.com/a/FO67A

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

Thanks!

Brandon Holley 04-07-2016 01:24 PM

Re: Vision Problems Under Regional Lights[GRIP]
 
What camera are you using?

-Brando

Alan Anderson 04-07-2016 01:33 PM

Re: Vision Problems Under Regional Lights[GRIP]
 
Quote:

Originally Posted by team-4480 (Post 1569190)
...what settings have you found to overcome the lights on the camera and in GRIP?

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

team-4480 04-07-2016 01:42 PM

Re: Vision Problems Under Regional Lights[GRIP]
 
Quote:

Originally Posted by Brandon Holley (Post 1569205)
What camera are you using?

-Brando

Logitech C270

Andrew Schreiber 04-07-2016 02:20 PM

Re: Vision Problems Under Regional Lights[GRIP]
 
Quote:

Originally Posted by team-4480 (Post 1569190)
Hi,

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: http://imgur.com/a/FO67A

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

Thanks!

Try reducing your acceptable Hues. Right now you're pretty much saying "any color" unless you need any color.

GreyingJay 04-07-2016 02:44 PM

Re: Vision Problems Under Regional Lights[GRIP]
 
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.

cmwilson13 04-07-2016 03:21 PM

Re: Vision Problems Under Regional Lights[GRIP]
 
offset the led ring so one side is a close as possible to center without occluding vision. it will make a huge difference.

vScourge 04-07-2016 03:24 PM

Re: Vision Problems Under Regional Lights[GRIP]
 
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. :)

davidaustin 04-07-2016 05:24 PM

Re: Vision Problems Under Regional Lights[GRIP]
 
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.

team-4480 04-08-2016 07:37 AM

Re: Vision Problems Under Regional Lights[GRIP]
 
Quote:

Originally Posted by Andrew Schreiber (Post 1569225)
Try reducing your acceptable Hues. Right now you're pretty much saying "any color" unless you need any color.

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

Andrew Schreiber 04-08-2016 08:13 AM

Re: Vision Problems Under Regional Lights[GRIP]
 
Quote:

Originally Posted by team-4480 (Post 1569464)
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.

RufflesRidge 04-08-2016 08:15 AM

Re: Vision Problems Under Regional Lights[GRIP]
 
Quote:

Originally Posted by team-4480 (Post 1569464)
I want to contain those values, but without the full range, the contour I want doesn't show up.

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.

pilleya 04-08-2016 08:32 AM

Re: Vision Problems Under Regional Lights[GRIP]
 
Quote:

Originally Posted by GreyingJay (Post 1569233)
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.

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:)

Background 04-08-2016 09:04 AM

Re: Vision Problems Under Regional Lights[GRIP]
 
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.

euhlmann 04-08-2016 09:35 AM

Re: Vision Problems Under Regional Lights[GRIP]
 
Quote:

Originally Posted by vScourge (Post 1569252)
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. :)

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.


All times are GMT -5. The time now is 09:16 PM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi