def ReadTif ( tifFile ) : img = Image . open ( tifFile ) img = np . array ( img ) return img
how to open image in python and covert to a numpy array
Reads a tif file to a 2D NumPy array
def ReadTif(tifFile):
        """Reads a tif file to a 2D NumPy array"""
        img = Image.open(tifFile)
        img = np.array(img)
        return img