Use openCV with Intel Realsense SDK

Use openCV with Intel Realsense SDK


I want to do some image processing using depth and RGB stram of realsense camera. but i am not able to integrate opencv with realsense sdk. how can i receive depth frame in Mat variable of opencv so that i can do some processing in it.


thanks !!

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hi Deepak k.

Please see an example of streaming of depth frames below.

PXCSenseManager *sm=PXCSenseManager::CreateInstance();

while (sm->AcquireFrame(true)>=PXC_STATUS_NO_ERROR) {
   PXCCapture::Sample *sample=sm->QuerySample();
   .... // process image

Here PXCCapture::Sample structrure contains field 'depth' of type PXCImage. Use the method AcquireAccess of object 'depth' to get raw pixel data of object depth. Then you can use this data for initialization of object of type 'Mat'.

Best regards,


Good night firstly,


Is there a way I can use OpenCV + RSSDK with Java? When I put openCV into build path I get this error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: no libpxcclr.jni64 in java.library.path
    at java.lang.ClassLoader.loadLibrary(Unknown Source)
    at java.lang.Runtime.loadLibrary0(Unknown Source)
    at java.lang.System.loadLibrary(Unknown Source)
    at intel.rssdk.PXCMSenseManager.<clinit>(
    at tese.FaceTrackingCamera.main(

I do have the libpxcclr.jni64, it was working before adding OpenCV to java library.


Already solved it. Had to create the lib the right way. Thanks

Leave a Comment

Please sign in to add a comment. Not a member? Join today