{"uid":"cap_UkKtlBdNFMGtAcbV8o0L8","slug":"halowerk-opencv-external-contour-metrics-a5fc13a1","name":"HALOWERK OpenCV External Contour Metrics","description":"Finds the external contours in a caller-supplied binary mask and reports, for each, its area, perimeter, centroid and bounding rectangle, plus the total foreground pixel count. The division of labour is deliberate: segmentation is a domain decision, so the mask comes from you and the measurement comes from here, which keeps the numbers reproducible and independent of any threshold this service might have chosen.","url":"https://medien.halowerk.com/v1/oss-opencv-external-contour-metrics?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType"],"properties":{"type":{"const":"http"},"method":{"const":"POST"},"bodyType":{"const":"json"},"schemaUrl":{"type":"string","format":"uri"},"exampleUrl":{"type":"string","format":"uri"}},"additionalProperties":true},"output":{"type":"object","required":["type","example"],"properties":{"type":{"type":"string"},"example":{}}}},"additionalProperties":true},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_nDyvzsDts29RGvVAmwi5u","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Accepts a binary mask and returns per-contour metrics (area, perimeter, centroid, bounding rectangle) plus total foreground pixel count using OpenCV external contour detection.","exampleAgentPrompt":"I've already segmented my image into a binary mask — can you run OpenCV external contour detection on it and give me the area, perimeter, centroid, and bounding rectangle for each contour, plus the total foreground pixel count?","exampleUseCases":[{"title":"Cell morphology measurement in microscopy","prompt":"I have a binary mask from a microscopy image where cells are segmented. Can you extract the external contours and tell me each cell's area, perimeter, centroid position, and bounding box so I can analyze their shapes?"},{"title":"Defect size reporting in industrial inspection","prompt":"I've got a binary mask highlighting defect regions on a manufactured part. Run contour analysis on it and return the area, perimeter, centroid, and bounding rectangle for each detected defect, plus the total defective pixel count."},{"title":"Object region geometry for robotics grasping","prompt":"After segmenting objects in this scene, I have a binary mask. Please compute the external contour metrics — area, perimeter, centroid, and bounding rectangle — for each region so my robot arm can plan its grasp points."}],"resultDescription":"A JSON response containing a list of detected external contours, each annotated with its area (pixel count enclosed), perimeter (arc length), centroid (x, y coordinates), and bounding rectangle (x, y, width, height), along with the aggregate total count of foreground pixels in the input mask.","failureModes":["Invalid or malformed binary mask input returns an error","Mask with no foreground pixels returns empty contour list","Incorrectly encoded image data causes parsing failure","Oversized masks may time out or exceed payload limits","Non-binary mask (e.g. grayscale with values beyond 0/255) may produce unexpected results"],"whenToPreferThis":"Choose this endpoint when you have already performed segmentation externally and need reproducible, threshold-independent geometric measurements of object regions. It is ideal when separation of segmentation logic from measurement is important for auditability or reproducibility. Prefer it over general-purpose vision APIs when you need raw contour-level metrics (area, perimeter, centroid, bounding box) from a known binary mask rather than end-to-end object detection with integrated segmentation.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-30T19:04:53.747Z","isFirstParty":false,"canonicalSlug":"halowerk-opencv-external-contour-metrics-a5fc13a1"}