I found a thread on "How to extract depth data in real time?"
For me I would call it "stepping through the depth data".
https://github.com/IntelRealSense/librealsense/issues/4026
There is an easy method in rs-depth.c but the thread admin mentions a better alternate way
-
Using units_transform block is equivalent to doing it manually, indeed. But it provide advantages:
- Performance.
- the result is encapsulated into standard
frameobject which releaves the users from dealing with memory management. - can be chained into Librealsense processing blocks pipe.
and this code
rs2::units_transform ut;
rs2::pipeline pipe;
pipe.start();
while (...)
{
rs2::frameset data = pipe.wait_for_frames();
if (auto depth_raw_frame = data.get_depth_frame())
{
auto depth_metric_frame = ut.process(depth_raw_frame);
// Add your code here
}
}
I tried to get information on rs2::units_transform but i don't get much. I am going to work with the depth table. I need to average and track trajectories. So I'll be looping through the frameset data. Is units_transform block the best way to set this up? Also, are there any full examples?
-
That level of RealSense programming is outside of my coding experience, unfortunately. The best place to get expert coding advice on this subject will be back at the GitHub forum. You can post a new question there by visiting the link below and clicking on the New Issue button. Good luck!
Please sign in to leave a comment.
Comments
1 comment