Skip to content

Instantly share code, notes, and snippets.

@adujardin
Created March 31, 2021 14:25
Show Gist options
  • Save adujardin/9ba3be99a4b24cdb9d781ceb43dfe812 to your computer and use it in GitHub Desktop.
Save adujardin/9ba3be99a4b24cdb9d781ceb43dfe812 to your computer and use it in GitHub Desktop.
Decoding example of ORStereo dataset GT disparity https://theairlab.org/orstereo/ from PNG 4 uint8 packed, into f32 disparity
import cv2
import numpy as np
disp_u8c4 = cv2.imread("IROS_ORStereo_4K/FoV60/CoalMine/disparity/000002_disp_lu1.png", cv2.IMREAD_UNCHANGED)
disp_gt_f32 = disp_u8c4.view(dtype=np.float32)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment