Skip to content

Commit

Permalink
PR #3049 from Arun-Prasad-V: Applying Colorizer filter to Aligned-Dep…
Browse files Browse the repository at this point in the history
…th image
  • Loading branch information
SamerKhshiboun authored Mar 26, 2024
2 parents 5d617e5 + 2f78ad0 commit b28dd00
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion realsense2_camera/src/base_realsense_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,14 @@ void BaseRealSenseNode::setupFilters()
_pc_filter = std::make_shared<PointcloudFilter>(std::make_shared<rs2::pointcloud>(), _node, _parameters, _logger);
#endif

_filters.push_back(_colorizer_filter);
// Apply PointCloud filter before applying Align-depth as it requires original depth image not aligned-depth image.
_filters.push_back(_pc_filter);

_align_depth_filter = std::make_shared<AlignDepthFilter>(std::make_shared<rs2::align>(RS2_STREAM_COLOR), update_align_depth_func, _parameters, _logger);
_filters.push_back(_align_depth_filter);

// Apply Colorizer filter after applying Align-Depth to get colorized aligned depth image.
_filters.push_back(_colorizer_filter);
}

cv::Mat& BaseRealSenseNode::fix_depth_scale(const cv::Mat& from_image, cv::Mat& to_image)
Expand Down

0 comments on commit b28dd00

Please sign in to comment.