|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||||
|
|||||
|
Axis camera setup problem
Team was setting up camera today. We have it configured through the cRIO. When browsing to the camera's IP address while it is connected via ethernet, the camera displays on the page. Then, when we switch to the driver account, we connect it through the cRIO and it displays a white screen on the camera area of the driver panel. cRIO is formatted for c++.
How do we make it actually display video on the driver panel? |
|
#2
|
||||
|
||||
|
Re: Axis camera setup problem
Did you include the DashboardDataFormat.cpp/.h code from the examples? You need to include them and it has a function sendVisionData() (or something similar, this is from my memory) that you need to call in your robot loop so it will send the camera data to the dashboard app.
|
|
#3
|
|||
|
|||
|
Re: Axis camera setup problem
Quote:
You basically need to do a few things, Code:
// In your constructor
AxisCamera &camera = AxisCamera::GetInstance();
camera.WriteResolution(CAMERA_RESOLUTION);
camera.WriteCompression(CAMERA_COMPRESSION);
camera.WriteBrightness(CAMERA_BRIGHTNESS);
camera.WriteMaxFPS(CAMERA_MAX_FPS);
camera.WriteExposureControl(CAMERA_EXPOSURE);
camera.WriteWhiteBalance(CAMERA_WHITE_BALANCE);
// When you want to display a new image.
if (camera.IsFreshImage()) {
HSLImage *image = camera.GetImage();
}
|
|
#4
|
|||||
|
|||||
|
Re: Axis camera setup problem
Would these solutions work for the new axis M1011 camera?
|
|
#5
|
|||
|
|||
|
Re: Axis camera setup problem
Quote:
Code:
AxisCamera &camera = AxisCamera::GetInstance(); Last edited by EdenA : 24-01-2011 at 03:38. |
|
#6
|
|||
|
|||
|
Re: Axis camera setup problem
I suspect the problem is related to changing parameters while a MJPG stream is underway. There is apparently some code that doesn't deal appropriately with the camera returning an error and no image, and that results in a bad pointer reference.
Hopefully the error handling will be improved, but you may be able to use the API just fine by stopping the MPEG stream, changing the params, and starting it up again. Greg McKaskle |
|
#7
|
|||
|
|||
|
Re: Axis camera setup problem
We are having similar data access crashes with our M1011 camera. There appears to be a good information in the RobotPy thread on the same problem:
http://www.chiefdelphi.com/forums/sh...ad.php?t=90687 There is a potential patch up at WPIforge and will require some expertise to re-build the WPILib. I guess I know what I'll be doing at our shop this afternoon. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|