Correct comments
This commit is contained in:
@@ -22,11 +22,12 @@ def readDMP(filename):
|
||||
dmpfile = open(filename, 'rb')
|
||||
# The DMP file format is a very simple file format; the header consists of
|
||||
# 3 unsigned 16bit integers specifying the image dimensions, followed by a
|
||||
# stream of 32-bit floats in little-endian byte order.
|
||||
# Load Header. It's first two values are the image size.
|
||||
# stream of 32-bit floats in little-endian byte order. It's first two
|
||||
# values are the image size.
|
||||
# Load Header.
|
||||
header = numpy.fromfile(dmpfile, numpy.int16, 3)
|
||||
imageSize = (header[1], header[0])
|
||||
# Load file and reshape to the size from the header
|
||||
# Load the whole file and reshape to the size given in the header
|
||||
image = numpy.fromfile(dmpfile, numpy.float32)
|
||||
image = image.reshape(imageSize)
|
||||
dmpfile.close()
|
||||
|
||||
Reference in New Issue
Block a user