16. Remote sensing image recognition

1. Obtain remote sensing image data
    or use satellite remote sensing data, or use low-altitude drone collection, raw data processing, and finally provide CSV, Excel, GeoTIFF, ENVI and other data files.
    Raw data files in ENVI format can store multi-dimensional data, including three-dimensional arrays, two-dimensional arrays, one-dimensional arrays and even scalars. This is because the ENVI format supports not just multispectral or hyperspectral data, but can also store other types of data, such as radar data, terrain data, etc.

2. Extract feature data
    For the hyperspectral ENVI format, the data in the original data file (.img) can be regarded as a three-dimensional array, in which the first dimension represents the number of bands, the second dimension represents the number of rows of the image, and the third dimension represents The number of columns of the image. This three-dimensional array contains information such as the spectral reflectance or radiation value of each pixel in each band.
    You can use this .img file directly or convert it into a .mat file through the following code. If the .img has several Gs, the conversion will report an OverflowError: Python int too large to convert to C long error. It is recommended not to convert at this time and just use the .img file directly.
    Combined with the previous image gallery of Xiongan New Area, the XiongAn.img file can be used directly.
 

    import numpy as np
    import scipy.io as sio
    
    image = spectral.io.envi.open(header_file, image_file)
    data = image.load()
    sio.savemat('xiongan.mat', {'imagedata': data}, long_field_names=True)

3.
    Manual annotation of label data: by observing the image characteristics of hyperspectral images, manually label each pixel with a corresponding label. Use appropriate software tools to

Guess you like

Origin blog.csdn.net/vandh/article/details/132238469