Software Archive
Read-only legacy content
17061 Discussions

Multiple Cameras in Practice

bo_z_2
Beginner
287 Views

Hello, folks.

I've been trying to hook up two SR300 cams at the same time. I see on the forum it is now possible with the new release of 2016 R2 SDK. However, I didn't find out a functional example yet. 

Here, Streaming through SenseManager, it says 

It is possible to create multiple instances of the SenseManager interface to work with different cameras.

It seems to be possible to set the camera at this member function, EnableStream

PXCVideoModule::DataDesc ddesc;
ddesc.deviceInfo = dvinfo;
pSenseManager->EnableStream(&ddesc);

while the device information can be obtained through enumeration.

for (int d = 0;; d++)	{
	PXCCapture::DeviceInfo dinfo;
	if (pCap->QueryDeviceInfo(d, &dinfo) < pxcStatus::PXC_STATUS_NO_ERROR)
	{
		break;
	};
//...
}

It is not yet working though. Could any one give me a clue the right way to do this?

0 Kudos
2 Replies
bo_z_2
Beginner
287 Views

Finally made it. Referenced sample code from FF_ObjectTracking.

PXCCaptureManager *captureMgr = pSenseManager->QueryCaptureManager();
captureMgr->FilterByDeviceInfo(&dvinfo);
pSenseManager->EnableStream(PXCCapture::STREAM_TYPE_COLOR);

With device info obtained as above. It is possible to fill it in two SenseManager in multiple threads. 

std::thread th(readFrame, pSenseManager, dvinfos[0]);
std::thread th2(readFrame, pSenseManager2, dvinfos[1]);
th.join();
th2.join();

 

0 Kudos
bo_z_2
Beginner
287 Views

But the interference is heavy, which makes it practically impossible. See my demo video here.

0 Kudos
Reply