Fix camera information abnormality issue.

This commit is contained in:
lixiaobin
2023-10-18 19:05:07 +08:00
parent 370b1115ef
commit d3d490c1a2
+1 -7
View File
@@ -887,13 +887,7 @@ void OBCameraNode::onNewFrameCallback(const std::shared_ptr<ob::Frame> &frame,
int height = static_cast<int>(video_frame->height()); int height = static_cast<int>(video_frame->height());
auto timestamp = frameTimeStampToROSTime(video_frame->systemTimeStamp()); auto timestamp = frameTimeStampToROSTime(video_frame->systemTimeStamp());
if (!camera_param_ && depth_registration_) { camera_param_ = pipeline_->getCameraParam();
camera_param_ = pipeline_->getCameraParam();
} else if (!camera_param_ && stream_index == COLOR) {
camera_param_ = getColorCameraParam();
} else if (!camera_param_ && (stream_index == DEPTH || stream_index == INFRA0)) {
camera_param_ = getDepthCameraParam();
}
auto &intrinsic = auto &intrinsic =
stream_index == COLOR ? camera_param_->rgbIntrinsic : camera_param_->depthIntrinsic; stream_index == COLOR ? camera_param_->rgbIntrinsic : camera_param_->depthIntrinsic;
auto &distortion = auto &distortion =