try this. its a simple camera code maybe it will help?
HSLImage image; // Create and set up a camera instance AxisCamera
&camera = AxisCamera::getInstance(); camera.writeResolution(k160x120);
camera.writeBrightness(0); Wait(3.0); // loop getting images from the
camera and finding targets while (IsOperatorControl())
{ // Get a camera
image camera.GetImage(image.image);
// do something with image here . . . }