Ask Your Question
1

Interface Intel Realsense Camera

asked 2015-01-05 10:02:14 -0600

Deepak Kumar gravatar image

hi, i have intel realsense camera. i want to interface its depth and infrared with opencv. opencv 2.4.10 have sample of intel camera inteface but its not working properly. can any one guide me in interfacing intel reaslense camera using opencv.

I also want to receive its depth frame in Mat variable.

thanks.

edit retag flag offensive close merge delete

Comments

1

Have you tried the cv::VideoCapture cap(0); (if you have just that camera connected) and then in a for cap >> frame ... etc?

thdrksdfthmn gravatar imagethdrksdfthmn ( 2015-01-05 10:49:03 -0600 )edit

it only accesses rgb camera, i am not able to access depth and ir stream using this

Deepak Kumar gravatar imageDeepak Kumar ( 2015-01-06 03:13:51 -0600 )edit

ok, then I think you can use this or this

thdrksdfthmn gravatar imagethdrksdfthmn ( 2015-01-06 06:46:08 -0600 )edit

2 answers

Sort by ยป oldest newest most voted
2

answered 2015-01-06 07:11:22 -0600

updated 2015-01-06 07:13:22 -0600

You will need to start for sure with the following option.

VideoCapture cap(0 + CV_CAP_INTELPERC)

This will force the capture interface to use the intel interface. Then it is kind of a wasteland out there. Multiple cap interfaces which are poorly documented. I would take a closer look at the sourcecode found here. I notice that there is a get and set method and that there are parameters CV_CAP_INTELPERC_IMAGE and CV_CAP_INTELPERC_DEPTHMAP so it will be possible to retrieve them there I think.

Especially look at this code line! It seems that you can specify which frame you want to retrieve using the interface!

edit flag offensive delete link more

Comments

hi, thanks for your response. i find that in your given link the code is written to interface intel perceptual sdk. and now it is upgraded to intel realsense sdk. i run this it says that cannot open capture object. mean it is not capable to capture image from intel realsense camera.

Deepak Kumar gravatar imageDeepak Kumar ( 2015-01-07 10:28:21 -0600 )edit

Ow sorry for the mistake. Then you will have to use the intel API for grabbing the camera data and then push it into a Mat element for opencv by accessing the data pointer.

StevenPuttemans gravatar imageStevenPuttemans ( 2015-01-07 14:53:00 -0600 )edit

do you know how to do it. i am stucked into it from last 10 days. i am not getting any solution

Deepak Kumar gravatar imageDeepak Kumar ( 2015-01-08 07:58:07 -0600 )edit

I have no experience with the intel SDK, but I am guessing there should be a C or C++ API available right? Can you retrieve the image data using their own framework?

StevenPuttemans gravatar imageStevenPuttemans ( 2015-01-09 02:58:34 -0600 )edit

the image data i am getting from sdk is pxcimage and when i am converting to mat image the error occurs that memory access violation.

Deepak Kumar gravatar imageDeepak Kumar ( 2015-01-11 07:46:20 -0600 )edit
0

answered 2015-01-19 03:55:46 -0600

Deepak Kumar gravatar image

here is the working code of interfacing intel realsense camera SDK + opencv

https://github.com/dthepok/realsense

edit flag offensive delete link more

Comments

2

Auch, you are including C++ headers but C - API function. I would avoid that. The latest 3.0 branch doesn't even support that anymore. You should get rid of all cvBlaBla functions and replace them by their C++ variant.

StevenPuttemans gravatar imageStevenPuttemans ( 2015-01-19 03:57:54 -0600 )edit
1

thanks Steven , i will modify it soon

Deepak Kumar gravatar imageDeepak Kumar ( 2015-01-19 07:49:27 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2015-01-05 10:02:14 -0600

Seen: 7,384 times

Last updated: Jan 19 '15