librealsense icon indicating copy to clipboard operation
librealsense copied to clipboard

depth_frame filtering (post-processing)

Open ywjia opened this issue 8 years ago • 3 comments

  • Before opening a new issue, we wanted to provide you with some useful suggestions (Click "Preview" above for a better view):

  • All users are welcomed to report bugs, ask questions, suggest or request enhancements and generally feel free to open new issue, even if they haven't followed any of the suggestions above :)


Required Info
Camera Model D435
Firmware Version 5.10.3.0
Operating System & Version Ubuntu 16
Kernel Version (Linux Only) 4.15
Platform PC
SDK Version 2.16.0
Language C++
Segment VR

Issue Description

For filtering (i.e., post-processing) the depth_frame, why does the following code give random results?

rs2::spatial_filter spat_filter; rs2::temporal_filter temp_filter; rs2::disparity_transform depth_to_disparity(true); rs2::disparity_transform disparity_to_depth(true); depth_frame = depth_to_disparity.process(depth_frame); depth_frame = spat_filter.process(depth_frame); depth_frame = temp_filter.process(depth_frame); depth_frame = disparity_to_depth.process(depth_frame);

"original depth_frame" test_depth_t_0000

"filtered depth_frame" test_depth_f_0000

Thanks.

ywjia avatar Sep 15 '18 03:09 ywjia

Hi @ywjia

rs2::disparity_transform depth_to_disparity(true);
rs2::disparity_transform disparity_to_depth(true);

One of these needs to be false. Right now you are transforming to disparity twice.

dorodnic avatar Sep 16 '18 12:09 dorodnic

Thanks, it works now.

ywjia avatar Sep 17 '18 20:09 ywjia

Thanks, it works now.

Hi, @ywjia Can you show me your code ? Thanks so much!

AIBluefisher avatar Nov 29 '18 10:11 AIBluefisher