Go to Post Measure it with a micrometer, mark it with chalk, and cut it with an axe. This is not an exact science. - Jim Meyer [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
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 30-01-2016, 14:28
DGoldDragon28's Avatar
DGoldDragon28 DGoldDragon28 is offline
Programmer
FRC #1719 (The Umbrella Corporation)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2015
Location: Baltimore, MD
Posts: 10
DGoldDragon28 is an unknown quantity at this point
[HELP NEEDED] IMAQdx USB camera settings

Using the LifeCam-3000, we are attempting to send a feed to the SmartDashboard. To do this, we grab from it using the IMAQdx methods of com.ni.vision.NIVision. We also need to alter the exposure of the camera, so added the line:
Code:
(new USBCamera("cam0")).setExposureManual(20);
The issue is that using both on the same camera leads to the following error:
Code:
ERROR Unhandled exception: VisionException [com.ni.vision.VisionException: IMAQdxError: -1074360310: Camera is already in use.] at
[com.ni.vision.NIVision._IMAQdxOpenCamera(Native Method),
com.ni.vision.NIVision.IMAQdxOpenCamera(NIVision.java:30334),
edu.wpi.first.wpilibj.vision.USBCamera.openCamera(USBCamera.java:72),
edu.wpi.first.wpilibj.vision.USBCamera.<init>(USBCamera.java:63),
org.usfirst.frc.team1719.robot.Robot.robotInit(Robot.java:78),
edu.wpi.first.wpilibj.IterativeRobot.startCompetition(IterativeRobot.java:72),
edu.wpi.first.wpilibj.RobotBase.main(RobotBase.java:241)]
WARNING: Robots don't quit!
There is no way that we found to use the IMAQdx session to change the exposure, so we ask here for aid.
Reply With Quote
  #2   Spotlight this post!  
Unread 30-01-2016, 14:36
IronicDeadBird's Avatar
IronicDeadBird IronicDeadBird is offline
Theory Crafting Fo days...
AKA: Charles Ives "M" Waldo IV
FRC #1339 (Angelbots)
Team Role: Tactician
 
Join Date: Feb 2014
Rookie Year: 2005
Location: Colorado
Posts: 952
IronicDeadBird has a reputation beyond reputeIronicDeadBird has a reputation beyond reputeIronicDeadBird has a reputation beyond reputeIronicDeadBird has a reputation beyond reputeIronicDeadBird has a reputation beyond reputeIronicDeadBird has a reputation beyond reputeIronicDeadBird has a reputation beyond reputeIronicDeadBird has a reputation beyond reputeIronicDeadBird has a reputation beyond reputeIronicDeadBird has a reputation beyond reputeIronicDeadBird has a reputation beyond repute
Re: [HELP NEEDED] IMAQdx USB camera settings

Usually when we get the "Robots don't quit" error, it is because we are initializing one sensor in more than one place. If that's not it, then we got nothing.
__________________
HERO 俺を讃える声や 喝采なんて 欲しくはないさ
I liked my team more before they stole my jacket.
Play is for kids this is serious...
Reply With Quote
  #3   Spotlight this post!  
Unread 30-01-2016, 15:09
DGoldDragon28's Avatar
DGoldDragon28 DGoldDragon28 is offline
Programmer
FRC #1719 (The Umbrella Corporation)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2015
Location: Baltimore, MD
Posts: 10
DGoldDragon28 is an unknown quantity at this point
Re: [HELP NEEDED] IMAQdx USB camera settings

That's exactly what the problem is. We are trying to figure out a way to either convert an IMAQdx session ID to a USBCamera object or to set the exposure directly from the IMAQdx session ID.
Reply With Quote
  #4   Spotlight this post!  
Unread 30-01-2016, 16:26
legts legts is offline
Autonomous Queen
FRC #2399 (The Fighting Unicorns)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2012
Location: Ohio
Posts: 73
legts is an unknown quantity at this point
Re: [HELP NEEDED] IMAQdx USB camera settings

My team used this same kind of camera, our code is here: https://github.com/frc2399/2015-code...bot/Robot.java

The main camera code is on lines 95-98, take a look at it and ask me if you have any questions!
__________________
Programming Captain on team 2399 for the 2016 season.
Programmer on team 2399 The Fighting Unicorns since 2014!
Engineering Inspiration Award GPR 2015
Semi-finalist Buckeye 2015 (thanks 4269 and 1987!)
Reply With Quote
  #5   Spotlight this post!  
Unread 30-01-2016, 17:05
DGoldDragon28's Avatar
DGoldDragon28 DGoldDragon28 is offline
Programmer
FRC #1719 (The Umbrella Corporation)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2015
Location: Baltimore, MD
Posts: 10
DGoldDragon28 is an unknown quantity at this point
Re: [HELP NEEDED] IMAQdx USB camera settings

Thank you, but our problem lies with our images coming back overexposed, which the CameraServer can't fix. We need to change the webcam's settings.
Reply With Quote
  #6   Spotlight this post!  
Unread 30-01-2016, 17:17
legts legts is offline
Autonomous Queen
FRC #2399 (The Fighting Unicorns)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2012
Location: Ohio
Posts: 73
legts is an unknown quantity at this point
Re: [HELP NEEDED] IMAQdx USB camera settings

Could you possibly change the settings of the camera?

https://wpilib.screenstepslive.com/s...amera-settings
__________________
Programming Captain on team 2399 for the 2016 season.
Programmer on team 2399 The Fighting Unicorns since 2014!
Engineering Inspiration Award GPR 2015
Semi-finalist Buckeye 2015 (thanks 4269 and 1987!)
Reply With Quote
  #7   Spotlight this post!  
Unread 30-01-2016, 18:43
DGoldDragon28's Avatar
DGoldDragon28 DGoldDragon28 is offline
Programmer
FRC #1719 (The Umbrella Corporation)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2015
Location: Baltimore, MD
Posts: 10
DGoldDragon28 is an unknown quantity at this point
Re: [HELP NEEDED] IMAQdx USB camera settings

It's a LifeCam 3000, not an Axis. We don't have the Ethernet port space for an access with the new radio.
Reply With Quote
  #8   Spotlight this post!  
Unread 30-01-2016, 19:31
legts legts is offline
Autonomous Queen
FRC #2399 (The Fighting Unicorns)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2012
Location: Ohio
Posts: 73
legts is an unknown quantity at this point
Re: [HELP NEEDED] IMAQdx USB camera settings

After you make the cam0, make a new line and call the method to set the exposure there. Try messing around with higher and lower values to see what happens. Other then that, I'm not really sure what else there is I can do without seeing your code.
__________________
Programming Captain on team 2399 for the 2016 season.
Programmer on team 2399 The Fighting Unicorns since 2014!
Engineering Inspiration Award GPR 2015
Semi-finalist Buckeye 2015 (thanks 4269 and 1987!)
Reply With Quote
  #9   Spotlight this post!  
Unread 30-01-2016, 19:43
DGoldDragon28's Avatar
DGoldDragon28 DGoldDragon28 is offline
Programmer
FRC #1719 (The Umbrella Corporation)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2015
Location: Baltimore, MD
Posts: 10
DGoldDragon28 is an unknown quantity at this point
Re: [HELP NEEDED] IMAQdx USB camera settings

Thanks for the input, but we tried that. We are probably going to offload this process anyway, so I'll get back to you.
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 10:52.

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