Ask Your Question
0

RGBD based depth data capture

asked 2014-10-02 17:42:41 -0600

SumitM gravatar image

Hi, I was wondering if it's possible to save depth data in a way similar to video format? I am able to save it a jpg image as well as export depth data to a csv, if that helps in anyway. i am kinda new to the image processing and any help will be greatly appreciated. Thanks in advance, Sumit

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2014-10-03 03:45:18 -0600

If you want to store your data in a video format, then simply do it by pushing your resulting images into a VideoWriter stream. More info in the documentation!

A code snippet that illustrates the idea

// Create globally a VideoWriter element
// Adapt parameters to your needs
VideoWriter video_output ("~/video.avi", CV_FOURCC("M","J","P","G"), 25, Size(480, 640), true);

// Matrix containing the dept data
// Use your previous processing to push data into this
Mat depth_data;

// Push the image to the video stream
depth_data >> video_output;
edit flag offensive delete link more

Comments

1

Thanks Steven (StevenPuttemans).......that seems more appropriate!!!

SumitM gravatar imageSumitM ( 2014-10-10 15:53:25 -0600 )edit

Do accept the solution if this is what you need :)

StevenPuttemans gravatar imageStevenPuttemans ( 2014-10-11 08:05:14 -0600 )edit

It would if I could somehow access depth sensor in my RGBD camera. Do you know anyway of doing it? Please refer to my question at http://answers.opencv.org/question/44089/depth-sensor-streaming-in-rgbd-camera/ and let me know if you need any clarification. Thanks in advance!!!

SumitM gravatar imageSumitM ( 2014-10-11 12:47:30 -0600 )edit

Afaik a depth sensor returns a RGBD image so you juyst need to grab the 4th channel.

StevenPuttemans gravatar imageStevenPuttemans ( 2014-10-11 14:01:01 -0600 )edit
0

answered 2014-10-02 17:56:42 -0600

juanmanpr gravatar image

Something like this could work for you?

cv::FileStorage fs("data.xml", cv::FileStorage::WRITE);
std::vector<cv::Mat> rgbdData;
fs << rgbdData;
edit flag offensive delete link more

Comments

Thanks, I will give it a try :)

SumitM gravatar imageSumitM ( 2014-10-02 20:09:02 -0600 )edit
1

QUOTE: I was wondering if it's possible to save depth data in a way similar to video format I am sorry but XML data is far from a video format. I do not think this is what the author requested.

StevenPuttemans gravatar imageStevenPuttemans ( 2014-10-03 03:46:43 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2014-10-02 17:42:41 -0600

Seen: 679 times

Last updated: Oct 03 '14