Helper class for creating a set of shapes that approximate a source image.

Constructor

new (inputImage:Bitmap, backgroundColor:Rgba)

Creates a new runner.

Parameters:

inputImage

The input image, the image that the algorithm will optimize for.

Variables

read onlymodel:Model = null

The model for the optimization/fitting algorithm.

Methods

getImageData ():Bitmap

Gets the current bitmap with the shapes drawn on it.

Returns:

The current bitmap.

step (options:ImageRunnerOptions):Array<ShapeResult>

Updates the model once.

Returns:

An array containing data about the shapes just added to the model.