cmu-ci-lab / MitsubaToFRenderer

Mitsuba time-of-flight renderer.
54 stars 22 forks source link

.exr file converter small bug #11

Open Enigmatisms opened 1 year ago

Enigmatisms commented 1 year ago

In mfile/exr: file exr2mat.py:

imgSize = (dataWin.max.x - dataWin.min.x + 1, dataWin.max.y - dataWin.min.y + 1)      # line 12
video = [np.reshape(np.frombuffer(video[i], dtype=np.float16), imgSize) for i in range(len(video))]      # line 26

imgSize is incorrect if width is not equal to height. The correct imgSize should be:

imgSize = (dataWin.max.y - dataWin.min.y + 1, dataWin.max.x - dataWin.min.x + 1)
# row then column

Otherwise, for non-square film, displayAndSaveVideo.m will display erroneous video.