-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
Hey there,
I currently have some raw depth maps (.raw files) from the GTA game engine and I'm curious, how did you get the depth images that you have in samples?
I was able to convert them to (0, 255) color images with the following function, but still can't get the depth in meters like you have.
def convert_depth(img_path):
abs_min = 1008334389
# sky = 964405378
abs_max = 1067424357
x = np.fromfile(img_path, dtype='uint32')[4:]
x = np.clip(x, abs_min, abs_max)
x = ((x - abs_min) / (abs_max - abs_min))
x = np.uint8(x * 255)
x = x.reshape(1080, 1920)
return x
Thanks!
Metadata
Metadata
Assignees
Labels
No labels