I have been using a Dragonfly Express camera from Point Grey Research for a few months. I have written code to use the camera and grab images with it. Lately I have updated the firmware and SDK from 2 to 2.2, since then I was unable to grab images using my code. The new FlyCapture2 control panel(2.2) works and is able to capture video using the same camera. Specifically, I am getting an error when I call StartCapture on the Camera object. I am pasting the output from my program, and I will add the relevant camera code afterwards:
* CAMERA INFORMATION * Serial number - 7340769 Camera model - Dragonfly Express DX-BW Camera vendor - Point Grey Research Sensor - Kodak KAI-0340DM (1/3" 640x480 CCD) Resolution - 648x484 Firmware version - 1.1.1.21 Firmware build time - Wed Jun 21 23:01:00 2006
Error Trace: Source: .\IidcCameraInternal.cpp(429) Built: Sep 23 2010 12:41:46 - Error starti ng isochronous stream. +-> From: .\Iso.cpp(1515) Built: Sep 23 2010 12:41:43 - Failed isochronous start . Error: 0x15.
bool
Camera::Start()
{
FlyCapture2::BusManager busMgr;
unsigned int numCameras;
error = busMgr.GetNumOfCameras(&numCameras);
if (error != FlyCapture2::PGRERROR_OK)
{
error.PrintErrorTrace();
return false;
}
FlyCapture2::PGRGuid guid;
{
error = busMgr.GetCameraFromIndex(0, &guid);
if (error != FlyCapture2::PGRERROR_OK)
{
error.PrintErrorTrace();
return false;
}
}
// Connect to a camera
error = cam.Connect(&guid);
if (error != FlyCapture2::PGRERROR_OK)
{
error.PrintErrorTrace();
return false;
}
// Get the camera information
FlyCapture2::CameraInfo camInfo;
error = cam.GetCameraInfo(&camInfo);
if (error != FlyCapture2::PGRERROR_OK)
{
error.PrintErrorTrace();
return false;
}
FlyCapture2::FC2Config Config;
FlyCapture2::TriggerDelay Trigger;
cam.GetTriggerDelay (&Trigger);
Trigger.absValue = 0.000075;
Trigger.onOff = true;
error = cam.SetTriggerDelay (&Trigger);
if (error != FlyCapture2::PGRERROR_OK)
{
error.PrintErrorTrace();
return false;
}
FlyCapture2::StrobeControl s;
{
FlyCapture2::TriggerMode Mode;
memset (&Mode, 0, sizeof(Mode));
Mode.source = 0;
error = cam.GetTriggerMode (&Mode);
if (error != FlyCapture2::PGRERROR_OK)
{
error.PrintErrorTrace();
return false;
}
Mode.mode = 14;
Mode.onOff = true;
Mode.polarity = 1;
error = cam.SetTriggerMode (&Mode);
if (error != FlyCapture2::PGRERROR_OK)
{
error.PrintErrorTrace();
return false;
}
}
{
FlyCapture2::Property p;
memset (&p, 0, sizeof(p));
p.type = FlyCapture2::AUTO_EXPOSURE;
p.onOff = false;
error = cam.SetProperty (&p);
if (error != FlyCapture2::PGRERROR_OK)
{
error.PrintErrorTrace();
return false;
}
memset (&p, 0, sizeof(p));
p.type = FlyCapture2::BRIGHTNESS;
p.absControl = true;
p.absValue = Brightness;
error = cam.SetProperty (&p);
if (error != FlyCapture2::PGRERROR_OK)
{
error.PrintErrorTrace();
return false;
}
memset (&p, 0, sizeof(p));
p.type = FlyCapture2::SHUTTER;
p.absControl = true;
p.absValue = Shutter;
p.onOff = false;
error = cam.SetProperty (&p);
if (error != FlyCapture2::PGRERROR_OK)
{
error.PrintErrorTrace();
return false;
}
memset (&p, 0, sizeof(p));
p.type = FlyCapture2::GAIN;
p.absControl = true;
p.absValue = Gain;
p.onOff = false;
error = cam.SetProperty (&p);
if (error != FlyCapture2::PGRERROR_OK)
{
error.PrintErrorTrace();
return false;
}
bool IsStandard = false;
{
error = cam.SetVideoModeAndFrameRate (FlyCapture2::VideoMode::VIDEOMODE_640x480Y8, FlyCapture2::FRAMERATE_60 );
if (error != FlyCapture2::PGRERROR_OK)
{
error.PrintErrorTrace();
return false;
}
FlyCapture2::Format7ImageSettings f7;
memset (&f7, 0, sizeof(f7));
f7.mode = FlyCapture2::MODE_0;
float Percent = 1;
f7.mode = FlyCapture2::MODE_0;
f7.height = h;
f7.width = w;
f7.offsetX = 4+((640-w)/2);
f7.offsetY = 2+((480-h)/2);
f7.pixelFormat = FlyCapture2::PIXEL_FORMAT_MONO8;
Percent = 100;
bool Valid = false;
FlyCapture2::Format7PacketInfo Info;
error = cam.ValidateFormat7Settings (&f7, &Valid, &Info);
if (error != FlyCapture2::PGRERROR_OK)
{
error.PrintErrorTrace();
return false;
}
error = cam.SetFormat7Configuration (&f7, Info.recommendedBytesPerPacket);
if (error != FlyCapture2::PGRERROR_OK)
{
error.PrintErrorTrace();
return false;
}
}
}
cam.GetConfiguration ( &Config);
Config.grabTimeout = 4000;
Config.numBuffers = 120;
Config.grabMode = FlyCapture2::BUFFER_FRAMES;
error = cam.SetConfiguration ( &Config);
if (error != FlyCapture2::PGRERROR_OK)
{
error.PrintErrorTrace();
return false;
}
PrintCameraInfo(&camInfo);
// Start capturing images
error = cam.StartCapture();
if (error != FlyCapture2::PGRERROR_OK)
{
error.PrintErrorTrace();
return false;
}
}