chore: Clear distortion for color stream when color undistortion is enabled

This commit is contained in:
Joe Dong
2024-08-22 21:05:37 +08:00
parent c60662c8e1
commit fe63794cab
+3
View File
@@ -1823,6 +1823,9 @@ void OBCameraNode::onNewFrameCallback(const std::shared_ptr<ob::Frame> &frame,
if (depth_registration_ && stream_index == DEPTH) {
frame_id = depth_aligned_frame_id_[stream_index];
}
if (stream_index == COLOR && enable_color_undistortion_) {
memset(&distortion, 0, sizeof(distortion));
}
auto camera_info = convertToCameraInfo(intrinsic, distortion, width);
camera_info.header.stamp = timestamp;
camera_info.header.frame_id = frame_id;