def AffineNormalizePoints(points_b):
    # compute the center
    mean = Point(0,0)
    count = 0
    for point in points_b:
        mean += point
        count += 1
    mean = (1.0/count)*mean
    
    # mean center the points_b
    center = AffineTranslate(-mean.X(),-mean.Y(),(0,0))
    points_b = center.transformPoints(points_b)
    
    # Compute the mean distance
    mean_dist = 0.0
    count = 0
    for point in points_b:
        x,y = point.X(),point.Y()
        dist = sqrt(x*x+y*y)
        mean_dist += dist
        count += 1
    mean_dist = (1.0/count)*mean_dist
    
    # Rescale the points_b
    scale = AffineScale(1.0/mean_dist,(0,0))
    points_b = scale.transformPoints(points_b)
    
    # compute the composite transform
    norm = scale*center

    return norm
Create a transform that centers a set of points_b such that there mean is (0,0)
dataset/ETHPy150Open bolme/pyvision/src/pyvision/types/Affine.py/AffineNormalizePoints