- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, what I'm trying to do is to modify depth image acquired through PXCSManager::QuerySample() and then map it to color image acquired in the same way.
So this is what I'm doing:
void SampleProcessor::CaptureFrame(PXCSenseManager* pxcsManager, const PXCCapture::Sample* sample, char lastCapturedCharacter) { defaultFilter(sample->depth, pxcsManager->QueryCaptureManager()->QueryDevice()->QueryDepthLowConfidenceValue()); auto result = _projection->CreateColorImageMappedToDepth(timage, sample->color); }
void SampleProcessor::defaultFilter(PXCImage * toFilter, const pxcF32 & defaultValue) { auto imageData = PXCImage::ImageData(); //Todo: think about removing duplication with save function. Alternative to python decorators? if (toFilter->AcquireAccess(PXCImage::ACCESS_READ_WRITE, PXCImage::PIXEL_FORMAT_DEPTH_F32, &imageData) < PXC_STATUS_NO_ERROR) { return; } filterDepth(imageData, toFilter->QueryInfo(), [](pxcF32) { return true; }, defaultValue); toFilter->ReleaseAccess(&imageData); }
And "result" here is always null. If I pass to projection just sample->depth, sample->color then it returns valid image.
What am I doing wrong here?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So for anyone with the same trouble:
I've been calling AcquireAccess with PXCImage::ACCESS_READ_WRITE (though the same true for PXCImage::ACCESS_WRITE) and PXCImage::PIXEL_FORMAT_DEPTH_F32.
This were causing internal pixel format to be transformed from default to PIXEL_FORMAT_DEPTH_F32.
And it seems that PXCProjection is not working with the images that have this pixel format (though it's not specified in documentation, or at least I can't find any mentioning of this). And CreateColorImageMappedToDepth just returns nullptr when called with the image with this pixel format. Which is really informative =/.
PXCProjection::QueryUVMap in same situation returns STATUS_PARAM_UNSUPPORTED which is a bit more informative and led me to experimenting with pixel format.
So to sum it up: you should not use images with PIXEL_FORMAT_DEPTH_F32 as parameters to PXCProjection.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Vladyslav,
Thanks for your feedback. The functionality which allows to use PIXEL_FORMAT_DEPTH_F32 image as a parameters to PXCProjection was implemented and will be available in a future release of the SDK.
![](/skins/images/872293744008A34B36F8ABF94A46CC66/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page