(self, filename)
return imgdata
Read a depth-map
        :param filename: file name to load
        :return: image data of depth image
Read a depth-map
        :param filename: file name to load
        :return: image data of depth image
Read a depth - map : param filename : file name to load : return : image data of depth image
def loadDepthMap(self, filename):
        """
        Read a depth-map
        :param filename: file name to load
        :return: image data of depth image
        """
        with open(filename, 'rb') as f:
            # first 6 uint define the full image
            width = struct.unpack('i', f.read(4))[0]
            height = struct.unpack('i', f.read(4))[0]
            left = struct.unpack('i', f.read(4))[0]
            top = struct.unpack('i', f.read(4))[0]
            right = struct.unpack('i', f.read(4))[0]
            bottom = struct.unpack('i', f.read(4))[0]
            patch = np.fromfile(f, dtype='float32', sep="")
            imgdata = np.zeros((height, width), dtype='float32')
            imgdata[top:bottom, left:right] = patch.reshape([bottom-top, right-left])
            # points1=[left,right,right,left,left]
            # points2=[top,top,bottom,bottom,top]
            # import matplotlib.pyplot as plt
            # plt.imshow(imgdata,cmap='brg')
            # plt.plot(points1,points2,c='r')
            # plt.show()

        return imgdata
def loadDepthMap ( self , filename ) : with open ( filename , 'rb' ) as f : # first 6 uint define the full image width = struct . unpack ( 'i' , f . read ( 4 ) ) [ 0 ] height = struct . unpack ( 'i' , f . read ( 4 ) ) [ 0 ] left = struct . unpack ( 'i' , f . read ( 4 ) ) [ 0 ] top = struct . unpack ( 'i' , f . read ( 4 ) ) [ 0 ] right = struct . unpack ( 'i' , f . read ( 4 ) ) [ 0 ] bottom = struct . unpack ( 'i' , f . read ( 4 ) ) [ 0 ] patch = np . fromfile ( f , dtype = 'float32' , sep = "" ) imgdata = np . zeros ( ( height , width ) , dtype = 'float32' ) imgdata [ top : bottom , left : right ] = patch . reshape ( [ bottom - top , right - left ] ) # points1=[left,right,right,left,left] # points2=[top,top,bottom,bottom,top] # import matplotlib.pyplot as plt # plt.imshow(imgdata,cmap='brg') # plt.plot(points1,points2,c='r') # plt.show() return imgdata