![]() |
CAMERA CODE HELP!!
Hey guys i was wondering if anyone knew how to get the camera feed on the dashboard?? the camera worked fine last year with the following code
AxisCamera.getInstance().writeResolution(AxisCamer a.ResolutionT.k320x240); AxisCamera.getInstance().writeBrightness(0); but this year it does not work. Whenever this camera code is put onto our robot, nothing happens, and the drive does not work either. it totally kills the code. any suggestions?? team 1652 |
Re: CAMERA CODE HELP!!
Make sure you have
Code:
AxisCamera camera = AxisCamera.getInstance(); |
Re: CAMERA CODE HELP!!
Also, make sure there is an account on the camera with a username of "FRC" and a password of "FRC" (without quotations for each). Apparently you couldn't have a feed without that account last year as well. I just found out, and now we have a working feed. Time for bed now. :D
|
Re: CAMERA CODE HELP!!
We are also having trouble with getting the camera to show on the dashboard.
For configuring it do we need to change the subnet? or router IP? |
Re: CAMERA CODE HELP!!
Quote:
if the camera is not connected it causes the system to crash. I ran into this every time i removed the camera from the system. Quote:
also check out this response from NI http://decibel.ni.com/content/docs/DOC-9552 |
Re: CAMERA CODE HELP!!
Also, note that when you call "getInstance" of the AxisCamera, it initializes and returns a class the first time you do this. If you don't capture this class in a variable and keep it "alive" during the whole of your robot's run, it will get garbage collected and the thread it creates to relay information will be killed.
|
Re: CAMERA CODE HELP!!
Quote:
Code:
public class AxisCamera implements ISensor{To get back to the original question: Make sure the camera is configured per the instructions located here: http://www.usfirst.org/uploadedFiles...our_Camera.pdf If there is any console output that you see before the program stops, posting that may be helpful. |
Re: CAMERA CODE HELP!!
Don't try to adjust any camera settings from your code. Do all of your setting adjustments by going to the camera's webpage by connecting directly to it with your computer. The reason I say this, is because from my experience this year WPI Lib's camera parameters code is broken and crashes if you try to adjust any parameters.
In other words, try using just one line of code for streaming images from the camera: Quote:
|
| All times are GMT -5. The time now is 22:17. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi