[Python] Trying to open .img file with matplotlib

Discussão em 'Python' iniciado por Stack, Abril 12, 2025.

  1. Stack

    Stack Membro Participativo

    I am trying to open an .img. I run the following code:

    import matplotlib.pyplot as plt
    from planetaryimage import PDS3Image
    image = ('/Users/alyse/ldem_1024_00n_15n_150_180.img')
    plt.imshow(image, cmap='gray')


    I get the following error: TypeError: Image data of dtype <U46 cannot be converted to float

    Continue reading...

Compartilhe esta Página