private void createHdr() {
        hdrData = new float[width * height * 3];

        double[] relevances = new double[width * height];
        int color;
        double red, green, blue;
        boolean isPixelSet;
        for (int i = 0; i < width * height; i++) {
            isPixelSet = false;
            for (MyImage img : images) {
                double relevance = 1 - ((Math.abs(img.getLuminance(i) - 127) + 0.5) / 255);
                if (relevance > 0.05) {
                    isPixelSet = true;
                    color = img.getBufferedImage().getRGB(i % width, i / width);
                    red = (color & 0x00ff0000) >> 16;
                    green = (color & 0x0000ff00) >> 8;
                    blue = color & 0x000000ff;
                    hdrData[i * 3 + 0] += red * relevance / img.getExposure();
                    hdrData[i * 3 + 1] += green * relevance / img.getExposure();
                    hdrData[i * 3 + 2] += blue * relevance / img.getExposure();

                    relevances[i] += relevance;
                }
            }
            if (!isPixelSet) {
                MyImage img = images.get(images.size() / 2);
                color = img.getBufferedImage().getRGB(i % width, i / width);
                red = (color & 0x00ff0000) >> 16;
                green = (color & 0x0000ff00) >> 8;
                blue = color & 0x000000ff;
                hdrData[i * 3 + 0] += red / img.getExposure();
                hdrData[i * 3 + 1] += green / img.getExposure();
                hdrData[i * 3 + 2] += blue / img.getExposure();
                relevances[i] = 1;
            }
        }
        for (int i = 0; i < width * height; i++) {
            hdrData[i * 3 + 0] /= relevances[i];
            hdrData[i * 3 + 1] /= relevances[i];
            hdrData[i * 3 + 2] /= relevances[i];
        }

        System.out.println("done");
    }