How to use the spectral.io.envi.save_image function in spectral

To help you get started, we’ve selected a few spectral examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github capstone-coal / pycoal / pycoal / mineral.py View on Github external
library.names,
                                         metadata={'data ignore value': 0,
                                                   'description': 'COAL ' +
                                                   pycoal.version + ' '
                                                   'mineral classified '
                                                   'image.',
                                                   'map info':
                                                       image.metadata.get(
                                                        'map info')})

    # remove unused classes from the image
    pycoal.mineral.MineralClassification.filter_classes(classified_file_name)

    if scores_file_name is not None:
        # save the scored image to a file
        spectral.io.envi.save_image(scores_file_name, scored,
                                    dtype=numpy.float64,
                                    metadata={'data ignore value': -50,
                                              'description': 'COAL ' +
                                              pycoal.version + ' mineral '
                                              'scored image.',
                                              'map info': image.metadata.get(
                                                  'map info')})
github capstone-coal / pycoal / pycoal / mineral.py View on Github external
# save the classified image to a file
    spectral.io.envi.save_classification(classified_file_name, classified,
                                         class_names=['No data'] + class_names,
                                         metadata={'data ignore value': 0,
                                                   'description': 'COAL ' +
                                                   pycoal.version + ' mineral '
                                                                  'classified '
                                                                  'image.',
                                                   'map info':
                                                       image.metadata.get(
                                                        'map info')})

    if scores_file_name is not None:
        # save the scored image to a file
        spectral.io.envi.save_image(scores_file_name, scored,
                                    dtype=numpy.float64,
                                    metadata={'data ignore value': -50,
                                              'description': 'COAL ' +
                                                             pycoal.version
                                                             + ' mineral '
                                                               'scored '
                                                               'image.',
                                              'map info': image.metadata.get(
                                                  'map info')})