Creates an instance of {@link BackgroundStationaryGmm}.

@param config Configures the background model
@param imageType Type of input image
@return new instance of the background model
328282
public static <T extends ImageBase<T>>
	BackgroundStationaryGmm<T> stationaryGmm(@Nullable ConfigBackgroundGmm config , ImageType<T> imageType ) {

		if( config == null )
			config = new ConfigBackgroundGmm();
		else
			config.checkValidity();

		BackgroundStationaryGmm<T> ret;

		switch( imageType.getFamily() ) {
			case GRAY:
				ret = new BackgroundStationaryGmm_SB(config.learningPeriod,config.decayCoefient,
						config.numberOfGaussian,imageType);
				break;

			case PLANAR:
			case INTERLEAVED:
				ret =  new BackgroundStationaryGmm_MB(config.learningPeriod,config.decayCoefient,
						config.numberOfGaussian,imageType);
				break;

			default:
				throw new IllegalArgumentException("Unknown image type");
		}

		ret.setInitialVariance(config.initialVariance);
		ret.setMaxDistance(config.maxDistance);
		ret.setSignificantWeight(config.significantWeight);
		ret.setUnknownValue(config.unknownValue);

		return ret;
	}
243812
public static void generate(String content, QrConfig config, String imageType, OutputStream out) {
		final BufferedImage image = generate(content, config);
		ImgUtil.write(image, imageType, out);
	}
329213
public static <T extends ImageGray<T>>
	QrCodePreciseDetector<T> qrcode(ConfigQrCode config, Class<T> imageType) {
		if( config == null )
			config = new ConfigQrCode();

		config.checkValidity();

		InputToBinary<T> inputToBinary = FactoryThresholdBinary.threshold(config.threshold,imageType);

		DetectPolygonBinaryGrayRefine<T> squareDetector = FactoryShapeDetector.polygon(config.polygon, imageType);
		QrCodePositionPatternDetector<T> detectPositionPatterns =
				new QrCodePositionPatternDetector<>(squareDetector,config.versionMaximum);

		return new QrCodePreciseDetector<>(inputToBinary,detectPositionPatterns, config.forceEncoding,false, imageType);
	}
622258
public void buildImage(ImageConfiguration imageConfig, ImagePullManager imagePullManager, BuildContext buildContext)
            throws DockerAccessException, MojoExecutionException {

        if (imagePullManager != null) {
            autoPullBaseImage(imageConfig, imagePullManager, buildContext);
        }

        buildImage(imageConfig, buildContext.getMojoParameters(), checkForNocache(imageConfig), addBuildArgs(buildContext));
    }
826315
private function createImagineInstance()
    {
        $extension = mb_strtolower(\Craft::$app->getConfig()->getGeneral()->imageDriver);
        
        try {
            if ($extension === 'gd') {
                return new \Imagine\Gd\Imagine();
            }

            if ($extension === 'imagick') {
                return new \Imagine\Imagick\Imagine();
            }
        } catch (RuntimeException $e) {
            // just ignore for now
        }

        return null;
    }
1100245
protected BufferedImage create_FOREGROUND_Image(final int WIDTH, final boolean WITH_CENTER_KNOB, final ForegroundType TYPE) {
        return create_FOREGROUND_Image(WIDTH, WITH_CENTER_KNOB, TYPE, null);
    }
363319
public java.awt.Image createAwtImage(Color foreground, Color background) {
        int f = foreground.getRGB();
        int g = background.getRGB();
        Canvas canvas = new Canvas();

        String fullCode = code;
        if (generateChecksum && checksumText)
            fullCode = calculateChecksum(code);
        if (!startStopText)
            fullCode = fullCode.substring(1, fullCode.length() - 1);
        byte bars[] = getBarsCodabar(generateChecksum ? calculateChecksum(code) : code);
        int wide = 0;
        for (int k = 0; k < bars.length; ++k) {
            wide += bars[k];
        }
        int narrow = bars.length - wide;
        int fullWidth = narrow + wide * (int)n;
        boolean print = true;
        int ptr = 0;
        int height = (int)barHeight;
        int pix[] = new int[fullWidth * height];
        for (int k = 0; k < bars.length; ++k) {
            int w = (bars[k] == 0 ? 1 : (int)n);
            int c = g;
            if (print)
                c = f;
            print = !print;
            for (int j = 0; j < w; ++j)
                pix[ptr++] = c;
        }
        for (int k = fullWidth; k < pix.length; k += fullWidth) {
            System.arraycopy(pix, 0, pix, k, fullWidth); 
        }
        Image img = canvas.createImage(new MemoryImageSource(fullWidth, height, pix, 0, fullWidth));
        
        return img;
    }
428299
public Texture createTexture (IDimension size, Texture.Config config) {
    return createTexture(size.width(), size.height(), config);
  }
348938
public JawrConfigManagerMBean getConfigMgr(String resourceType) {

		JawrConfigManagerMBean configMgr = null;
		if (resourceType.equals(JS_TYPE)) {
			configMgr = jsMBean;
		} else if (resourceType.equals(CSS_TYPE)) {
			configMgr = cssMBean;
		} else if (resourceType.equals(BINARY_TYPE)) {
			configMgr = binaryMBean;
		}

		return configMgr;
	}
218393
public Texture createTexture (float width, float height, Texture.Config config) {
    int texWidth = config.toTexWidth(scale.scaledCeil(width));
    int texHeight = config.toTexHeight(scale.scaledCeil(height));
    if (texWidth <= 0 || texHeight <= 0) throw new IllegalArgumentException(
      "Invalid texture size: " + texWidth + "x" + texHeight);

    int id = createTexture(config);
    gl.glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, texWidth, texHeight,
                    0, GL_RGBA, GL_UNSIGNED_BYTE, null);
    return new Texture(this, id, config, texWidth, texHeight, scale, width, height);
  }
381206
public java.awt.Image createAwtImage(Color foreground, Color background) {
        int f = foreground.getRGB();
        int g = background.getRGB();
        Canvas canvas = new Canvas();

        paintCode();
        int h = (int)yHeight;
        int pix[] = new int[bitColumns * codeRows * h];
        int stride = (bitColumns + 7) / 8;
        int ptr = 0;
        for (int k = 0; k < codeRows; ++k) {
            int p = k * stride;
            for (int j = 0; j < bitColumns; ++j) {
                int b = outBits[p + (j / 8)] & 0xff;
                b <<= j % 8;
                pix[ptr++] = (b & 0x80) == 0 ? g : f;
            }
            for (int j = 1; j < h; ++j) {
                System.arraycopy(pix, ptr - bitColumns, pix, ptr + bitColumns * (j - 1), bitColumns);
            }
            ptr += bitColumns * (h - 1);
        }
        
        java.awt.Image img = canvas.createImage(new MemoryImageSource(bitColumns, codeRows * h, pix, 0, bitColumns));
        return img;
    }
872442
public static <T extends ImageGray<T>>
	QrCodeDetectorPnP<T> qrcode3D(ConfigQrCode config, Class<T> imageType) {
		return new QrCodeDetectorPnP<>(qrcode(config,imageType));
	}
660215
public static <T extends ImageBase<T>, Motion extends InvertibleTransform<Motion>>
	BackgroundMovingBasic<T,Motion> movingBasic(@Nonnull ConfigBackgroundBasic config ,
												Point2Transform2Model_F32<Motion> transform, ImageType<T> imageType ) {

		config.checkValidity();

		BackgroundMovingBasic<T,Motion> ret;

		switch( imageType.getFamily() ) {
			case GRAY:
				ret= new BackgroundMovingBasic_SB(config.learnRate,config.threshold,
						transform,config.interpolation,imageType.getImageClass());
				break;

			case PLANAR:
				ret= new BackgroundMovingBasic_PL(config.learnRate,config.threshold,
						transform,config.interpolation,imageType);
				break;

			case INTERLEAVED:
				ret= new BackgroundMovingBasic_IL(config.learnRate,config.threshold,
						transform,config.interpolation,imageType);
				break;

			default:
				throw new IllegalArgumentException("Unknown image type");
		}

		ret.setUnknownValue(config.unknownValue);
		return ret;
	}
687867
private static URI createSvg(
            final Dimension targetSize,
            final RasterReference rasterReference, final Double rotation,
            final Color backgroundColor, final File workingDir)
            throws IOException {
        // load SVG graphic
        final SVGElement svgRoot = parseSvg(rasterReference.inputStream);

        // create a new SVG graphic in which the existing graphic is embedded (scaled and rotated)
        DOMImplementation impl = SVGDOMImplementation.getDOMImplementation();
        Document newDocument = impl.createDocument(SVG_NS, "svg", null);
        SVGElement newSvgRoot = (SVGElement) newDocument.getDocumentElement();
        newSvgRoot.setAttributeNS(null, "width", Integer.toString(targetSize.width));
        newSvgRoot.setAttributeNS(null, "height", Integer.toString(targetSize.height));

        setSvgBackground(backgroundColor, targetSize, newDocument, newSvgRoot);
        embedSvgGraphic(svgRoot, newSvgRoot, newDocument, targetSize, rotation);
        File path = writeSvgToFile(newDocument, workingDir);

        return path.toURI();
    }
378543
public static <D extends ImageGray<D>>
	OrientationHistogramSift<D> sift(ConfigSiftOrientation config , Class<D> derivType ) {
		if( config == null )
			config = new ConfigSiftOrientation();
		config.checkValidity();

		return new OrientationHistogramSift(config.histogramSize,config.sigmaEnlarge,derivType);
	}
1056418
public static <T extends ImageGray<T>>
	SearchLocalPeak<T> meanShiftGaussian( int maxIterations, float convergenceTol , Class<T> imageType) {
		WeightPixel_F32 weights = new WeightPixelGaussian_F32();
		MeanShiftPeak<T> alg = new MeanShiftPeak<>(maxIterations, convergenceTol, weights, imageType);
		return new MeanShiftPeak_to_SearchLocalPeak<>(alg);
	}
1275609
public static <T extends ImageBase<T>>ImageSuperpixels<T>
	slic( @Nullable ConfigSlic config , ImageType<T> imageType )
	{
		SegmentSlic<T> ms = FactorySegmentationAlg.slic(config, imageType);

		return new Slic_to_ImageSuperpixels<>(ms);
	}