Go to Post Accidents happen, but they can be prevented with just a LITTLE bit of forethought. - AdamC [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 21-02-2016, 22:19
rod@3711 rod@3711 is offline
Registered User
AKA: rod nelson
FRC #3711 (Iron Mustangs)
Team Role: Mentor
 
Join Date: May 2014
Rookie Year: 2014
Location: Trout Lake, WA
Posts: 64
rod@3711 is an unknown quantity at this point
HD-3000 camera has wasted many hours

Exposure control with the HD-3000 caused us grief last year. We assumed its problems would get resolved this year. No way. I could estimate that we wasted over 100 hours screwing with that camera.

Tonight we switched to a Logitech (920 I think) and all the problems went away. Now we have a front viewing camera and a back viewing camera and it all works like we had hoped.
  #2   Spotlight this post!  
Unread 21-02-2016, 23:34
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: 323
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

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.
__________________
Programming in LabVIEW? Try VI Snippets!

FIRST LEGO League 2004 - 2005
FRC Team 870 Student 2006 - 2009
FRC Team 3005 Mentor 2013 -
  #3   Spotlight this post!  
Unread 21-02-2016, 23:46
Ozuru's Avatar
Ozuru Ozuru is offline
It's always the programmer's fault.
no team
 
Join Date: May 2013
Rookie Year: 2010
Location: Earth
Posts: 268
Ozuru is a splendid one to beholdOzuru is a splendid one to beholdOzuru is a splendid one to beholdOzuru is a splendid one to beholdOzuru is a splendid one to beholdOzuru is a splendid one to beholdOzuru is a splendid one to behold
Re: HD-3000 camera has wasted many hours

What was your issue? Setting the exposure time is simply USBCamera.setExposureManual(val).
  #4   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.
  #5   Spotlight this post!  
Unread 22-02-2016, 10:12
rod@3711 rod@3711 is offline
Registered User
AKA: rod nelson
FRC #3711 (Iron Mustangs)
Team Role: Mentor
 
Join Date: May 2014
Rookie Year: 2014
Location: Trout Lake, WA
Posts: 64
rod@3711 is an unknown quantity at this point
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).
We code in C++. For programming, we have 1 1/2 students and one crusty old mentor. Small teams do not have a lot a resources. When we waste a lot of time getting a simple camera to display on the Dashboard, we do not get to spend time on the fun things, like vision tracking or navigation.

Last year we used HD-3000 with CameraServer (like simple vision example) and found we had to go to Dashboard and select Camera HW to get it to work. It was normally washed-out (ie white), but we found if we change frame rate via Dashboard from 30 down to something, then back to 30, it would often work OK.

We use the PC based program to try to set up the HD-3000, but the changes did not persist on the roboRio. It was maddening to see great autoexposure video on PC base programs and crap on roboRio.

This year we switched to USBcamera (due to comments on Chief Delphi) and had more control, but still dissatisfying. The setExposureManual was dark if set to 0, too bright if set to 1, no change up to 10, then white above 10. We had 4 HD-3000, and they each had different settings.

We switched to Logitech and autoexposure works well enough. No settings, just works.

We still have an issue with using SmartDashboard to display video stream. We have to first bring up standard Dashboard, select "camera hw", then start Smart Dashboard and quit the standard Dashboard. This is not the best thing to have to accomplish while setting up for a match. Does anyone have a solution for this it would be appreciated.

I appreciate all support available on Chief Delphi.
  #6   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: 47
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.
  #7   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: 323
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:	62
Size:	38.0 KB
ID:	20173
Attached Files
File Type: vi WPILib Camera Set Attributes From File.vi (21.8 KB, 10 views)
__________________
Programming in LabVIEW? Try VI Snippets!

FIRST LEGO League 2004 - 2005
FRC Team 870 Student 2006 - 2009
FRC Team 3005 Mentor 2013 -
  #8   Spotlight this post!  
Unread 24-02-2016, 14:15
PhilBot's Avatar
PhilBot PhilBot is offline
Get a life? This IS my life!
AKA: Phil Malone
FRC #1629 (GaCo: The Garrett Coalition)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Maryland
Posts: 745
PhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond repute
Re: HD-3000 camera has wasted many hours

Quote:
Originally Posted by rod@3711 View Post
Exposure control with the HD-3000 caused us grief last year. We assumed its problems would get resolved this year. No way. I could estimate that we wasted over 100 hours screwing with that camera.

Tonight we switched to a Logitech (920 I think) and all the problems went away. Now we have a front viewing camera and a back viewing camera and it all works like we had hoped.
Hi

Can I ask what approach you are using to support two cameras?

Are they dual feeds, switched feeds or something else.

What control model/language do you use?

Phil.
__________________
Phil Malone
Garrett Engineering And Robotics Society (GEARS) founder.
http://www.GEARSinc.org

FRC1629 Mentor, FTC2818 Coach, FTC4240 Mentor, FLL NeXTGEN Mentor
  #9   Spotlight this post!  
Unread 03-03-2016, 11:26
rod@3711 rod@3711 is offline
Registered User
AKA: rod nelson
FRC #3711 (Iron Mustangs)
Team Role: Mentor
 
Join Date: May 2014
Rookie Year: 2014
Location: Trout Lake, WA
Posts: 64
rod@3711 is an unknown quantity at this point
Re: HD-3000 camera has wasted many hours

Quote:
Originally Posted by rod@3711 View Post
We still have an issue with using SmartDashboard to display video stream. We have to first bring up standard Dashboard, select "camera hw", then start Smart Dashboard and quit the standard Dashboard. This is not the best thing to have to accomplish while setting up for a match. Does anyone have a solution for this it would be appreciated.
The latest plugin update 0.1.0.201603020231 solved this. We can start SmartDashboard and the camera feed is live without having to kickstart via "usb camera hw".

I am about to run out of things to whine about!

Thanx.
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 18: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