cv.py 文件源码

python
阅读 33 收藏 0 点赞 0 评论 0

项目:Physical-Image-Manipulation-Program 作者: philipptrenz 项目源码 文件源码
def calc_coordinate_averages(coord_arrays):
    """
    Calculate average of all coordinate touples for the correct color

    parameter: dictionary with color key and value as array of coords in (y,x)
    returns: dictionary with color key and value as array of coords in (x,y)!!!
    """
    # TODO: Sort out all circles not matching specific pixel range
    coords = {}
    for key, array in coord_arrays.items():
        temp = numpy.average(array, axis=0) 
        coords[key] = (int(temp[1]), int(temp[0]))
    return coords


#########################################################################################################
#########################################################################################################
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号