Software Archive
Read-only legacy content
17061 Discussions

Depth stream shows up as RGB steram

Jer_Shyan_C_
Beginner
339 Views

Hi guys, I've just started using the Intel RealSense SDK and am trying to come up with a simple application to get the depth streams. At first I followed the examples in the doc, to create a SenseManager and get both the depth and color streams, using the following code:

auto _sm = PXCSenseManager::CreateInstance();
if (!_sm) {
	printf("Error creating SenseManager\n");
}

_sm->EnableStream(PXCCapture::STREAM_TYPE_COLOR, 640, 480);
_sm->EnableStream(PXCCapture::STREAM_TYPE_DEPTH, 640, 480);
pxcStatus rc = _sm->Init();
if (rc < PXC_STATUS_NO_ERROR) {
	printf("Error initializing: %d\n", rc);
}

The code works if I remove the line enabling the depth stream. But weirdly, the image data I get from the sample using QuerySample() gives me the depth image data. This is how I acquire the image data:

PXCCapture::Sample* sample = _sm->QuerySample();
PXCImage::ImageData imgData;
sample->color->AcquireAccess(PXCImage::ACCESS_READ, &imgData);

Also, when I enumerate the devices and query device info, I notice that the device named "Intel(R) RealSense(TM) 3D Camera (Front F200) Depth" is listed with StreamType::STREAM_TYPE_COLOR. I wonder if anyone else has faced this problem before?

0 Kudos
0 Replies
Reply