Recording from multiple cameras
Posted: Thu Mar 27, 2008 2:15 am
Hello,
I'm trying to get synchronized data from two V100 cameras. They are connected using the sync cable, and I call 'cameraCollection->Synchronize()' before start recording. I'm calling 'GetFrame' for each camera, but i'm having troubles getting the data. Here are my questions:
-how I know which frames from different cameras correspond to same time? Using the ID?
-using a single camera (calling 'Start' for only one of them), 'GetFrame' with 10 secs timeout works fine, but the soft crashes when using both cameras (calling 'Start' for both cameras)
-using a single camera, I get frames with consecutive IDs; using two cameras, some IDs are missing. Does this mean that I'm loosing frames?
-sometimes I get NULL frames calling GetFrame with INFINITE timeout. What does this means?
Some additional data:
-using W2K;
-using a Win32 console app developed with VC8;
-using 'SetOption(NP_OPTION_SEND_FRAME_MASK,(CComVariant)(NP_FRAME_SENDINVALID | NP_FRAME_SENDEMPTY))' for both cameras;
-code calling 'GetFrame' for two cameras:
for(i=0;iGetFrame(0,&frame);
if(frame!=NULL)
break;
Sleep(10);
};
long id=0, count;
frame->get_Id(&id);
printf("Frame ID: %d - %d\n",id,j);
frame->Free();
frame.Release();
};
};
Thank you in advance,
JL.
I'm trying to get synchronized data from two V100 cameras. They are connected using the sync cable, and I call 'cameraCollection->Synchronize()' before start recording. I'm calling 'GetFrame' for each camera, but i'm having troubles getting the data. Here are my questions:
-how I know which frames from different cameras correspond to same time? Using the ID?
-using a single camera (calling 'Start' for only one of them), 'GetFrame' with 10 secs timeout works fine, but the soft crashes when using both cameras (calling 'Start' for both cameras)
-using a single camera, I get frames with consecutive IDs; using two cameras, some IDs are missing. Does this mean that I'm loosing frames?
-sometimes I get NULL frames calling GetFrame with INFINITE timeout. What does this means?
Some additional data:
-using W2K;
-using a Win32 console app developed with VC8;
-using 'SetOption(NP_OPTION_SEND_FRAME_MASK,(CComVariant)(NP_FRAME_SENDINVALID | NP_FRAME_SENDEMPTY))' for both cameras;
-code calling 'GetFrame' for two cameras:
for(i=0;iGetFrame(0,&frame);
if(frame!=NULL)
break;
Sleep(10);
};
long id=0, count;
frame->get_Id(&id);
printf("Frame ID: %d - %d\n",id,j);
frame->Free();
frame.Release();
};
};
Thank you in advance,
JL.