Welcome to pyfusion’s documentation!

The fusion Algorithm functions

pyfusion.Brovery(src: pyfusion.utils.utils.Image, pan: pyfusion.utils.utils.Image, block_size=None, result_path=None, driver=None)[源代码]

使用`Brovery`算法进行影像融合

源影像(多光谱)可以不进行升采样处理

参数
  • srcsource image, the image should be RGB color space

  • pan – 全色影像,图片应为灰度影像

  • block_size – 分块大小

  • result_path – 结果影像的路径,任何gdal支持的影像格式均可

  • driver – gdal的驱动名称

返回

融合影像

返回类型

pyfusion.utils.Image

pyfusion.BroveryByFilePath(srcpath: str, panpath: str, resultpath: str, driver: str)[源代码]

Using Brovery method fusion image

输出影像只支持tif格式

参数
  • srcpath – 源影像路径

  • panpath – 全色影像路径

  • resultpath – result image path

返回

返回类型

None

pyfusion.HIS(src: pyfusion.utils.utils.Image, pan: pyfusion.utils.utils.Image, block_size=None, result_path=None, driver=None)[源代码]

使用`IHS`算法进行影像融合

源影像(多光谱)可以不进行升采样处理

参数
  • src – 源影像,应该为`pyfusion.utils.Image`类型

  • pan – 全色影像,图片应为灰度影像

  • block_size – 分块大小

  • result_path – 结果影像的路径,任何gdal支持的影像格式均可

  • driver – gdal的驱动名称

返回

融合影像

返回类型

pyfusion.utils.Image

pyfusion.HISByFilePath(srcpath: str, panpath: str, resultpath: str, driver: str)[源代码]

Using HIS method fusion image

输出影像只支持tif格式

参数
  • srcpath – 源影像路径

  • panpath – 全色影像路径

  • resultpath – result image path

返回

返回类型

None

pyfusion.PCA(src: pyfusion.utils.utils.Image, pan: pyfusion.utils.utils.Image, block_size=None, result_path=None, driver=None)[源代码]

PCA function

The PCA function is fusion the src with pan based on PCA

参数
  • src – The source image, it should be multi-band the image is pyfusion.utils.Image

  • pan – 全色影像,影像应为单通道灰度图,应为`pyfusion.utils.Image`类型

  • block_size – 分块大小

  • result_path – 结果影像的路径,任何gdal支持的影像格式均可

  • driver – gdal的驱动名称

返回

结果影像

返回类型

pyfusion.utils.Image

pyfusion.PCAByFilePath(srcpath: str, panpath: str, resultpath: str, driver: str)[源代码]

Using PCA method fusion image

输出影像只支持tif格式

参数
  • srcpath – 源影像路径

  • panpath – 全色影像路径

  • resultpath – result image path

返回

返回类型

None

All the pyfusion.utils.utils.Image should be read by this function

Installation

pyfusion_0.2beta pyfusion_0.3rc

run this command to install it.

python setup.py install

Example

from pyfusion import HISByFilePath, PCAByFilePath, BroveryByFilePath

HISByFilePath("Spectral_image.tif", "Pan_image.tif", "result.tif", 4096)
PCAByFilePath("Spectral_image.tif", "Pan_image.tif", "result.tif", 4096)
BroveryByFilePath("Spectral_image.tif", "Pan_image.tif", "result.tif", 4096)

Indices and tables