Part Number: OPT8241-CDK-EVM
We are trying to connect the cameras by the following steps:
1. Connect Camera 1 to the computer with USB cable.
2. Start Voxel Viewer and start streaming.
3. Connect Camera 2 to the computer with USB cable.
4. Start another instance of Voxel Viewer and start streaming.
This should enable you to connect both cameras.
We observed the issue, even when you have two cameras connected to one PC and try to explicitly connect to one camera with VoxelCLI by specifying the serial number. It just connects you to the camera of its liking, so maybe the first one enumerated at the USB interface. So it seems to be an issue of the SDK.
How can we modify the follownig codes of SDK to save two image streams with two TOF Camera simulatously ?
///////////////////////////////////////////////////////////////////////////////
depthCamera>registerCallback(DepthCamera::FRAME_RAW_FRAME_PROCESSED, [&](DepthCamera &dc, const Frame &frame, DepthCamera::FrameType c)
{
const ToFRawFrame *d = dynamic_cast<const ToFRawFrame *>(&frame);
if(!d)
{
std::cout << "Null frame captured? or not of type ToFRawFrame" << std::endl;
return;
}
std::cout << "Capture frame " << d->id << "@" << d->timestamp;
if(lastTimeStamp != 0)
std::cout << " (" << 1E6/(d->timestamp - lastTimeStamp) << " fps)";
std::cout << std::endl;
lastTimeStamp = d->timestamp;
if(d->id == 0 && !depthCamera->saveFrameStream(dumpFileName))
{
logger(LOG_ERROR) << "Failed to open '" << dumpFileName << "'" << std::endl; }
Thanks your support.
Best Regards,
ShengHua