- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
It seems that there is a memory leak in the implementation of the PXCProjection::CreateColorImageMappedToDepth method.
After every call, the memory usage increases, even though all the resources are being released.
Actually, if I swap CreateColorImageMappedToDepth for the other method, CreateDepthImageMappedToColor, everything runs fine with no memory leaks whatsoever.
This suggests that there is a memory leak on the method, at least on v3.3 of the SDK.
- Marcas:
- Intel® RealSense™ Technology
Link copiado
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
I think it is a bug and we will fix it in the future release. Thanks for supporting RealSense SDK.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
I'm experiencing the same memory leak issue with CreateColorImageMappedToDepth. Any guess as to when it will be fixed? I'm able to use CreateDepthImageMappedToColor as a workaround.
...Tim...
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Hi Tim,
You could use CreateDepthImageMappedToColor as that methods works fine, but it will give you an image that matches the color camera, not the depth camera, so you will end up with a smaller field of view.
That method returns a depth image aligned with the color image. Now you can just set every non zero pixel to the rgb value of its corresponding pixel in the color image (they are matched, so you can just use the same pixel coordinates).
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Thanks, yes, I'm able to use CreateDepthImageMappedToColor for the moment. As you say, it gives a smaller field of view, so it'll be nice when the CreateColorImageMappedToDepth is fixed.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Well, in theory you should be able to get the extrinsic parameter of the cameras by calibrating them yourself. You have the raw IR and the color images so you could match them, and get the KRT matrices. Once you get those, you should be able to implement the method yourself.
It would be nice to have it fixed in the SDK though.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Hi,
@Hans: did you make sure that you actually call Release() on the PXCImage you receive from the CreateDepthImageMappedToColor() ?
Best,
Markus
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
I just tested this on the latest SDK, R3 (v5.0), and it is working fine. No more memory leaks present in CreateColorImageMappedToDepth.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Hello,
I have found the memory leak still persists in newest version of RealSense SDK (intel_rs_sdk_offline_package_r6_8.0.24.6528)."
When I run the provided code sample "...RSSDK/sample/DF_Projection/", and choose "CreateColorImageMappedToDepth" from the user interface, the task manager of my PC reports 100MB increase of memory consumption every second, till the used memory reaches 1.6Gb, afterwards the mapped image stops updating.
Could you please fix this in the next release or give me a link to the previous release the does not have this memory leak?
There is no memory leak in CreateDepthImageMappedToColor, but I cannot use it instead in my application, I need CreateColorImageMappedToDepth without a memory leak.
Thank you in advance,
Best regards
Anastasia
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
David Lu (Intel) wrote:
I think it is a bug and we will fix it in the future release. Thanks for supporting RealSense SDK.
Hi, David,
I'm using the F200 camera and I also meet the memory leak problem when I use PXCProjection:CreateColorImageMappedToDepth. My SDK version is 10.0 and my camera model is F200; My code is shown below:
Mat Camera::CreateColorMappedToDepth(PXCImage *color, PXCImage *depth){ PXCImage* colorToDepthImage = this->projection->CreateColorImageMappedToDepth(depth, color); PXCImage::ImageData colorToDepth; this->retStatus = colorToDepthImage->AcquireAccess(PXCImage::ACCESS_READ, PXCImage::PIXEL_FORMAT_RGB24, PXCImage::ROTATION_0_DEGREE, PXCImage::OPTION_ANY, &colorToDepth); if(this->retStatus < PXC_STATUS_NO_ERROR){ std::cout<<"Camera::CreateColorMappedToDepth(PXCImage *color, PXCImage *depth): Error when export data"<<endl; std::cout<<"Error Code: "<<this->retStatus<<endl; exit(0); } Mat colorToDepthMat(Size(colorToDepthImage->QueryInfo().width, colorToDepthImage->QueryInfo().height), CV_8UC3, colorToDepth.planes[0]); colorToDepthImage->Release(); return colorToDepthMat; }
"Camera" is a class I defined to obtain and process the color and depth image. I can get the image data and I can also map the color image to the depth image. But the memory increases about 100MB every second. There is the same problem for the CreatDepthImageMappedToColor.
Could you help me?
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Looks like CreateDepthImageMappedToColor has also a memory leak. Tested with SDK R3 and R2

- Subscrever fonte RSS
- Marcar tópico como novo
- Marcar tópico como lido
- Flutuar este Tópico para o utilizador atual
- Marcador
- Subscrever
- Página amigável para impressora