Go to Post ...the future of FIRST is very bright with all the great students and mentors coming out of the program, staying involved, and contributing their ideas and energy. - Jason Morrella [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 09-02-2016, 08:26
MaximGalkin MaximGalkin is offline
Registered User
FRC #2590
 
Join Date: Feb 2016
Location: Earth
Posts: 5
MaximGalkin is an unknown quantity at this point
Camera Gradually Changes Color Based on Lighting

I have been having issues with the M1013 axis camera changing the color of the image and the target. Instead of being green the tape appears to reflect white light. If I hold my hand in front of the lens for a couple of seconds and remove it I can see the target in green light, however it immediately starts to turn into blueish green and eventually white. We have used a sheet of white paper and a flashlight to set our white balance and switch it to "hold current", as suggested, however neither that nor any of the presets had any effect on the color change. We also tried to change these settings by initializing the camera in Begin.vi and turning auto white balance off there, however that also didn't help. If anyone has resolved similar issues or knows what the problem is, please respond with your suggested solution.
  #2   Spotlight this post!  
Unread 09-02-2016, 22:06
Justin Buist Justin Buist is offline
Registered User
FRC #4003 (TriSonics)
Team Role: Mentor
 
Join Date: Feb 2015
Rookie Year: 2015
Location: Allendale, MI
Posts: 22
Justin Buist is an unknown quantity at this point
Re: Camera Gradually Changes Color Based on Lighting

If it were me I'd just change the camera settings on the actual camera itself. From the driver station, with everything on and you on the wireless network, point a web browser to 10.te.am.20 and you should get to the Axis camera. Login from there, click 'Setup' in the upper right corner, then expand the 'Camera' menu that's on the left and you'll see a menu choice for changing exposure, white balance, etc. Do it there and they'll stick. I wouldn't mess with it in code.
  #3   Spotlight this post!  
Unread 09-02-2016, 22:09
MaximGalkin MaximGalkin is offline
Registered User
FRC #2590
 
Join Date: Feb 2016
Location: Earth
Posts: 5
MaximGalkin is an unknown quantity at this point
Re: Camera Gradually Changes Color Based on Lighting

I already did that and followed the instructions on the first website. Nothing changed.
  #4   Spotlight this post!  
Unread 09-02-2016, 22:44
cmwilson13's Avatar
cmwilson13 cmwilson13 is offline
Registered User
AKA: Christopher Wilson
no team
Team Role: Mentor
 
Join Date: Apr 2008
Rookie Year: 2008
Location: buford GA
Posts: 91
cmwilson13 has a spectacular aura aboutcmwilson13 has a spectacular aura aboutcmwilson13 has a spectacular aura about
Re: Camera Gradually Changes Color Based on Lighting

we had the same issue it will not hold settings. we have never had this issue in the past. we logged into the camera and used the web interface and still it auto adjusts when everything is set to hold current. we have used it many times before and never had this issue
__________________
"Like the WWF, but for smart people." -George HW Bush

Team Member 1771 2008-2009
Team Mentor 1771 2010-2012 2014-2016
Team Mentor 4509 2013-2014
Team Mentor 3998 2013-2014
  #5   Spotlight this post!  
Unread 10-02-2016, 00:13
Justin Buist Justin Buist is offline
Registered User
FRC #4003 (TriSonics)
Team Role: Mentor
 
Join Date: Feb 2015
Rookie Year: 2015
Location: Allendale, MI
Posts: 22
Justin Buist is an unknown quantity at this point
Re: Camera Gradually Changes Color Based on Lighting

Sorry, I use the M1011 and M1013 at work for security cams and know the interface so I posted what I assumed would be right. Last year (my first year as a mentor) we used the M1011 and just mucked with the on-camera settings as I recollect.

Digging into the AxisCamera class's source code I see that it shoves the camera config back at the camera via an HTTP request after every single frame -if- there was a change. So, basically on your first pull it's going to revert back to the defaults in AxisCamera.java because on creation it assumes the config params are "dirty" and need to be pushed to the camera.

Still, not sure why setting the camera to "hold current" isn't working. I might try and find time tomorrow to construct a URL as the AxisCamera code does and manually hit some of mine at work and see if they actually change config.

That said, and this might be a HORRIBLE suggestion, but the AxisCamera class is using the username FRC and password FRC to do everything. If you neutered that account on the Axis camera to be readonly/viewer(whatever they call it) instead of an admin user it couldn't change the camera settings on you but it'll still be able to read images.
  #6   Spotlight this post!  
Unread 11-02-2016, 19:19
MaximGalkin MaximGalkin is offline
Registered User
FRC #2590
 
Join Date: Feb 2016
Location: Earth
Posts: 5
MaximGalkin is an unknown quantity at this point
Re: Camera Gradually Changes Color Based on Lighting

We now tried the camera with no LabVIEW code, not even connected to the robot, and it still changes color. In our setting the target appears to reflect green light at ~3 ft, turns blue from 3 to 13 ft and from then on appears completely white. We tried it again with all of the fixed white balance options and setting our own with a flashlight, no change.
  #7   Spotlight this post!  
Unread 11-02-2016, 20:18
MaximGalkin MaximGalkin is offline
Registered User
FRC #2590
 
Join Date: Feb 2016
Location: Earth
Posts: 5
MaximGalkin is an unknown quantity at this point
Re: Camera Gradually Changes Color Based on Lighting

We did the same test under the same conditions with M206 and it worked perfectly fine. The color remained the same regardless of distance.
  #8   Spotlight this post!  
Unread 11-02-2016, 20:36
MaximGalkin MaximGalkin is offline
Registered User
FRC #2590
 
Join Date: Feb 2016
Location: Earth
Posts: 5
MaximGalkin is an unknown quantity at this point
Re: Camera Gradually Changes Color Based on Lighting

We were able to reproduce our color changing issue from M1013 on M206 by setting M206's exposure setting to "Automatic". Additionally, setting white balance to Automatic on M206 did not produce any noticeable changes. So it seems like we are having issues setting our exposure on M1013. However, the overall darkness stays the same on M1013 and the only thing that changes at all is the light reflecting off the target.
  #9   Spotlight this post!  
Unread 12-02-2016, 12:45
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Camera Gradually Changes Color Based on Lighting

I think there are sever small things mixing together to cause the symptoms you are reporting.

The camera has a number of things it will auto -- white balance and exposure are the two that I think you probably need to set to manual values. The auto feature of the camera "looks" at the image and tries to do what our brain does. It has the camera decide if the light in a room is tinted and will adjust to it so that white things are white again. Similarly, it will adjust so that bright things aren't overly bright and dark things have details again. But sometimes the algorithm gets in the way, especially when we are using colored light and a dark exposure on purpose.

The default code for LabVIEW vision sets the white balance to indoor fluorescent or something similar. It doesn't matter so much what it is but that it is constant and doesn't change once you calibrate. The exposure and brightness, possibly sensor gain, are all related to the white/black balance, so you may have to set more than one of these to completely control the exposure. Small bright things aren't what the auto algorithm pays attention to so much as large areas of the image. If it overexposes, you lose the color because the sensor saturates.

As for saving settings. I personally like having these set in code. I use the device settings as a discovery mechanism to find constants for the code. As mentioned, the Axis cameras support multiple clients, clients have login permissions, and some features are not available to anonymous users. LV uses the FRC/FRC account so that it can access and modify all settings. I'm not sure what Java does.

Greg McKaskle
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 06:41.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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