DIPlib Documentation - ©1995-2017 Quantitative Imaging Group, Delft University of Technology.

# ChainCodeConvexHull

Compute convex hull from chain code

## SYNOPSIS

`#include "dip_chaincode.h"`

dip_Error dip_ChainCodeConvexHull ( chaincode, polygon, resources )

## FUNCTION

(To be documented)

We're using Melkman's algorithm to determine the convex hull of a polygonal representation of the boundary encoded by `chaincode`.

## ARGUMENTS

Data type | Name | Description
`dip_ChainCode` | `chaincode` | Input chain code
`dip_Polygon*` | `polygon` | Output convex polygon
`dip_Resources` | `resources` | Resources tracking structure. See `ResourcesNew`

## LITERATURE

Avraham A. Melkman, "On-line construction of the convex hull of a simple polyline," Information Processing Letters 25(1):11-12, 1987.

## SEE ALSO

`ImageChainCode`, `ConvexHullGetArea`, `ConvexHullGetPerimeter`, `ConvexHullGetFeret`