Skip to content

Instantly share code, notes, and snippets.

View qinjian623's full-sized avatar

Qin Jian qinjian623

View GitHub Profile
import numpy as np
import re
import sys
'''
Load a PFM file into a Numpy array. Note that it will have
a shape of H x W, not W x H. Returns a tuple containing the
loaded image and the scale factor from the file.
'''
def load_pfm(file):