Skip to content

Commit

Permalink
Fill R and P by default; some ROS nodes look at these (luxonis#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdavidberger authored Feb 22, 2022
1 parent 0b22e1d commit 02079b6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion depthai_bridge/src/ImageConverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,11 @@ ImageMsgs::CameraInfo ImageConverter::calibrationToCameraInfo(
auto& projection = cameraData.P;
auto& rotation = cameraData.R;
#endif

// Set rotation to reasonable default even for non-stereo pairs
rotation[0] = rotation[4] = rotation[8] = 1;
for(size_t i = 0; i < 3; i++) {
std::copy(flatIntrinsics.begin() + i * 3, flatIntrinsics.begin() + (i + 1) * 3, projection.begin() + i * 4);
}
std::copy(flatIntrinsics.begin(), flatIntrinsics.end(), intrinsics.begin());

distCoeffs = calibHandler.getDistortionCoefficients(cameraId);
Expand Down

0 comments on commit 02079b6

Please sign in to comment.