class CameraImageMosaic {

    static RenderedImage create(RenderedImage... sourceImages) {
        double[][] sourceThresholds = new double[sourceImages.length][1];
        sourceThresholds[0][0] = determineSourceThreshold(sourceImages[0]);
        int t = 0;
        for (int i = 1; i < sourceImages.length; i++) {
            t += sourceImages[i - 1].getWidth();
            sourceImages[i] = TranslateDescriptor.create(sourceImages[i], (float) t, 0.0f, INTERPOLATION, null);
            sourceThresholds[i][0] = determineSourceThreshold(sourceImages[i]);
        }
        return MosaicDescriptor.create(sourceImages, MosaicDescriptor.MOSAIC_TYPE_OVERLAY, null, null,
                                       sourceThresholds, null, null);
    }

}