Automated Computed Embroidery

ACEParaBitmapToVector

POST

The object is required in every Create request. Each field is optional: a field that is left out gets its default.

Tolerance (default 20)

0-300: Maximum color difference that is still grouped together as a single color.

This parameter determines the extent to which similar colors are grouped together. The similarity is determined by the distance in the 3-dimensional color space. Grouping colors is useful when the pattern has many shades that are to be stitched as a single area. Furthermore, even areas that appear to be a single color at first glance often have individual pixels in various shades at their edges, which this function suppresses.

Smoothing (default 150)

0-200: Curve smoothing factor

Larger values reduces the number of points included in the curve calculation. This results in more straight lines and smoother curves.

DetermineBackgroundColor (default 1)

0: Background color is specified

                The background color is defined using the parameter BackgroundColor

1: Automatically determine background color from the image

A color that covers more than 70 % of a 2-pixel strip along the image edges is the background color. A color that covers more than half of the strip and twice as much as the next color also counts. If no color is dominant, nothing is left out as background.

2: No background, everything is stitched

Nothing is left out as background, and BackgroundFill has no effect. The embroidery engine has no such value: the server sends 0 with the color that is farthest from every color of the image, so no area matches it. If even that color lies within about twice the Tolerance of an image color (possible with a Tolerance above about 145), the server also sends BackgroundFill 1, so at most areas touching the image edge can be left out.

BackgroundColor

rrr, ggg, bbb RGB value of the background color.

Each component is in the range 0-255. Send the value as one string, e.g. "255,255,255", not as an array: an array such as [255,255,255] makes the whole request fail. If the field is left out, white (255,255,255) is used.

An area counts as background if its color lies within Tolerance of this color: with Tolerance 20, a squared RGB distance of at most 78, about 5 per channel. Color reduction usually moves colors, for example to the nearest thread of the thread table: the red 194,43,33 becomes Madeira POLYNEON 40 no. 1878 (185,44,23), which no longer matches. For PNG input that runs through color reduction, the server therefore replaces BackgroundColor with the color the matching pixels have after the reduction; a background removed by Background detection counts as 255,255,255. It keeps your value when the reduced image still contains a matching color, when no pixel matches, or when less than half of what would then be left out (with BackgroundFill 1 only the areas touching the image edge) came from your color. Not translated: SVG and AI input, SkipColorReduction: true, and EnableCropToContent: true in the same request.

BackgroundFill (default 1)

0: Areas with background color will not be filled

This option means that areas inside the pattern that are colored with the background color will not be filled with stitches. This function is useful when there are actual "holes" in the pattern through which the background shows through.

1: Only background areas that touch the image edge are left out; enclosed areas in the background color are stitched. Despite its name, 1 does not embroider the background around the motif; for that, use DetermineBackgroundColor 2. See Background detection.

Parameters

Parameter Type Description Required
Tolerance int Maximum color difference that is still grouped together as a single color. No
Smoothing int Curve smoothing factor No
DetermineBackgroundColor int 1: automatic, the dominant color along the image edges is the background color. 0: BackgroundColor is used. 2: no background, everything is stitched. No
BackgroundColor string RGB value of the background color as one string "R,G,B", e.g. "255,255,255"; each component 0-255. Only used with DetermineBackgroundColor = 0. A JSON array makes the request fail. Default white. For PNG input with color reduction, the server translates it to the color those pixels have after the reduction. No
BackgroundFill int 0: every area in the background color is left out, including enclosed ones. 1: only background areas that touch the image edge are left out; enclosed ones are stitched. Neither value embroiders the background around the motif; use DetermineBackgroundColor 2 for that. No

Example

"ACEParaBitmapToVector": {
    "Tolerance": "20",
    "Smoothing": "150",
    "DetermineBackgroundColor": "1",
    "BackgroundColor": "255,255,255",
    "BackgroundFill": "1"
  }