Bonjour,

Je suis actuellement étudiant du DUT Métier du Multimédia et de l'Internet et je dois faire un exposé sur le filtre d'ImageJ Unsharp Mask (renforcement sur Photoshop). Je ne comprends pas comment il fonctionne. Jai trouvé cette algorithme qui ne m'aide pas forcement :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
public void sharpenFloat(FloatProcessor fp, double sigma, float weight) {
        if (gb == null) gb = new GaussianBlur();
        gb.blurGaussian(fp, sigma, sigma, 0.01);
        if (Thread.currentThread().isInterrupted()) return;
        float[] pixels = (float[])fp.getPixels();
        float[] snapshotPixels = (float[])fp.getSnapshotPixels();
        int width = fp.getWidth();
        Rectangle roi = fp.getRoi();
        for (int y=roi.y; y<roi.y+roi.height; y++)
            for (int x=roi.x, p=width*y+x; x<roi.x+roi.width; x++,p++)
                pixels[p] = (snapshotPixels[p] - weight*pixels[p])/(1f - weight);
    }

Quelqu'un peut m'expliquer ?

Merci d'avance !

Jean