Skip to content

Commit

Permalink
BGR2RGB on undistorted frames
Browse files Browse the repository at this point in the history
  • Loading branch information
zrezke committed Sep 29, 2024
1 parent 48d307a commit d407a22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rerun_py/depthai_viewer/_backend/packet_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def _log_img_frame(
# If the image is a cv frame try to undistort and rectify it
if intrinsics_matrix is not None and distortion_coefficients is not None:
if frame.getType() == dai.RawImgFrame.Type.NV12:
img_frame = frame.getCvFrame()
img_frame = cv2.cvtColor(frame.getCvFrame(), cv2.COLOR_BGR2RGB)
map_x, map_y = cv2.initUndistortRectifyMap(
intrinsics_matrix, distortion_coefficients, None, intrinsics_matrix, (w, h), cv2.CV_32FC1
)
Expand Down

0 comments on commit d407a22

Please sign in to comment.