ocrd_cis/ocropy/ocrolib/morph.py
def propagate_labels_simple(regions,labels):
    """Given an image and a set of labels, apply the labels
    to all the connected components in the image that overlap a label."""
    rlabels,_ = label(regions)
    cors = correspondences(rlabels,labels)
    outputs = zeros(amax(rlabels)+1,'i')
    for o,i,_ in cors.T: outputs[o] = i
    outputs[0] = 0
    return outputs[rlabels]
Given an image and a set of labels, apply the labels
    to all the connected components in the image that overlap a label.
Given an image and a set of labels, apply the labels
to all the connected components in the image that overlap a label.
Given an image and a set of labels apply the labels to all the connected components in the image that overlap a label .
def propagate_labels_simple(regions,labels):
    rlabels,_ = label(regions)
    cors = correspondences(rlabels,labels)
    outputs = zeros(amax(rlabels)+1,'i')
    for o,i,_ in cors.T: outputs[o] = i
    outputs[0] = 0
    return outputs[rlabels]
def propagate_labels_simple ( regions , labels ) : rlabels , _ = label ( regions ) cors = correspondences ( rlabels , labels ) outputs = zeros ( amax ( rlabels ) + 1 , 'i' ) for o , i , _ in cors . T : outputs [ o ] = i outputs [ 0 ] = 0 return outputs [ rlabels ]
Given an image and a set of labels, apply the labels
to all the connected components in the image that overlap a label.
Given an image and a set of labels apply the labels to all the connected components in the image that overlap a label .
"""Given an image and a set of labels, apply the labels
    to all the connected components in the image that overlap a label."""
regions
labels