Go to Post We can be equal, but not truly the same. - Molten [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 22-02-2016, 07:32
Dinokaiz2's Avatar
Dinokaiz2 Dinokaiz2 is offline
Use your best judgement.
AKA: Kaiz
FRC #4561 (TerrorBytes)
Team Role: Leadership
 
Join Date: Aug 2015
Rookie Year: 2012
Location: North Carolina
Posts: 30
Dinokaiz2 has a spectacular aura aboutDinokaiz2 has a spectacular aura aboutDinokaiz2 has a spectacular aura about
Re: HD-3000 camera has wasted many hours

Quote:
Originally Posted by Ozuru View Post
What was your issue? Setting the exposure time is simply USBCamera.setExposureManual(val).
The Microsoft LifeCam HD-3000 doesn't support having it's exposure set in this manner.

Quote:
Originally Posted by wt200999 View Post
Can you explain the issues you've had?

We've had 0 problems with exposure control on the HD-3000 camera, and are actually quite happy with it so far.
From personal experience and research, I think that the LifeCam doesn't preserve its settings after a power cycle, and, because you can't configure the settings from the RIO, it makes it difficult to have a configured camera on a robot. Usually. Some people, probably including you, wt200999, seem to have LifeCams that just work. They preserve their settings after a power cycle where other LifeCams would not. After hours of digging through Google search results, I haven't found the reason why.


OP -- The way our team solved the problem was by plugging the LifeCam into a Raspberry Pi 2, where we were able to configure its settings live using v4l2. We, however, didn't stream that camera to the dashboard, instead choosing to keep the stream on the Pi for vision processing.
  #2   Spotlight this post!  
Unread 23-02-2016, 19:32
kmckay's Avatar
kmckay kmckay is offline
Registered User
FRC #5401 (Fightin' Robotic Owls)
Team Role: Mentor
 
Join Date: Jan 2016
Rookie Year: 2015
Location: Bensalem, PA
Posts: 39
kmckay will become famous soon enough
Re: HD-3000 camera has wasted many hours

Quote:
Originally Posted by Dinokaiz2 View Post
The Microsoft LifeCam HD-3000 doesn't support having it's exposure set in this manner.



From personal experience and research, I think that the LifeCam doesn't preserve its settings after a power cycle, and, because you can't configure the settings from the RIO, it makes it difficult to have a configured camera on a robot. Usually. Some people, probably including you, wt200999, seem to have LifeCams that just work. They preserve their settings after a power cycle where other LifeCams would not. After hours of digging through Google search results, I haven't found the reason why.
Its more erratic than that. I conducted several trials today:
1. Restarted robot code from dashboard - Settings lost
2. Reset settings, power cycled robot, loaded new code - Settings lost
3. Reset settings, plugged back into rio without power cycle - settings lost
4. Did not reset settings, restarted rio from dashboard - settings worked (note, these were settings from before trial 3 that didn't show after trial 3)
5. Restart robot code from dashboard - settings worked
6. Restart RIO from button on rio - settings worked
7. Load new code - settings worked
8. Hard power cycle (turn power switch off/on) - settings worked

If anyone has example code using USBCamera successfully, it would be greatly appreciated.
  #3   Spotlight this post!  
Unread 23-02-2016, 20:56
wt200999's Avatar
wt200999 wt200999 is offline
Texas Instruments
AKA: Will Toth
FRC #3005 (Robochargers)
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2004
Location: Dallas, Texas
Posts: 322
wt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud of
Send a message via MSN to wt200999
Re: HD-3000 camera has wasted many hours

We've eliminated these issues by always writing the camera settings to the camera when the code starts.

We do this with a csv file that has a list of all the attributes that we care about stored on the roboRIO. When the code loads we loop through each setting and set the camera accordingly.

The list of attributes and the list for the csv I have saved in a google doc here. Each tab has some different info, the 'optimal settings' I listed is for the vision tracking and not good for viewing. The 'Values for CSV' tab is a copy of the actual csv file that we send to the robot.

I've attached the LabVIEW code we used, I do not know the equivalent IMAQ function, but it may give you an idea.

Click image for larger version

Name:	WPILib Camera Set Attributes From File.png
Views:	59
Size:	38.0 KB
ID:	20173
Attached Files
File Type: vi WPILib Camera Set Attributes From File.vi (21.8 KB, 9 views)
__________________
Programming in LabVIEW? Try VI Snippets!

FIRST LEGO League 2004 - 2005
FRC Team 870 Student 2006 - 2009
FRC Team 3005 Mentor 2013 -
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 07:01.

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