Go to Post Holy Orbit ball Batman!!!!!!!!!!:yikes: - yodameister [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 25-01-2016, 12:54
Ronso007 Ronso007 is offline
Registered User
FRC #3339
 
Join Date: Jan 2016
Location: Israel
Posts: 10
Ronso007 is an unknown quantity at this point
USB-Camera lower exposure

Hey guys, I have a simple question: how to lower the exposure in the usb camera lifecam HD 3000?
Reply With Quote
  #2   Spotlight this post!  
Unread 25-01-2016, 13:08
adciv adciv is offline
One Eyed Man
FRC #0836 (RoboBees)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2010
Location: Southern Maryland
Posts: 478
adciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to all
Re: USB-Camera lower exposure

Under: WPI Robotics Library->Camera->Camera Properties Look for the one that says "Set Expos"
__________________
Quote:
Originally Posted by texarkana View Post
I would not want the task of devising a system that 50,000 very smart people try to outwit.
Reply With Quote
  #3   Spotlight this post!  
Unread 25-01-2016, 13:09
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,833
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: USB-Camera lower exposure

Look in the Vision Processing.vi
One of the settings there is Camera Set Expos.
You can saturate the exposure by pointing the camera at something brighter and use Hold Current.
Look at the Context Help for that library vi for help.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #4   Spotlight this post!  
Unread 25-01-2016, 15:14
Ronso007 Ronso007 is offline
Registered User
FRC #3339
 
Join Date: Jan 2016
Location: Israel
Posts: 10
Ronso007 is an unknown quantity at this point
Re: USB-Camera lower exposure

Quote:
Originally Posted by Mark McLeod View Post
Look in the Vision Processing.vi
One of the settings there is Camera Set Expos.
You can saturate the exposure by pointing the camera at something brighter and use Hold Current.
Look at the Context Help for that library vi for help.
Quote:
Originally Posted by adciv View Post
Under: WPI Robotics Library->Camera->Camera Properties Look for the one that says "Set Expos"
Is there a way to use the Set Expos VI with the dashboard?
Reply With Quote
  #5   Spotlight this post!  
Unread 25-01-2016, 15:20
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,833
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: USB-Camera lower exposure

You could, it would take a little work.

Make a control or use one of the sample ones on the Dashboard for your code to read on the roboRIO.

In your roboRIO code when the button changes call Set Expos with the camera reference.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #6   Spotlight this post!  
Unread 25-01-2016, 15:27
Ronso007 Ronso007 is offline
Registered User
FRC #3339
 
Join Date: Jan 2016
Location: Israel
Posts: 10
Ronso007 is an unknown quantity at this point
Re: USB-Camera lower exposure

Quote:
Originally Posted by Mark McLeod View Post
You could, it would take a little work.

Make a control or use one of the sample ones on the Dashboard for your code to read on the roboRIO.

In your roboRIO code when the button changes call Set Expos with the camera reference.
Can you be specific how to do that?
Reply With Quote
  #7   Spotlight this post!  
Unread 25-01-2016, 15:54
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,833
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: USB-Camera lower exposure

  1. Start with a default project (you can add other stuff if you want to).
  2. Look in Teleop.vi for the DB/Button 1 code (with the Sample Boolean 1 output)
  3. Copy that snippet of code to the Vision Processing.vi, inside the While loop
  4. Add a separate Case statement inside the While Loop
  5. Wire the same output that feeds the Sample Boolean 1 output to the Case
  6. Copy the Camera Set Expos into the Case True case.
  7. Wire the Set Expos to the pink camera ref that comes in the left of the While Loop
  8. Change the Set Expose input constant to "Hold current"

Once you've put the new code onto the roboRIO, go to the Dashboard Basic tab and press DB/Button 1 to make the camera Hold Current exposure setting.
This would only work once and assumes that the original Set Expos is still set to "Auto".
Once set to Hold current exposure, then if you push the button a second time you won't se any change.
To get it to change again you'd need to add another Set Expos to take it back to "Auto" long enough for the camera to adjust the exposure again, then you could Hold Current again.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 25-01-2016 at 16:01.
Reply With Quote
  #8   Spotlight this post!  
Unread 25-01-2016, 16:56
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: USB-Camera lower exposure

Quote:
Can you be specific how to do that?
Here is what I'd do.

Use slider zero and button zero on the basic tab for the camera exposure. These values are automatically stored as "DB/Slider 0" and "DB/Button 0" and if your robot reads those network table variables, it gets the slider values.

Within your camera loop, in the enabled case, the code already updates the image size. Similarly, you can update the exposure by reading the button and slider and calling the Set Exposure subVI. It internally checks against current value and only modifies the camera on change.

Greg McKaskle
Attached Thumbnails
Click image for larger version

Name:	From Clipboard.png
Views:	34
Size:	45.1 KB
ID:	19878  
Reply With Quote
  #9   Spotlight this post!  
Unread 27-01-2016, 05:04
Ronso007 Ronso007 is offline
Registered User
FRC #3339
 
Join Date: Jan 2016
Location: Israel
Posts: 10
Ronso007 is an unknown quantity at this point
Re: USB-Camera lower exposure

Quote:
Originally Posted by Greg McKaskle View Post
Here is what I'd do.

Use slider zero and button zero on the basic tab for the camera exposure. These values are automatically stored as "DB/Slider 0" and "DB/Button 0" and if your robot reads those network table variables, it gets the slider values.

Within your camera loop, in the enabled case, the code already updates the image size. Similarly, you can update the exposure by reading the button and slider and calling the Set Exposure subVI. It internally checks against current value and only modifies the camera on change.

Greg McKaskle
Quote:
Originally Posted by Mark McLeod View Post
  1. Start with a default project (you can add other stuff if you want to).
  2. Look in Teleop.vi for the DB/Button 1 code (with the Sample Boolean 1 output)
  3. Copy that snippet of code to the Vision Processing.vi, inside the While loop
  4. Add a separate Case statement inside the While Loop
  5. Wire the same output that feeds the Sample Boolean 1 output to the Case
  6. Copy the Camera Set Expos into the Case True case.
  7. Wire the Set Expos to the pink camera ref that comes in the left of the While Loop
  8. Change the Set Expose input constant to "Hold current"

Once you've put the new code onto the roboRIO, go to the Dashboard Basic tab and press DB/Button 1 to make the camera Hold Current exposure setting.
This would only work once and assumes that the original Set Expos is still set to "Auto".
Once set to Hold current exposure, then if you push the button a second time you won't se any change.
To get it to change again you'd need to add another Set Expos to take it back to "Auto" long enough for the camera to adjust the exposure again, then you could Hold Current again.
Thank you guys for your AMAZING answers!
One last thing, the set Expos sub-vi input is in precentage values and when we put 0 precent it's really dark and when we put any other number it's normal(1,10,50,0.5)... any ideas what is the range?

Last edited by Ronso007 : 27-01-2016 at 05:13.
Reply With Quote
  #10   Spotlight this post!  
Unread 27-01-2016, 07:23
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: USB-Camera lower exposure

It will be camera specific. Vision Assistant will show you the range values of the camera exposure, and the percentage is scaled between their min and max values for that property.

Be sure to have enough light that the camera will actually use your value. Testing a camera in varying light can be confusing, as the cameras decide to outsmart you and send you chasing after untamed geese.

Greg McKaskle
Reply With Quote
  #11   Spotlight this post!  
Unread 27-01-2016, 09:14
robert1356 robert1356 is offline
Registered User
AKA: Robert Palmer
FRC #3824 (RoHAWKtics)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2012
Location: Knoxville, TN
Posts: 48
robert1356 is an unknown quantity at this point
Re: USB-Camera lower exposure

Quote:
Originally Posted by adciv View Post
Under: WPI Robotics Library->Camera->Camera Properties Look for the one that says "Set Expos"
This does NOT seem to work. See http://www.chiefdelphi.com/forums/sh...d.php?t=142633 - I'm using the setExposureManual() and setBrightness() methods on the USBCamera class and I'm not seeing a change.
Reply With Quote
  #12   Spotlight this post!  
Unread 27-01-2016, 10:55
adciv adciv is offline
One Eyed Man
FRC #0836 (RoboBees)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2010
Location: Southern Maryland
Posts: 478
adciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to all
Re: USB-Camera lower exposure

Just checking, are you using Labview or C++?
__________________
Quote:
Originally Posted by texarkana View Post
I would not want the task of devising a system that 50,000 very smart people try to outwit.
Reply With Quote
  #13   Spotlight this post!  
Unread 27-01-2016, 17:33
robert1356 robert1356 is offline
Registered User
AKA: Robert Palmer
FRC #3824 (RoHAWKtics)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2012
Location: Knoxville, TN
Posts: 48
robert1356 is an unknown quantity at this point
Re: USB-Camera lower exposure

Quote:
Originally Posted by adciv View Post
Just checking, are you using Labview or C++?
Neither - Java, though the C++ and the Java API should be the same.
Reply With Quote
Reply


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 20:26.

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