GithubHelp home page GithubHelp logo

gerasimosmichalitsianos / pansharpen_python Goto Github PK

View Code? Open in Web Editor NEW
53.0 53.0 18.0 124 KB

command-line program for multispectral pan-sharpening (Python). Includes Brovey, FIHS (Fast Intensity Hue Saturation), Wavelet, and PCA (Principal Component Analysis).

Python 96.13% Dockerfile 3.87%

pansharpen_python's People

Contributors

gerasimosmichalitsianos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pansharpen_python's Issues

Question about your PCA pansharpening implementation

Hi,
I have searched the internet looking for some classical pan-sharpening methods implemented in Python and I have found your repository. I was making some experiments with the PCA-based pan-sharpening, and there is one step in your implementations that generates me some doubts. In lines 70-71 of pansharpen.py you do the following:

P = ( self.pan - self.pan.mean() ) * (np.std(F) / self.pan.std() ) + F.mean()
F[:,:,0] = P

I understand that the idea is replacing the first band in the PCA transformed MS image with the PAN image, after adjusting the PAN image to have the same mean and std_dev than the substituted band.

If that is the cas, shouldn't be the normalisation done in the following way ?
P = ( self.pan - self.pan.mean() ) * (np.std(F[:,:,0]) / self.pan.std() ) + F[:,:,0].mean()

That is, compute the mean and std_dev just from the substituted band (not taking into consideration all band values. Numpy functions mean() and std() flattens arrays by default).

Thanks in advance !!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.