# Detect boundary shape

A compound that combines boundary detection and the shape context to an easy-to-use key point detector.

## Inputs

image
Input image. Usually this is a binary or a labeled image, but the threshold input parameter can be used to binarize an input image.
The absolute radius of a key point descriptor in world coordinates. This parameter will be used if scaleInvariant is false. Key point descriptors should usually be calculated from an area that is significantly smaller than the whole object to be detected.
The radius of a key point descriptor relative to the average distance between points in the shape. This parameter will be used if scaleInvariant is true. If relativeKeyPointRadius is one, each key point descriptor will be calculated over an area whose radius equals the mean distance between points in the shape. Otherwise, this parameter behaves the same way as absoluteKeyPointRadius.
rotationInvariant
If true, the key point descriptors will be aligned to local boundary direction, making the descriptor invariant against rotation. Otherwise, the descriptors will depend on the orientation of the object. A non-rotation invariant descriptor is slightly faster and more accurate. If you know the target object will not rotate, you may experience better performance by disabling this option.

The threshold, invert, minBoundaryLength, maxBoundaryLength, maxBoundaries and maxVertices parameters are aliases for the corresponding parameters in boundary detection.

The scaleInvariant, angleBins, distanceBins, maxSamplesPerKeyPoint and globalDescriptor parameters are aliases for the corresponding parameters in shape context.

## Outputs

keyPoints
The coordinates of extracted key points. A N-by-2 matrix in which each row holds the world (x, y) coordinates of a key point.
features
A shape context feature vector for each key point. An N-by-M matrix where M depends on the parameters of the shape context descriptor.
blockSize
The descriptor will be calculated separately for each disjoint shape. This output parameter tells how many rows of keyPoints and features belong to each. It can be used as an input to iterate.