|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools |
Rating:
|
Display Modes |
|
#1
|
|||
|
|||
|
Axis Camera Exception: No Image Available [Answered]
Hey all,
I've recently encountered a problem in saving images from the axis camera (M1101). I setup the camera according to instructions and it is working perfectly fine in every other aspect. I get a stream to the dashboard and it can be successfully pinged. However, when I try to use the getImage() function in my code I get an AxisCameraException saying no image is found even though the SmartDashboard is streaming well. This is my code (very simple): Code:
try
{
Axis.getInstance("10.43.38.11").getImage().write("image.jpg");
}
catch (AxisCameraException ace)
{
ace.printStackTrace();
}
catch (NIVisionException nive)
{
nive.printStackTrace();
}
Evan Dastin-van Rijn Last edited by theonlydvr : 23-01-2014 at 10:50. Reason: Answered |
|
#2
|
|||||
|
|||||
|
Re: Axis Camera Exception: No Image Available
Once you get the instance of the camera it takes a few seconds to actually complete the connection, so for about 5-7 seconds after getting the instance no images will be available. Try getting the instance of the camera in robotInit and accessing it from there. We ran into this problem on Tuesday and that fixed it for us.
|
|
#3
|
|||
|
|||
|
Re: Axis Camera Exception: No Image Available
Quote:
|
|
#4
|
|||
|
|||
|
Re: Axis Camera Exception: No Image Available
Thanks so much for the replies!
I am no longer getting the exception however when I ftp to the cRIO (10.43.38.2) in my browser "image.jpg" doesn't show up. Am I correct in thinking the .write() function for Image writes tot he home directory of the cRIO and if not where does it save to? Thanks, Evan |
|
#5
|
|||
|
|||
|
Never mind, I figured it out. I found where the image was saved: 10.43.38.2/ni-rt/system. Thanks for all the help again!
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|