Postprocess boundary🔗
A specialized tool used by boundary shape detection to subsample and join boundaries for shape context calculation.
Inputs🔗
vertices
: Vertex coordinates of all boundary curves found in an image. A N-by-2 matrix in which each row stores the (x, y) world coordinates of polygon vertex.blockSize
: The number of vertices in each separate boundary curve. A M-by-1 matrix, in which M is the number of boundary curves.subsamplingFactor
: The amount of subsampling applied to the incoming boundary curves. If subsamplingFactor is N, the tool will pick every Nth vertex on each curve as a key point.maxKeyPoints
: The approximate maximum number of key points extracted for a combined boundary curve. This parameter poses an upper bound for processing time. If subsampling by subsamplingFactor would produce more than maxKeyPoints key points, the factor will be automatically increased so that the number of key points produced will be approximately maxKeyPoints. Setting maxKeyPoints to zero disables the limit. The tool takes at least one point from each combined boundary. Therefore, the number of key points procuded may be greater than maxKeyPoints.boundaryJoiningMode
: Specifies how boundary shapes and detected objects are related.
Outputs🔗
vertices
: The points received in the vertices input, but rearranged so that the vertices of joined boundaries occupy successive rows.verticesBlockSize
: The number of vertices in each of the joined boundary curves.keyPoints
: Subsampled boundary curves.orientations
: Local boundary orientation on each key point in radians (-pi to pi). The number of rows in this matrix is the same as in keyPoints. If the number of vertices in a boundary is too small for reliable orientation estimation, the orientation will be zero.keyPointsBlockSize
: The number of vertices in each subsampled boundary curve. The number of rows in this matrix is the same as in verticesBlockSize.
-
enum
BoundaryJoiningMode
🔗 Different ways of joining shapes into object descriptors.
Values:
-
enumerator
KeepSeparateBoundaries
🔗 Every boundary curve will be handled separately so that the key point descriptors only encode information about the exact boundary curve they are part of.
-
enumerator
JoinNestedBoundaries
🔗 Nested boundary curves will be combined.
In this mode, both inner and outer boundaries of an object will be encoded in the shape context descriptors.
-
enumerator
JoinAllBoundaries
🔗 All boundary curves will be combined.
This mode is useful if there is only one object in the image or if the objects may break into parts.
-
enumerator