class SkeletonSegment

Last modified: October 27, 2015

Contents

SkeletonSegment

In module gamera.toolkits.musicstaves.plugins.skeleton_utilities

Represents a skeleton segment as a list of adjacent Points.

Properties (except for points, all are computed in the constructor):

points
list of adjacent skeleton points of type Point
branching_points
list of branching points adjacent to the segment
offset_x, offset_y, nrows, ncols
like in connected components
orientation_angle
angle of the least square fitted line through the segment or None when the segment contains less than two points.
straightness
deviation (variance, ie. sum of square deviations) of the segment from the least square fitted line through the. None when the segment contains less than two points.

__init__

Creates a skeleton segment and computes its properties from a list of points. Signature:

__init__(self, points, branching_points=[])

To do the same on the C++ side, use the function

PyObject* create_skeleton_segment(PointVector* points, PointVector* branchpoints)