View Single Post
  #1   Spotlight this post!  
Unread 25-01-2012, 13:22
enrique's Avatar
enrique enrique is offline
Registered User
FRC #1251 (Tech Tigers)
Team Role: Electrical
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Florida
Posts: 87
enrique will become famous soon enough
Send a message via Yahoo to enrique
Camera GetImage not getting image

I'm having trouble with the call to GetImage.
I'm getting a connection to the camera because if I unhook the cat 5 I get a connect error on the "AxisCamera::GetInstance("10.12.51.11");" line. but when when I call GetImage, I get nothing. The width is 0 and IsFreshImage is always false. Am I missing something?


if (m_CamEnabled)
{
int iWidth = 0;
AxisCamera &m_camera = AxisCamera::GetInstance("10.12.51.11");
HSLImage *image = m_camera.GetImage();
Error &err = m_camera.GetError();
if (err.GetLineNumber() != 0)
{
printf("AxisCamera error number %f \n", err.GetLineNumber());
printf(err.GetMessage());
}

if (telePeriodicLoops < 2)
{
m_camera.WriteResolution(AxisCamera::kResolution_3 20x240);
m_camera.WriteCompression(20);
m_camera.WriteBrightness(0);
}
//if (m_camera.IsFreshImage())
//{
// get the camera image
//m_camera.IsFreshImage();
iWidth = image->GetWidth();
if (iWidth > 0)
{
Reply With Quote