Skip to content
HALOWERK

Bildwerk

crack detect

No trained model: grey copy, morphological black-hat (closing with a square of 2·max_width_px+1 minus the image), hysteresis threshold (high = max(min_contrast, mean + 4σ), low = high/2), 8-connected components, Zhang-Suen thinning with spur pruning. Length = geodesic skeleton path as a polyline through every 4th pixel plus branches; width = area/length. A crack needs length ≥ min_length_px and length/width ≥ 5, which rejects pores and stains.

POST https://bild.halowerk.com/v1/crack-detect

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
image_base64stringNoImage (PNG/JPEG/WebP/GIF/TIFF/AVIF) as base64, ≤ 10 MB.
image_urlstringNoOr a public image URL.
max_width_pxintegerNoWidest crack to look for, in analysis pixels.
min_length_pxintegerNoShortest crack, in analysis pixels (default 5 % of the long side).
min_contrastintegerNoMinimum darkness of a crack against its surroundings (grey levels).
max_sideintegerNoLong side of the analysis copy.
mm_per_pixelnumberNoScale of the original image, for lengths and widths in mm.
return_maskbooleanNoReturn a PNG mask (white = crack) at analysis size as base64.
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "image_base64": {
      "type": "string",
      "minLength": 16,
      "maxLength": 14000000,
      "description": "Image (PNG/JPEG/WebP/GIF/TIFF/AVIF) as base64, ≤ 10 MB."
    },
    "image_url": {
      "type": "string",
      "format": "uri",
      "maxLength": 2048,
      "description": "Or a public image URL."
    },
    "max_width_px": {
      "type": "integer",
      "minimum": 2,
      "maximum": 40,
      "default": 8,
      "description": "Widest crack to look for, in analysis pixels."
    },
    "min_length_px": {
      "type": "integer",
      "minimum": 10,
      "maximum": 5000,
      "description": "Shortest crack, in analysis pixels (default 5 % of the long side)."
    },
    "min_contrast": {
      "type": "integer",
      "minimum": 5,
      "maximum": 200,
      "default": 20,
      "description": "Minimum darkness of a crack against its surroundings (grey levels)."
    },
    "max_side": {
      "type": "integer",
      "minimum": 256,
      "maximum": 2048,
      "default": 1200,
      "description": "Long side of the analysis copy."
    },
    "mm_per_pixel": {
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 1000,
      "description": "Scale of the original image, for lengths and widths in mm."
    },
    "return_mask": {
      "type": "boolean",
      "default": false,
      "description": "Return a PNG mask (white = crack) at analysis size as base64."
    }
  }
}

Open original schema

Published input example

{
  "image_base64": "iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4AgMAAAAIzBH8AAAADFBMVEWoqKgyMjJcXFyFhYV5XXThAAAACXBIWXMAAAsTAAALEwEAmpwYAAABBklEQVRYhe2UsQ3CMBBFD1sUKULHCBnBBRSIESj4IQIKeigYgSU8Ah0SGYCCJTICBR01FQ0DvCKShfCvn74d592Z5eTkfOOOxlJuKKgTJGMDwYJW+riFlaG+w0rtYGVVQ9DhyscKgqVaSHa9P7rh/zgRfvQDrAz9P3pFK0eiw9MlHZ6WgT7qysggrV+o8izpgjrfkvZIj1mU6hs6/olLp5LWd/pNO4Pf1DDQRtQ5i3CErKJyFnRnDug2MjrnNqaXDAsIlksIekHQOjqTga6YknrhuRcnCFb0kgW9pFulk3eYUN5unk7e+gfkdSnl3aaTd5xOXs+X2rx3eZsfkLegoKNH5+T8QT7gO0g1mn0y8gAAAABJRU5ErkJggg=="
}

Result & documentation

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-11-17 UTC.

More endpoints in this hub

All endpoints in this hub →